GMail loading problems

If you see GMail stuck with the "loading" message in black on white when you try to log in, you have just met a very weird bug in Opera: HTML comments may break large scripts loading from cache!

Workarounds:

  1. You can try emptying cache. It should work.
  2. You can also try the bookmarklet javascript:top.js.location.reload()

Now, for the curious readers: this bug apparently is a comment parsing issue. GMail's SCRIPT tags contain the traditional HTML "comments" to hide the JS code from old browsers. I have no idea why, since I believe they already weed out browsers that do not understand fancy stuff like XMLHttpRequest. Then, within the body of the code you'll find:

while( a-- >0)

That looks like an end-of-comment to Opera, but weirdly enough it usually only breaks things when Opera has cached the script. If the script does not load from cache it works nearly all the time.

GMail could fix it by removing the <!– –> from inside the SCRIPT tag, or by adding an empty comment to prevent the browser from interpreting the above code as an end-of-comment tag. For example:

white( a-- /**/ >0)

We've already done some fixes in Opera but as usual it may take a while before they make it into a final version.

25 thoughts on “GMail loading problems

  1. An "interesting" thought has occurred to me, maybe related to this.The Acid2 test requires the implementation of correct SGML comment parsing, that is, — opens and closes comments. That is going to totally screw up any script that uses the autodecrement operator, isn't it?All I can think of is to use non-compliant comment parsing inside <script> elements.

  2. Since when did "white" become a JavaScript statement? πŸ˜‰ I suspect that should be "while"…Anyhow, "Identify as Mozilla" never seems to get stuck on the GMail "Loading" page — at least it works for me.

  3. Lee Harvey: thanks for catching the typo. It was actually cut'n'paste from a bug tracking system comment, and I noticed the typo in the BTS but forgot to fix it in my post '-)Pondus: yes, we have a fix for this issue and I expect it to be in Opera 9.0

  4. Andrew: Opera is not supposed to parse "comments" inside scripts (CDATA), so SGML comment parsing should not be an issue. It is a somewhat convoluted problem though, since we obviously have to find a good approach to ignoring the comments that actually are there. Some scripts even use HTML comments instead of /* */ – style comments!

  5. Hello there.I am having this issue at home.Everything was fine then suddenly I noticed Gmail behaving oddly. I couldn't open any Email threads.I closed the browser and tried to log back into Gmail and got this JavaScript Box:mail.google.com:You need to enable active scripting and activeX controls.I posted my issue on the Forums:http://my.opera.com/community/forums/topic.dml?id=106936In there I was given the link to this page.I've tried clearing the cache as was stated here without luck.How do I execute the bookmarklet javascript:top.js.location.reload()?

  6. I'm not absolutely sure that is the same issue. If you get that popup about ActiveX try making sure you identify as Opera.Anyway, to use a bookmarklet you should copy the whole string in bold from the post, paste it in the address bar of the GMail page and press enter.

  7. I did identify as Opera. No change.I copied the sting into the address bar in place of the whole gmal address after I got the error. No Change.I'm thinking about completely removing and just reinstalling Opera.

  8. In opera, gmail will not autofill contacts as it does in explorer and Firefox. Please fix this as IE is awful and Firefox is bogging down with several hangs on latest releases. I am really looking forward to Opera 9.

  9. I was looking for informations on that bug, and I found your page.That bug looked "random" at first, but I managed to understand it a little bit (from the functionnal point of view, and not from the technical point of view you explained).When I first launch opera, and I log-in, everything is fine, either with standard view and html view.When I'm in standard view and I reload, every thing is OK. When I click on the url bar and I press [ENTER], I've the "Loading…" bug. After that, only the HTML view will work. Even if I logout/re-login. Ok so it look like something gone wild at one point. So that's not strange.Now, here is the strange part. What I've described is with "Identify as Opera". So when I change it to "Identidy as Mozilla", every thing works fine, even if I was previously in the same session with the "Loading…" bug under "Identify as Opera". So I suppose (in fact, I hope) that the opera parser is the *same* in both modes. So I wonder if :* There is another bug with the same behaviour (after all, *any* crash during parsing may leed to the "Loading…" bug)* There a workaround for the same problem for firefox/mozilla * There is something that disable the cache in mozilla mode (either due to opera or due to google)

  10. Sorry to be a bit slow at responding..gjbetti: address completion failing is a known bug in GMail (not related to the main topic of this post). Emptying your cache should fix this one too. (The bug is that they use XMLHttpRequest and expect a 200 status but if content is cached they will get a 304 status)agiss: you really got me thinking there but I probably won't have time to find the answer. It was reported in the forums by a few users that changing the User Agent seemed to fix GMail loading problems. I found that highly unlikely. Both because of the nature of this problem (Opera's parser won't change according to the identification AFAIK!) but also because GMail actually should be in your UA.ini-file. Hence, Opera will send same UA every time regardless of menu setting. But maybe, just maybe, Opera has some internal logic to mark content for re-validation from server when you change UA? It would be a very logical thing to do (in case you changed UA to get around server-side detection you definitely want to load the content afresh), but I don't know if we do it. Right now I have to sleep so I can't test πŸ™‚

  11. I've just upgraded to 8.51 and GMail now loads properly for me (Win XP SP2). In addition, the "settings" page now appears, tho I haven't tried using any. Looks like Opera made some allowance for Gmail's flaws.Interestingly, if you click the Back button, you'll be confronted with the dread "Loading…"-and-nothing-else page — I wonder how they do that?

  12. I am very new to this browser — mere days. I apologize if this comment is out of place. Gmail itself loads fine, but refuses to upload any attachment. I'm quite enjoying Opera apart from this consistent snafu. Thanks, Community. πŸ™‚

  13. Unfortunately I could not reproduce any problems sending an E-mail with attachment from GMail, so I don't know why it fails for you. 😦

  14. Aztec writes:Why multiple file attachment feature does not work in Opera while using Gmail? I'm using the latest version 11.11 with latest flash installed. I have noticed this since the last few versions starting from 10.0 as I don't exactly remember how it was before. It is quite annoying as I have to use some other browser just to attach multiple files in Gmail.

  15. Anonim writes:Still this "feature" of Gmail not being able to load completely is implemented. As I use Opera 11.11 it is kind of frustrating – removing cache, f5 f5 f5…

  16. 11.11? If you want the fixes that we've implemented against things like –> breaking GMail you will have to actually upgrade to the latest or semi-latest versions, you know? πŸ˜‰

Leave a reply to hallvors Cancel reply