Closed
Bug 650619
Opened 14 years ago
Closed 14 years ago
FF4: javascript errors not reported in web console when they occur in async called function
Categories
(Core :: General, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: paul.tevaanholt, Unassigned)
References
()
Details
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0) Gecko/20100101 Firefox/4.0
Build Identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0) Gecko/20100101 Firefox/4.0
When a piece of JS code causes an error, it is normally visible in the web console or error console. However, on FF4 when a function called asynchronously causes an error, it is not visible in the web console or error console. On FF3, javascript errors are shown as expected.
Code snippet from http://paultv.xs4all.nl/ff4/jspoc.html:
var request
function oops() {
// The following line would give a message in the web console:
//document.getElementById('doesnt_exist').innerHTML = 'oops'
request = new XMLHttpRequest()
request.onreadystatechange = listen
request.open('POST', 'bogus')
request.send('')
}
function listen() {
// Set something to prove listen function is started
document.getElementById('does_exist').innerHTML = request.readyState
// The following line DOES NOT give a message in the web console,
// but it DOES give a message in the FF3 error console
document.getElementById('doesnt_exist').innerHTML = 'oops'
}
Reproducible: Always
Steps to Reproduce:
1. Create a web page on a webserver that creates a javascript error in an async called function, or use http://paultv.xs4all.nl/ff4/jspoc.html
2. Open web console
3. Go to the page
Actual Results:
On FF4: no javascript errors are reported in the web console
On FF3: javascript errors are reported in the error console
Expected Results:
FF4 should show all javascript errors, like FF3
Comment 2•14 years ago
|
||
Paul, I ran that snippet on an FF4 nightly and it worked fine. Can you reproduce on a nightly? I filed a bug very similar to this one several months ago and it was fixed, so I think this is probably a dup.
http://nightly.mozilla.org/
Updated•14 years ago
|
Component: JavaScript Debugging/Profiling APIs → General
QA Contact: jsd → general
Comment 3•14 years ago
|
||
Woah, this is weird. The testcase you linked works fine in a debug build corresponding to the nightly, while the actual nightly does not. Color me confused.
Josh, I'm downloading the nightly right now, but it's kinda slow. I'll let you know the results when I have it installed.
With a C/C++ project in the past, I've encountered a similar problem, in my case:
- I didn't explicitly initialize a certain var in the code
- The debug version initialized every local var when it was created automatically
- The optimized version didn't initialize vars anymore
Dunno if it might be something similar in this case.
Hmmm... I donwloaded the nightly (Mozilla/5.0 (Windows NT 6.1; rv:6.0a1) Gecko/20110417 Firefox/6.0a1), and that worked fine; I did get the JS errors in the web console there.
Comment 6•14 years ago
|
||
Hmm, I see the errors in a fresh profile, but not my main browsing one. How peculiar.
Now this is funny... The one I downloaded first was a 32 bits version; works as expected. Just for fun and giggles I also tested the 64 bits nightly, and there I did not get the JS errors.
Comment 8•14 years ago
|
||
There's a bug worth investigating here, it appears.
Status: UNCONFIRMED → NEW
Ever confirmed: true
It's the same case on the regular FF4 build: the 32 bits version shows the JS errors in the web console as expected, while the 64 bits version doesn't.
At least there's a workaround then :) It also limits the scope for the bug hunting significantly, I suppose.
| Reporter | ||
Comment 10•14 years ago
|
||
It also makes me wonder if the debug versions behave the same... does your debug version happen to be 32 bits?
Comment 11•14 years ago
|
||
All of my tests are on 32 bits, so that's not the cause here.
| Reporter | ||
Comment 12•14 years ago
|
||
Goody. I did a fresh FF4 on another Windows 7 64 bits machine, and there I do get the JS error messages. The other machine has far less software installed (e.g. no virus scanner), and on the original machine it was a FF 3->4 upgrade at some time though... I'll continue testing with yet another W7 64 bits machine that has an FF 3->4 upgrade.
| Reporter | ||
Comment 13•14 years ago
|
||
Since I couldn't reproduce the issue on another machine, I started testing with FF on my main machine. As soon as I created a clean profile, I got the JS errors in the web console. Given your test results (test vs main profile), this may be kinda significant.
| Reporter | ||
Comment 14•14 years ago
|
||
Nice, I do have it reproduced on another machine as well. The only difference between the working and non-working situation is that I installed the Windows Malicious Software Removal Tool of April 2011, and rebooted the machine.
| Reporter | ||
Comment 15•14 years ago
|
||
Creating a new profile also helped on the machine where I reproduced the problem. Comparing the profiles gives a lot of differences on both machines, because of the add-ons installed on them.
I haven't managed to reproduce it yet on a cleaner FF4 install, to make comparing the profiles easier. I can't spend much more time on testing this today.
Since we have seen this on 3 separate installations already between two people, it's more than an incident, so I think it's worth investigating further.
| Reporter | ||
Comment 16•14 years ago
|
||
This situation turns out to be caused by AdBlock Plus.
- In FF3, with ABP active, the JS errors are displayed
- In FF4, without ABP active (fully disabled or not installed), the JS errors are reported
- In FF4, with ABP active, the JS errors caused by async called JS functions are not reported anymore
Since this is an ABP problem, and not a core problem, I'll close the bug report as resolved/invalid, and create a bug report on the ABP site.
Severity: major → normal
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → INVALID
Comment 17•14 years ago
|
||
Note: I ended up filing bug 653533 on this, this *is* a core problem.
You need to log in
before you can comment on or make changes to this bug.
Description
•