Closed Bug 839399 Opened 12 years ago Closed 11 years ago

[Captive Portal] JS Error if the network error happen while fetching captive portal detection web page

Categories

(Firefox OS Graveyard :: General, defect)

Other
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: schien, Assigned: schien)

References

Details

Attachments

(3 files)

The following JS error shows in logcat with default captive portal detection site point to http://localhost/test.html E/GeckoConsole( 771): [JavaScript Error: "self._runningRequest is null" {file: "jar:file:///system/b2g/omni.ja!/components/captivedetect.js" line: 301}] Root Cause: XMLHttpRequest.onreadystatechange() will still be invoked with readyState == DONE and status == 0 before onerror(), therefore, the retry mechanism will have this error since related attributes are cleaned up by onerror().
Is this worth noming for shira? What's the user impact here if this isn't fixed?
(In reply to Jason Smith [:jsmith] from comment #1) > Is this worth noming for shira? What's the user impact here if this isn't > fixed? The retry mechanism for captive portal detection will not take effect under a sophisticated test case. User is not impacted by this JS error in their daily use. However, I already came out a simple patch for resolving this bug and I'd like to ship the captive portal detection in an error-free state.
For network failure on XMLHttpRequest, onreadystatechange will still be invoked with readyState = 4 and status = 0 prior to onerror callback. We should not invoke the onredirectorerror callback and should let onerror callback handle it.
Attachment #711741 - Flags: review?(tlee)
Attached patch Test caseSplinter Review
xpcshell test case for reproducing this scenario.
Are we saying most normal users won't see this? In my case (a simple scenario), I: 1. Disconnected from Mozilla Guest 2. Reconnected 3. Launched Marketplace In our automation, too, we see: E/GeckoConsole( 109): [JavaScript Error: "self._runningRequest is null" {file: "jar:file:///system/b2g/omni.ja!/components/captivedetect.js" line: 301}] quite often - could there be anything else that caused this failure to launch Marketplace? E/GeckoConsole( 109): Content JS WARN at app://system.gaiamobile.org/js/window.js:40 in anonymous: app of [https://marketplace.firefox.com/telefonica/] got a mozbrowsererror event.
(In reply to Stephen Donner [:stephend] from comment #5) I spun this off as bug 840612.
Attachment #711741 - Flags: review?(tlee)
Patches were merged with original modification of captive portal detection in bug 752982. This one can be closed without any further modification.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
See Also: → 752982
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: