The default bug view has changed. See this FAQ.

javascript doesn't run that works fine on firefox 2.0

RESOLVED WORKSFORME

Status

()

Firefox
General
RESOLVED WORKSFORME
9 years ago
7 years ago

People

(Reporter: Zach Sadecki, Unassigned)

Tracking

3.0 Branch
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [CLOSEME 2010-07-30], URL)

Attachments

(1 attachment)

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b4) Gecko/2008030714 Firefox/3.0b4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b4) Gecko/2008030714 Firefox/3.0b4

I see javascript errors on aprs.fi that did not occur with firefox 2.0.  I have reported this to the website owner, but I'm not sure if it's a problem with the site or with firefox 3 (since it works fine with firefox 2.0)...

Reproducible: Always

Steps to Reproduce:
1.go to aprs.fi
2.look at error console
3.profit!
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9pre) Gecko/2008032801 Minefield/3.0pre

Hm, I see no error at all. Maybe caused by add-ons?
Do you see the same in safe-mode? http://kb.mozillazine.org/Safe_Mode_(Firefox)
(Reporter)

Comment 2

9 years ago
Sorry, I forgot about cookies.  When you go to aprs.fi, you have to 'login'.  Just give it a nickname and click 'login'.  It's the google map page with javascript that gives the errors.  It should draw a bunch of stuff over the map, and depending on zoom level it'll sometimes draw a few things or nothing before erroring out.
Hm, Google knows exactly where I should be. Still no error at all, though.
(Reporter)

Comment 4

9 years ago
Safe mode doesn't fix it for me.  I also had this exact same problem on my work computer with firefox 3 on it (no add-ons on that one).

The errors I get are "unterminiated string literal" or "missing ) after argument list"

I have to go to the error console to see them, as the only indication on the page that it failed is that the status box on the bottom right of the page gets stuck in "updating" and none of the targets that should be overlayed on the map get drawn.
I tried also the build you're using, in case it was fixed in the meantime, but still nothing, only yellow warnings, no errors.
(Reporter)

Comment 6

9 years ago
Do you see any targets overlayed on the map?  maybe you're in an area with none to draw and therefore it works without error.  Try going moving the map to a densely populated area in the US or Europe (the east coast of the US for example).

I gets MANY errors when I move the map around as it keeps trying the redraw targets during zoom/location changes and errors during each attempt.
It seems to work normally. When I click on a blue marker I get a balloon with weather information etc. Works the same here as in Firefox 2.
(Reporter)

Comment 8

9 years ago
Very odd..  I don't know why my setup is broken.  I first saw this on my work computer and last night at home I did a first time install of firefox 3 beta 4 to ensure it wasn't just that one machine before entering the bug.

Anything else I can try to narrow this down?
I'd first try a new profile, maybe it is just some setting.
http://kb.mozillazine.org/Profile_Folder
(Reporter)

Comment 10

9 years ago
Well, it behaves a little different with a new profile, but it still doesn't work.  Now the errors I'm seeing include "Obje is not defined", "Obj is not defined", "no element found", and "xmlreq.responseXML is null"
Really mysterious. Maybe you could try a clean install?
http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/
Just download the zip-file, unzip it on your desktop and start the firefox.exe inside it.
(Reporter)

Comment 12

9 years ago
Still have errors with using the zipped nightly...  It look like the errors are all related to the javascript info being cut short.  "syntax error"s and "missing )" and the such.  The little green arrow in the error console is always right at the end of the line that obviously looks like it's been cut short.  Could this be ISP related (both my work and I use time warner cable for ISP).  maybe firefox 2 and 3 do requests for xml data differently or something and the firefox 3 requests result in very long return data that gets truncated somewhere?
(Reporter)

Comment 13

9 years ago
I also booted my machine using Ubuntu 8.04 beta, which includes firefox 3 beta 4 on the CD.  That setup exibited the same javascript errors that I have described here...

It seems that the errors frequently are reported for an obviously incomplete line that ends in "%", which is another reason I feel like the (XML?) data stream is being cut off somehow (like a HTML coded character didn't make it all the way through and was cut short right after the "%").
(Reporter)

Comment 14

9 years ago
Created attachment 312498 [details]
sampling of random errors

adding error console screenshot.  You can see some of the errors end in "%2" where the next expected character was a 'space', hence my previous comments about truncation of html coded characters...

Comment 15

9 years ago
Ok, trying with both Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b4) Gecko/2008030317 Firefox/3.0b4 and Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13

As far as I can tell I'm able to replicate the fact that there are errors but the exact error isn't reproducible.  Like Zack is saying, it seems that the errors related to randomly truncated javascript on eval lines.

