Closed
Bug 826297
Opened 13 years ago
Closed 13 years ago
B2G navigator.onLine + online / offline events no longer working
Categories
(Core :: DOM: Device Interfaces, defect)
Tracking
()
People
(Reporter: philikon, Assigned: hub)
References
Details
(Keywords: regression)
Attachments
(1 file)
|
839 bytes,
patch
|
sicking
:
review+
|
Details | Diff | Splinter Review |
As reported by Jose M. Cantera in bug 777145 comment #40:
> It has stopped working. STR:
>
> Gecko-257e1c1.Gaia Master
>
> Go to Gaia and turn on / off airplane mode. The online / offline events are
> not raised over the window object. And the following JS error appears on the
> console
>
> E/GeckoConsole( 717): [JavaScript Error: "NS_ERROR_NOT_AVAILABLE: Component
> returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE)
> [nsIPrefBranch.setIntPref]" {file:
> "jar:file:///system/b2g/omni.ja!/components/RILContentHelper.js" line: 878}]
> E/GeckoConsole( 768): [JavaScript Error: "NS_ERROR_NOT_AVAILABLE: Component
> returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE)
> [nsIPrefBranch.setIntPref]" {file:
> "jar:file:///system/b2g/omni.ja!/components/RILContentHelper.js" line: 878}]
| Assignee | ||
Comment 1•13 years ago
|
||
The exception isn't caught on a call to
Services.prefs.setIntPref("ril.lastKnownMcc", this.iccInfo.mcc);
blocking-basecamp: --- → ?
| Reporter | ||
Updated•13 years ago
|
blocking-basecamp: --- → ?
Keywords: regression
| Assignee | ||
Comment 3•13 years ago
|
||
Jonas Sicking for review as he reviewed the original change.
Attachment #697950 -
Flags: review?(jonas)
| Assignee | ||
Comment 4•13 years ago
|
||
Also I haven't been able to reproduce the problem.
Comment 5•13 years ago
|
||
Jonas, can you comment on the impact from this bug and why you think it should block basecamp?
Updated•13 years ago
|
Flags: needinfo?(jonas)
Attachment #697950 -
Flags: review?(jonas) → review+
This is a very standard web feature which is particularly important on mobile since connectivity is often lost there. This is how we tell a website that it can't connect to the internet any more.
Without this we'll likely see more apps getting stuck with spinners trying to fetch server-side data rather than using cached local data or doing nothing.
Flags: needinfo?(jonas)
Comment 7•13 years ago
|
||
(In reply to Jonas Sicking (:sicking) from comment #6)
> This is how we tell a website
> that it can't connect to the internet any more.
That seems important enough to me to block on.
blocking-basecamp: ? → +
| Assignee | ||
Comment 8•13 years ago
|
||
Comment 9•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
Comment 10•13 years ago
|
||
Comment 11•13 years ago
|
||
this is not working with latest Gaia and Gecko 7e463c0
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
| Assignee | ||
Comment 12•13 years ago
|
||
(In reply to Jose M. Cantera from comment #11)
> this is not working with latest Gaia and Gecko 7e463c0
I'd be curious to see how you reproduce it.
Comment 13•13 years ago
|
||
Are u in the Berlin WW?
| Assignee | ||
Comment 14•13 years ago
|
||
(In reply to Jose M. Cantera from comment #13)
> Are u in the Berlin WW?
Yes I am.
| Assignee | ||
Comment 15•13 years ago
|
||
I reverted revesion 34a0dad8b495590ae6656ffef8f6c6823499cd5d and it works.
Bug 820617 - Add a hook to make NetworkManager not manage offline status and use it in Marionette for B2G CI. r=jgriffin, a=blocking-basecamp
| Reporter | ||
Comment 16•13 years ago
|
||
(In reply to Jose M. Cantera from comment #11)
> this is not working with latest Gaia and Gecko 7e463c0
Jose, I already told you in bug 777145 comment 41, please always open a new bug. Don't reopen a bug that has had a landed patch UNLESS that patch has been backed out.
Status: REOPENED → RESOLVED
Closed: 13 years ago → 13 years ago
Resolution: --- → FIXED
| Reporter | ||
Comment 17•13 years ago
|
||
(In reply to Hub Figuiere [:hub] from comment #15)
> I reverted revesion 34a0dad8b495590ae6656ffef8f6c6823499cd5d and it works.
>
> Bug 820617 - Add a hook to make NetworkManager not manage offline status
> and use it in Marionette for B2G CI. r=jgriffin, a=blocking-basecamp
Do you guys have Marionette enabled on your phones? Marionette is typically enabled on eng builds, but not on user builds. Marionette needs to disable the automatic online/offline detection. That's what bug 820617 is about.
So I suggest you either switch to a user build. Or, if you want to remain on eng build which is perfectly reasonably, set the "marionette.defaultPrefs.enabled" pref to false to disable Marionette. You can do this in a number of ways:
(a) modify https://mxr.mozilla.org/mozilla-central/source/b2g/app/b2g.js#446 and reflash Gecko
(b) create gaia/build/custom-prefs.js, put the following line in it, and reflash Gaia.
user_pref("marionette.defaultPrefs.enabled", false);
Hope this helps.
| Assignee | ||
Comment 18•13 years ago
|
||
if I modify the prefs.js with b2g not running it get reset (ie the line removed) when I start b2g.
To modify it I adb pull / push with edit. And I use cat to verify the file has the right value. And it gets changed at one point during startup.
I haven't tried reset-gaia yet as I'd like to avoid that.
Comment 19•13 years ago
|
||
(In reply to Philipp von Weitershausen [:philikon] from comment #17)
> (In reply to Hub Figuiere [:hub] from comment #15)
> > I reverted revesion 34a0dad8b495590ae6656ffef8f6c6823499cd5d and it works.
> >
> > Bug 820617 - Add a hook to make NetworkManager not manage offline status
> > and use it in Marionette for B2G CI. r=jgriffin, a=blocking-basecamp
>
> Do you guys have Marionette enabled on your phones? Marionette is typically
> enabled on eng builds, but not on user builds. Marionette needs to disable
> the automatic online/offline detection. That's what bug 820617 is about.
>
> So I suggest you either switch to a user build. Or, if you want to remain on
> eng build which is perfectly reasonably, set the
> "marionette.defaultPrefs.enabled" pref to false to disable Marionette. You
> can do this in a number of ways:
>
> (a) modify
> https://mxr.mozilla.org/mozilla-central/source/b2g/app/b2g.js#446 and
> reflash Gecko
> (b) create gaia/build/custom-prefs.js, put the following line in it, and
> reflash Gaia.
>
> user_pref("marionette.defaultPrefs.enabled", false);
>
> Hope this helps.
Thanks Philikon, you are totally right. I enabled marionette to execute integration tests and that's why it stopped working.
Sorry for the noise
thanks
Comment 20•13 years ago
|
||
(In reply to Philipp von Weitershausen [:philikon] from comment #16)
> (In reply to Jose M. Cantera from comment #11)
> > this is not working with latest Gaia and Gecko 7e463c0
>
> Jose, I already told you in bug 777145 comment 41, please always open a new
> bug. Don't reopen a bug that has had a landed patch UNLESS that patch has
> been backed out.
Sorry about that. I thought that the policy for reopening was how old was the concerned bug.
thanks
| Assignee | ||
Comment 21•13 years ago
|
||
I just installed a pure beta version of b2g and verified that the events are happening as expect and including the few other details that Jose showed me in person.
| Assignee | ||
Comment 22•13 years ago
|
||
I filed bug 829576 to ask for a more friendly developer settings.
Updated•13 years ago
|
status-firefox21:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•