What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 128 Stack Exchange communities.

I'm getting a cross-browser issue with the JavaScript on Stack Overflow, which wasn't happening yesterday, and which clearing my cache and switching from Chrome to Firefox didn't fix. The error is:

Uncaught SyntaxError: Unexpected identifier

It is triggered within this part of the script:

    <script type="text/javascript">
        StackExchange.using("gps", function() {
             StackExchange.gps.init(true);
        });
    </script>

Which is at line 48 on the main HTML. Further digging revealed line 166 in full.js.

I can't do the following things right now:

  • Open my notifications
  • Comment on anything
  • Vote on anything
  • Add a second answer to anything

This error only occurs if I'm logged in. If I answer anything, Stack Overflow asks me to prove I'm not a robot before I can post my answer. Also, the preview box doesn't show up for my answer, or the rich text editing panel. The issue also shows up on http://cooking.stackexchange.com/, and probably the other Stack Exchange sites as well, but not on meta.stackoverflow.com. I have not yet tested it on other computers, though I intend to later this afternoon.

How can this issue be fixed?

Additional information: The primary difference seems to be that Stack Overflow loads full.js from http://cdn.sstatic.net/js/full.js?v=c9131e40e3fb and Meta Stack Overflow loads from http://meta.stackoverflow.com/content/js/full.js?v=c9131e40e3fb. Other Stack Exchange sites seem to load from the same place as Stack Overflow. Could the issue be here somewhere?

More observations: The http://cdn.sstatic.net/js/full.js?v=c9131e40e3fb script seems to contain lots of what looks like gibberish. Blocks of code like

entheCou.ivaplivalnp;btagec.SueClite){! an))a.parent(tec:$('inpuass("heCs() 
{taror,T/ion(udClass(="vt"><i r2n ind("fav
en"fav
en"fav
en"fav
i,T/!=cti="text"fav

This starts happening at line 166. Everything above this line looks normal, below this line, it looks like the code went through a blender, was then fed to a hungry raccoon, and finally scooped up three days later and pasted into my browser. I have no idea what to do with this.

I am hitting the NetDNA Virginia Datacenter. Also, if I change the value of v in the URL (that is, http://cdn.sstatic.net/js/full.js?v=c9131e40e3fa), I get what looks like valid code that is, on brief inspection, identical to the code at http://meta.stackoverflow.com/content/js/full.js?v=c9131e40e3fb.

share|improve this question
    
No repro with Safari 6.0.3 on Mac OSX 10.8.3. Testing with FF... –  Richard J. Ross III Apr 25 '13 at 20:32
    
No repro with FF 20.0 on Mac OSX 10.8.3. I would test chrome, but I don't have it installed. Is it possible that you have a browser extension (such as NoScript) that may be causing an issue? –  Richard J. Ross III Apr 25 '13 at 20:37
    
I doubt it. It was working yesterday and now works on none of my browsers (even tested in IE, which never gets used or changed). I noticed that line 166 in http://cdn.sstatic.net/js/full.js?v=c9131e40e3fb ends with c==$(this).ext(),10typ)ataTegister)});p()},l=function(d){a>, while the same line from the other source looks like not terrible error. Any idea what might cause this? –  ckersch Apr 25 '13 at 20:43
1  
It might be helpful if you include some of this information (specifically, I think, which CDN you're hitting). –  Matt Apr 25 '13 at 20:50
    
As an aside: the ?v= does not affect what JavaScript you're getting from the server. It's just a cache breaker based on the file contents, ensuring your browsers loads a new version whenever the code on the server has changed. When the file contents have changed, the value for ?v= is changed in the HTML, making the browser see a new URL it has not cached before. –  Arjan Apr 25 '13 at 22:02
    
Maybe it's not supposed to affect it, but based on looking side by side at the content given by two urls with different ?v= values, it most certainly can. Changing the ?v= value goes from horribly mangled javascript to the correct javascript. Interestingly, clearing my cache results in different mangled javascript, but still only for the 'bad' value of ?v=. (Got a bunch of yen symbols in it this time.) –  ckersch Apr 25 '13 at 22:50
    
Testing from home, I don't get this bug, but I'm hitting the New York data center. Would anyone hitting the NetDNA Virginia data center be able to check this bug? –  ckersch Apr 25 '13 at 23:19
add comment

You must log in to answer this question.

Browse other questions tagged .