Here are my steps to reproduce:

Go to http://aprs.fi and login with a random login.
Then navigate to Atlanta, Georgia.  (You can enter it in the box in the right hand pane, press enter)
Then click on Show All next to Track callsign in the right hand pane.

Check the Error Console.

In FF2, no errors.  Lots of things show up.

In FF3, some errors.  (The exact error seems to be inconsistent).  Nothing shows up.
(Reporter)

Comment 16

9 years ago
In addition to seeing this problem on FF3, I have also seen it on Epiphany on Ubuntu 8.04 beta.  I believe that this indicates that it is potentially a Gecko problem (Epiphany is Gecko based) and not specific to Firefox...

Comment 17

9 years ago
I'm the author of aprs.fi. I could reproduce this on Firefox 3.0b5 - Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b5) Gecko/2008032620 Firefox/3.0b5

It would seem like something in the AJAX interaction. The site works fine with FF2.0 and 1.0, MSIE 6.0 and 7.0, Konqueror, Opera and Safari. There might be something stupid in my AJAX implementation, but this still seems like a Firefox or Gecko bug to me at the moment.

The javascript on the site does XMLHttpRequests to the site, gets back XML which contains child elements containing escaped javascript code. There is sometimes quite lot of XML and javascript in the response. The child nodes are unescaped and then executed using eval() like this:

for (var jse = 0; jse < xmlfeed.childNodes.length; jse++) {
  if (xmlfeed.childNodes[jse].tagName == "js") {
    var evaljs = unescape(xmlfeed.childNodes[jse].firstChild.data);
    //dump("evaluating: " + evaljs + "\n");
    eval(evaljs);
  }
}

I enabled some logging on the server to see what goes in the XML. This javascript is generated on the server (intended to be evaluated by the above piece of code):

pnt(80369,1199393028,1207681472,60.05201,24.50451,0,0,0,'','
TCPIP*,qAC,CORE-2','igate testing')

It goes into this piece of XML, special characters encoded:

<js>pnt%2880369%2C1199393028%2C1207681472%2C60.05201%2C24.50451%2C0%2C0%2C0%2C%27%27%2C%27TCPIP%2A%2CqAC%2CCORE-2%27%2C%27igate%20testing%27%29</js>

This is what the Javascript error reported on the Error Console said for the above line (when eval()'ing it):

missing ) after argument list
pnt(80369,1199393028,1
----------------------^

It seems to fail at random spots in the evaluated javascript - it would seem like the javascript is truncated somehow, somewhere. Next, I added dump()'s to the javascript - one before the eval (like above) and one dump of xmlreq.responseText just after the response has been obtained.

It would seem to me that xmlreq.responseText does contain the whole XML blob as generated by the server. But for some reason, the parsed XML child elements are truncated. They're truncated before the unescape() call. If I dump xmlfeed.childNodes[jse].firstChild.data - it is sometimes truncated even though a previous dump of xmlreq.responseText was not truncated.

Comment 18

9 years ago
If it doesn't reproduce right away, it can be usually be triggered by zooming out a bit to show some more tracking targets (... bigger XML blob ...).

Comment 19

9 years ago
I always get this with an Intranet site (Replicon Timesheet 7.2 from www.replicon.com), using FF3.0b5 (under WinXP). FF2 is fine.

I suspect this is also bug 355567.

Comment 20

9 years ago
This still reproduces with 3.0 RC1. FF2.0 works fine. I don't think this matches 355567.

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008051206 Firefox/3.0

Comment 21

9 years ago
Errors appear on Mozilla/5.0 (Windows; U; Windows NT 6.0; pl; rv:1.9) Gecko/2008052906 Firefox/3.0

Most of the time there are no objects shown on the map and the site shows "updating" status.

Steps to reproduce:
1) Enter aprs.fi and log in using any text.
2) Enter "Wroclaw, Poland" in address field.
3) Look at error console
(Reporter)

Comment 22

9 years ago
tested on Shiretoko (firefox 3.1 Alpha 1) and the problem still exists.
Reporter, are you still seeing this issue with Firefox 3.6.x or later in safe mode? If not, please close. These links can help you in your testing.
http://support.mozilla.com/kb/Safe+Mode
http://support.mozilla.com/kb/Managing+profiles
Whiteboard: [CLOSEME 2010-07-30]
Version: unspecified → 3.0 Branch
(Reporter)

Comment 24

7 years ago
I am no longer seeing this issue in FF 3.6.x or 4.0 prerelease versions...
Status: UNCONFIRMED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED

Updated

7 years ago
Resolution: FIXED → WORKSFORME
You need to log in before you can comment on or make changes to this bug.