[ERROR] Invalid version number "2.0" passed to external.gwtOnLoad(), expected "1.6"; your hosted mode bootstrap file may be out of date; if you are using -noserver try recompiling and redeploying your app
When switching GWT versions on my project I get this error (when I'm lucky):[ERROR] Invalid version number "2.0" passed to external.gwtOnLoad(), expected "1.6"; your hosted mode bootstrap file may be out of date; if you are using -noserver try recompiling and redeploying your appHowever, if I'm switching within a given version of GWT (say because I'm working off of trunk and updating or rolling back) I may in fact have incorrect contents in hosted.html but a correct version. This means the above error message is never thrown, but hosted mode is unexplainably broken.Should this be an issue? It would be great if GWT checked the contents of hosted.html and replaced the file if needed.
On Tue, Aug 11, 2009 at 7:50 PM, Fred Sauer <fre...@google.com> wrote:When switching GWT versions on my project I get this error (when I'm lucky):[ERROR] Invalid version number "2.0" passed to external.gwtOnLoad(), expected "1.6"; your hosted mode bootstrap file may be out of date; if you are using -noserver try recompiling and redeploying your appHowever, if I'm switching within a given version of GWT (say because I'm working off of trunk and updating or rolling back) I may in fact have incorrect contents in hosted.html but a correct version. This means the above error message is never thrown, but hosted mode is unexplainably broken.Should this be an issue? It would be great if GWT checked the contents of hosted.html and replaced the file if needed.
I'm not sure I understand the issue. If you have different versions of hosted.html and GWT, things are likely to not work and that is why that check was added in 1.6. I don't see how you could have the incorrect contents of hosted.html but the correct version, unless you update/rollback parts of GWT separately, in which case you are already likely to break things if you don't know what you are doing.
--In the -noserver case, GWT never sees the hosted.html your web server serves, and the version number is passed to the plugin from hosted.html (or gwt.external in legacy hosted mode) -- it could conceivably do an XHR for hosted.html and send the entire contents (or a hash) rather than just the version number, but that seems overkill as I don't see a reasonable way the version number contained in the hosted.html file will get out of sync with the rest of the hosted.html file.
John A. Tamplin
Software Engineer (GWT), Google
I'm not sure I understand the issue. If you have different versions of hosted.html and GWT, things are likely to not work and that is why that check was added in 1.6. I don't see how you could have the incorrect contents of hosted.html but the correct version, unless you update/rollback parts of GWT separately, in which case you are already likely to break things if you don't know what you are doing.Yep, that's exactly the scenario :). Knowing that you have to watch out for this stuff is one thing. Being bit by it every now and again and going down a rabbit hole, is (mildly) annoying.Not a huge deal as this affect contributors only, but could be a good sanity check to save time down the road.
There are so many ways you can screw things up by mixing different versions of parts of GWT, I don't see how this is any different. For example, if you rollback an old TypeOracleMediator but don't roll back related TypeOracle changes, things are going to break horribly. I think trying to add code inside GWT to detect such situations is counterproductive and unlikely to be effective anyway.On Tue, Aug 11, 2009 at 8:22 PM, Fred Sauer <fre...@google.com> wrote:I'm not sure I understand the issue. If you have different versions of hosted.html and GWT, things are likely to not work and that is why that check was added in 1.6. I don't see how you could have the incorrect contents of hosted.html but the correct version, unless you update/rollback parts of GWT separately, in which case you are already likely to break things if you don't know what you are doing.Yep, that's exactly the scenario :). Knowing that you have to watch out for this stuff is one thing. Being bit by it every now and again and going down a rabbit hole, is (mildly) annoying.Not a huge deal as this affect contributors only, but could be a good sanity check to save time down the road.
I would hope that anyone knows building a version of GWT that is not at a consistent revision across the board means they better know exactly what they are doing or they will get weird breakages.
--
John A. Tamplin
Software Engineer (GWT), Google
Where does the error message live? This seems like the perfect time to make it a bit more helpful, even if it just suggests to people that they check for both browser and server caching.
Could we modify the hosted mode servlet so that it set the appropriate no-cache headers on hosted.html? I've also run into this issue due to browser caching.Also, is this file re-generated every time hosted mode is started up? If not, it definitely should be.
Time to put it up on rietveld again? Or is there already an url?