Saturday, August 13, 2011

Having troubles with "Problems with *.gwt.xml file" due to user-agent issues? Possible fix.

When firing up my wife's new laptop the other day, I attempted to view the stats on one of my blogs hosted on, and was greeted with a rather bizarre error:

"Possible problem with your *.gwt.xml file. The compile-time user.Agent value (ie8) differs from the run-time value (safari). Expect more errors."

This was a bizarre error, particularly because it sounded like a configuration element from the server, not a local file. So, being the nosy developer I am, I started snooping. It took a couple of hours, but I think I understand the basic problem, and can provide at least a temporary fix.

This error originates from websites built with the Google Web Toolkit, which allows for a combination of Java and Ajax to build rich web applications. It's been around for a few years now, and most people don't even see it. However, with the beta and pending release of IE9, a problem arose with certain code that detects the type of browser you use to visit a particular site. My reading leads me to believe that the code to detect your browser has been overhauled because of IE9, and that overhaul has introduced a bug. It causes a plain-vanilla IE8 browser to be interpreted incorrectly as Safari.

The real fix, if I'm correct, is for the folks at Google to fix the newly introduced error into their user-Agent handling code. Until then, and given that you make registry changes to your system ONLY at your own risk, you might be able to get away with the following:

1. Determine if the Google ChromeFrame extension is installed. Go to Tools->Manage Add Ons, and look for "ChromeFrame BHO", and ensure it is enabled.
2. If it is present, and enabled, open Registry Editor (regedit), and look for the following value:


3. If it is present, add the following DWORD value with a default of 1:


4. Ensure all instances of Internet Explorer are exited, and then restart IE.

Try your site, and see if the error is gone.

Good luck!