The default bug view has changed. See this FAQ.

Gaia is broken in FF nightly again

RESOLVED WONTFIX

Status

Firefox OS
Gaia
RESOLVED WONTFIX
3 years ago
2 years ago

People

(Reporter: kgrandon, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
See: https://groups.google.com/forum/#!topic/mozilla.dev.b2g/RY4Q8sBOMfY

MacBook-Pro:L33Tfox Shrads$ /Applications/FirefoxNightly.app/Contents/MacOS/firefox -profile /Volumes/Document_disk/Git/Gaia/L33Tfox/profile-debug
2147942487JavaScript error: resource://gre/modules/RemoteAddonsParent.jsm, line 776: TypeError: cannot use the given object as a weak map key
JavaScript error: app://system.gaiamobile.org/shared/js/dump.js, line 24: TypeError: settings is null
JavaScript error: app://system.gaiamobile.org/js/applications.js, line 85: TypeError: apps.mgmt is undefined
JavaScript error: app://system.gaiamobile.org/shared/js/date_time_helper.js, line 33: TypeError: window.navigator.mozSettings is null
JavaScript error: app://system.gaiamobile.org/shared/js/idletimer.js, line 101: TypeError: navigator.addIdleObserver is not a function
JavaScript error: app://system.gaiamobile.org/shared/js/settings_listener.js, line 28: TypeError: settings is null
JavaScript error: app://system.gaiamobile.org/shared/js/settings_listener.js, line 28: TypeError: settings is null
JavaScript error: app://system.gaiamobile.org/js/icc.js, line 112: TypeError: window.navigator.mozSettings is null
JavaScript error: app://system.gaiamobile.org/js/airplane_mode.js, line 17: TypeError: window.navigator.mozSettings is null
JavaScript error: app://system.gaiamobile.org/js/cell_broadcast_system.js, line 15: TypeError: settings is null
JavaScript error: app://system.gaiamobile.org/js/nfc_handover_manager.js, line 150: TypeError: this.bluetooth is undefined
JavaScript error: app://system.gaiamobile.org/js/operator_variant/operator_variant_iccs.js, line 73: TypeError: _settings is null
JavaScript error: app://system.gaiamobile.org/shared/js/settings_listener.js, line 28: TypeError: settings is null
LogShake: starting captureLogs listener
JavaScript error: app://system.gaiamobile.org/js/call_forwarding.js, line 207: ReferenceError: CallForwarding is not defined
JavaScript error: app://system.gaiamobile.org/js/findmydevice_launcher.js, line 32: TypeError: navigator.mozSettings is null
JavaScript error: app://system.gaiamobile.org/js/newsletter_manager.js, line 103: TypeError: navigator.addIdleObserver is not a function
JavaScript error: app://system.gaiamobile.org/shared/js/settings_listener.js, line 28: TypeError: settings is null
JavaScript error: app://system.gaiamobile.org/shared/js/settings_listener.js, line 28: TypeError: settings is null
JavaScript error: , line 0: uncaught exception: [object DOMError]
I too facing issues while running apps. I have commented the issue in this bug
Attached screen shots in bug 916028
(Reporter)

Comment 2

3 years ago
Looks like this is the first error I'm running into: SettingsManager.js, line 118: TypeError: this._settingsManager._window is null

http://mxr.mozilla.org/mozilla-central/source/dom/settings/SettingsManager.js#118

I'm adding a few people to the CC and I will try to look into this during the week, but I need to run for now.

Comment 3

3 years ago
Created attachment 8492900 [details]
Screen Shot 2014-09-18 at 7.05.16 pm.png
(Reporter)

Comment 4

3 years ago
Kyle - are you on vacation yet? In case you didn't have enough things to worry about - any idea what might be happening here? This does not call for a backout or anything, but we should try to resolve it so our contributors can work with Firefox nightly and gaia successfully.
Flags: needinfo?(kyle)
The settings errors are due to something trying to access the DOM API while having an invalid inner window. That's a REALLY weird situation to be in. Before any of the errors listed above, I saw:

*************************
A coding exception was thrown in a Promise resolution callback.
See https://developer.mozilla.org/Mozilla/JavaScript_code_modules/Promise.jsm/Promise

Full message: TypeError: toolDefinition is null
Full stack: Toolbox.prototype.fireCustomKey@resource://gre/modules/commonjs/toolkit/loader.js -> resource:///modules/devtools/framework/toolbox.js:555:1
gDevToolsBrowser.selectToolCommand/<@resource:///modules/devtools/gDevTools.jsm:638:9
Handler.prototype.process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:865:23
this.PromiseWalker.walkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:744:7

*************************


AFter that, there was a bunch of

[26659] WARNING: DispatchEvent called on non-current inner window, dropping. Please check the window in the caller instead.: file /share/code/mozbuild/gecko-dev/dom/base/nsGlobalWindow.cpp, line 9511

So it looks like something in devtools might've changed that's causing system app loading to freak out?
Flags: needinfo?(kyle)
(Reporter)

Updated

3 years ago
See Also: → bug 916028
(Reporter)

Comment 6

3 years ago
Hey Kyle - 

I dug into this a bit and I noticed that we call cleanup[1] which sets the _window property to null. It looks like cleanup gets called on a dom-window-destroyed event, but I'm not entirely sure why we would get this in Firefox nightly. Kyle - would you have any idea why we're getting the dom-window-destroyed event?

FWIW - if I remove the _window = null assignment things seem to work again. 

[1] http://mxr.mozilla.org/mozilla-central/source/dom/settings/SettingsManager.js#415
Flags: needinfo?(kyle)
Could be something with how we're loading the system app then the homescreen on in-process desktop? That's really weird. If you remove the _window = null call and things work again, that means that dom-window-destroyed is called but inner-window-destroyed is not. We're apparently still using the same settings manager after cleanup is called, which is not something I ever expected SettingsManager to have to deal with.
Flags: needinfo?(kyle)
How does app transition work on desktop gaia with shims anyways? Are there multiple 

From talking to bz on #content:

<bz> And http://mxr.mozilla.org/mozilla-central/source/dom/base/nsGlobalWindow.cpp#2872 suggests that should not happen
<bz> Can you get this in a debugger?
<bz> And see where that dom-window-destroyed is dispatched and what the heck is going on there?  ;)

So I need to attach gdb and see what's happening. I'm really just hypothesizing about inner-window-destroyed not being called, should also instrument that.
(Reporter)

Comment 9

3 years ago
Thanks for digging into that Kyle. I'd be happy to try to debug that with you over IRC this week, otherwise I don't mind trying to walk through this with BZ during your time off.
Well, first order of business is just stick an observer for inner-window-destroyed back in and see if that's ever getting called. If that's happening, no reason to head into gdb and this needs another diagnosis. I'll try to do that later today.
Ok. Hypothesis was wrong, we are calling dom-window-destroyed then inner-window-destroyed. Working on new ideas now. Can definitely see what's happening, we're destroying our inner window but SettingsManager.init() is never called again with a new window. I'm not sure how that can happen.

Comment 12

3 years ago
The same happened here today:
[app] building email app... System JS : ERROR file:///home/moz/gaia/b2g_sdk/34.0a1-2014-08-12-04-02-01/b2g/components/nsHandlerService.js:120 - NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIProperties.get]
(In reply to gabriele.vidali from comment #12)
> The same happened here today:
> [app] building email app... System JS : ERROR
> file:///home/moz/gaia/b2g_sdk/34.0a1-2014-08-12-04-02-01/b2g/components/
> nsHandlerService.js:120 - NS_ERROR_FAILURE: Component returned failure code:
> 0x80004005 (NS_ERROR_FAILURE) [nsIProperties.get]

This error is harmless.
(Reporter)

Updated

3 years ago
Duplicate of this bug: 1071667
Was there any progress in regards to this bug? Would anyone know if there's any other way our contributors can work on stuff?
We can build B2G https://github.com/mozilla-b2g/B2G .
(Reporter)

Comment 17

3 years ago
I tried looking into this, but didn't have much luck. I think we might need some people more familiar with the platform looking into this, or just say "no" desktop development until we have the new simulator.
On the side note, I was trying to ask devtools guys but got no answer,

The WebIDE now has a local runtime option. Is that something that is/will allow us to run local codebase via WebIDE?

Comment 19

3 years ago
I'm getting the same issue here, well, it's been like this since the past few days. See logs below, if that helps

FF nightly build: 35.0a1 (2014-10-10)
OS: OSX 10.9.5
build command: DEBUG=1 make
Git: master f4451c52a0947a561abc0b1d42a39e3068768ad8

ping me if you need more details, happy to help.

---------------------------------------------------------------------------
± |master ✗| → /Applications/FirefoxNightly.app/Contents/MacOS/firefox-bin -profile /Users/rix/Development/Workspaces/mozilla/gaia/profile-debug --no-remote
21479424872147942487############################### browserElementPanning.js loaded
############################### browserElementPanning.js loaded
###################################### forms.js loaded
###################################### forms.js loaded
======== browser-helper: content.js loaded ========
*************************
A coding exception was thrown in a Promise resolution callback.
See https://developer.mozilla.org/Mozilla/JavaScript_code_modules/Promise.jsm/Promise

Full message: TypeError: toolDefinition is null
Full stack: Toolbox.prototype.fireCustomKey@resource://gre/modules/commonjs/toolkit/loader.js -> resource:///modules/devtools/framework/toolbox.js:555:1
gDevToolsBrowser.selectToolCommand/<@resource:///modules/devtools/gDevTools.jsm:642:9
Handler.prototype.process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:865:23
this.PromiseWalker.walkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:744:7

*************************
JavaScript error: resource://gre/components/SettingsManager.js, line 111: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIXPCComponents_Utils.cloneInto]
JavaScript error: resource://gre/components/SettingsManager.js, line 111: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIXPCComponents_Utils.cloneInto]
JavaScript error: resource://gre/components/SettingsManager.js, line 111: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIXPCComponents_Utils.cloneInto]
JavaScript error: resource://gre/components/SettingsManager.js, line 118: TypeError: this._settingsManager._window is null
JavaScript error: app://system.gaiamobile.org/js/icc.js, line 120: NS_ERROR_UNEXPECTED:
JavaScript error: resource://gre/modules/DOMRequestHelper.jsm, line 279: NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIDOMRequestService.createRequest]
JavaScript error: resource://gre/components/SettingsManager.js, line 118: TypeError: this._settingsManager._window is null
JavaScript error: app://system.gaiamobile.org/shared/js/settings_listener.js, line 28: NS_ERROR_UNEXPECTED:
JavaScript error: resource://gre/components/SettingsManager.js, line 118: TypeError: this._settingsManager._window is null
JavaScript error: resource://gre/components/SettingsManager.js, line 118: TypeError: this._settingsManager._window is null
JavaScript error: app://system.gaiamobile.org/shared/js/settings_listener.js, line 28: NS_ERROR_UNEXPECTED:
JavaScript error: resource://gre/components/SettingsManager.js, line 118: TypeError: this._settingsManager._window is null
JavaScript error: resource://gre/components/SettingsManager.js, line 118: TypeError: this._settingsManager._window is null
JavaScript error: app://system.gaiamobile.org/shared/js/settings_listener.js, line 28: NS_ERROR_UNEXPECTED:
JavaScript error: resource://gre/components/SettingsManager.js, line 118: TypeError: this._settingsManager._window is null
JavaScript error: resource://gre/components/SettingsManager.js, line 118: TypeError: this._settingsManager._window is null
JavaScript error: app://system.gaiamobile.org/shared/js/settings_listener.js, line 28: NS_ERROR_UNEXPECTED:
JavaScript error: resource://gre/components/SettingsManager.js, line 118: TypeError: this._settingsManager._window is null
JavaScript error: app://system.gaiamobile.org/shared/js/settings_listener.js, line 28: NS_ERROR_UNEXPECTED:
JavaScript error: resource://gre/components/SettingsManager.js, line 118: TypeError: this._settingsManager._window is null
JavaScript error: resource://gre/components/SettingsManager.js, line 118: TypeError: this._settingsManager._window is null
JavaScript error: resource://gre/components/SettingsManager.js, line 118: TypeError: this._settingsManager._window is null
JavaScript error: resource://gre/components/SettingsManager.js, line 118: TypeError: this._settingsManager._window is null
JavaScript error: resource://gre/components/SettingsManager.js, line 118: TypeError: this._settingsManager._window is null
JavaScript error: app://system.gaiamobile.org/shared/js/settings_listener.js, line 28: NS_ERROR_UNEXPECTED:
JavaScript error: resource://gre/components/SettingsManager.js, line 118: TypeError: this._settingsManager._window is null
JavaScript error: resource://gre/components/SettingsManager.js, line 118: TypeError: this._settingsManager._window is null
JavaScript error: app://system.gaiamobile.org/shared/js/settings_listener.js, line 28: NS_ERROR_UNEXPECTED:
JavaScript error: resource://gre/components/SettingsManager.js, line 118: TypeError: this._settingsManager._window is null
JavaScript error: resource://gre/components/SettingsManager.js, line 118: TypeError: this._settingsManager._window is null
JavaScript error: app://system.gaiamobile.org/shared/js/settings_listener.js, line 28: NS_ERROR_UNEXPECTED:
JavaScript error: resource://gre/components/SettingsManager.js, line 118: TypeError: this._settingsManager._window is null
JavaScript error: app://system.gaiamobile.org/shared/js/settings_listener.js, line 28: NS_ERROR_UNEXPECTED:
JavaScript error: resource://gre/components/SettingsManager.js, line 118: TypeError: this._settingsManager._window is null
JavaScript error: resource://gre/components/SettingsManager.js, line 118: TypeError: this._settingsManager._window is null
JavaScript error: app://system.gaiamobile.org/shared/js/settings_listener.js, line 28: NS_ERROR_UNEXPECTED:
JavaScript error: app://system.gaiamobile.org/js/popup_window.js, line 30: ReferenceError: AppWindow is not defined
JavaScript error: app://system.gaiamobile.org/js/browser_mixin.js, line 235: ReferenceError: AppWindow is not defined
JavaScript error: app://system.gaiamobile.org/js/homescreen_window.js, line 71: ReferenceError: AppWindow is not defined
JavaScript error: app://system.gaiamobile.org/js/activity_window.js, line 89: ReferenceError: AppWindow is not defined
JavaScript error: app://system.gaiamobile.org/js/attention_window.js, line 69: ReferenceError: AppWindow is not defined
JavaScript error: app://system.gaiamobile.org/js/callscreen_window.js, line 65: ReferenceError: AttentionWindow is not defined
JavaScript error: app://system.gaiamobile.org/js/secure_window.js, line 23: TypeError: AppWindow is undefined
JavaScript error: app://system.gaiamobile.org/js/lockscreen_window.js, line 40: TypeError: AppWindow is undefined
JavaScript error: resource://gre/components/SettingsManager.js, line 118: TypeError: this._settingsManager._window is null
JavaScript error: resource://gre/components/SettingsManager.js, line 118: TypeError: this._settingsManager._window is null
JavaScript error: app://system.gaiamobile.org/shared/js/settings_listener.js, line 28: NS_ERROR_UNEXPECTED:
LogShake: starting captureLogs listener
JavaScript error: resource://gre/components/SettingsManager.js, line 118: TypeError: this._settingsManager._window is null
JavaScript error: app://system.gaiamobile.org/shared/js/settings_helper.js, line 49: NS_ERROR_UNEXPECTED:
JavaScript error: app://system.gaiamobile.org/js/search_window.js, line 30: ReferenceError: AppWindow is not defined
JavaScript error: resource://gre/components/SettingsManager.js, line 118: TypeError: this._settingsManager._window is null
JavaScript error: resource://gre/components/SettingsManager.js, line 118: TypeError: this._settingsManager._window is null
JavaScript error: app://system.gaiamobile.org/shared/js/settings_listener.js, line 28: NS_ERROR_UNEXPECTED:
JavaScript error: resource://gre/components/SettingsManager.js, line 118: TypeError: this._settingsManager._window is null
JavaScript error: app://system.gaiamobile.org/shared/js/settings_listener.js, line 28: NS_ERROR_UNEXPECTED:
JavaScript error: resource://gre/components/SettingsManager.js, line 118: TypeError: this._settingsManager._window is null
JavaScript error: resource://gre/components/SettingsManager.js, line 118: TypeError: this._settingsManager._window is null
JavaScript error: app://system.gaiamobile.org/shared/js/settings_listener.js, line 28: NS_ERROR_UNEXPECTED:
JavaScript error: resource://gre/components/SettingsManager.js, line 118: TypeError: this._settingsManager._window is null
JavaScript error: app://system.gaiamobile.org/js/notifications.js, line 770: NS_ERROR_UNEXPECTED:
JavaScript error: resource://gre/components/SettingsManager.js, line 118: TypeError: this._settingsManager._window is null
JavaScript error: resource://gre/components/SettingsManager.js, line 118: TypeError: this._settingsManager._window is null
JavaScript error: app://system.gaiamobile.org/shared/js/settings_listener.js, line 28: NS_ERROR_UNEXPECTED:
JavaScript error: resource://gre/components/SettingsManager.js, line 118: TypeError: this._settingsManager._window is null
JavaScript error: resource://gre/components/SettingsManager.js, line 118: TypeError: this._settingsManager._window is null
JavaScript error: app://system.gaiamobile.org/shared/js/settings_listener.js, line 28: NS_ERROR_UNEXPECTED:
JavaScript error: , line 0: NS_ERROR_UNEXPECTED:

###!!! [Child][DispatchAsyncMessage] Error: (msgtype=0xAA0001,name=PTexture::Msg___delete__) Route error: message sent to unknown actor ID


###!!! [Child][DispatchAsyncMessage] Error: (msgtype=0xAA0001,name=PTexture::Msg___delete__) Route error: message sent to unknown actor ID


###!!! [Child][DispatchAsyncMessage] Error: (msgtype=0xAA0001,name=PTexture::Msg___delete__) Route error: message sent to unknown actor ID


###!!! [Child][DispatchAsyncMessage] Error: (msgtype=0xAA0001,name=PTexture::Msg___delete__) Route error: message sent to unknown actor ID


###!!! [Child][DispatchAsyncMessage] Error: (msgtype=0xAA0001,name=PTexture::Msg___delete__) Route error: message sent to unknown actor ID


###!!! [Child][DispatchAsyncMessage] Error: (msgtype=0xAA0001,name=PTexture::Msg___delete__) Route error: message sent to unknown actor ID


###!!! [Child][DispatchAsyncMessage] Error: (msgtype=0xAA0001,name=PTexture::Msg___delete__) Route error: message sent to unknown actor ID


###!!! [Child][DispatchAsyncMessage] Error: (msgtype=0xAA0001,name=PTexture::Msg___delete__) Route error: message sent to unknown actor ID


###!!! [Child][DispatchAsyncMessage] Error: (msgtype=0xAA0001,name=PTexture::Msg___delete__) Route error: message sent to unknown actor ID


###!!! [Child][DispatchAsyncMessage] Error: (msgtype=0xAA0001,name=PTexture::Msg___delete__) Route error: message sent to unknown actor ID


###!!! [Child][DispatchAsyncMessage] Error: (msgtype=0xAA0001,name=PTexture::Msg___delete__) Route error: message sent to unknown actor ID


###!!! [Child][DispatchAsyncMessage] Error: (msgtype=0xAA0001,name=PTexture::Msg___delete__) Route error: message sent to unknown actor ID


###!!! [Child][DispatchAsyncMessage] Error: (msgtype=0xAA0001,name=PTexture::Msg___delete__) Route error: message sent to unknown actor ID


###!!! [Child][DispatchAsyncMessage] Error: (msgtype=0xAA0001,name=PTexture::Msg___delete__) Route error: message sent to unknown actor ID


###!!! [Child][DispatchAsyncMessage] Error: (msgtype=0xAA0001,name=PTexture::Msg___delete__) Route error: message sent to unknown actor ID


###!!! [Child][DispatchAsyncMessage] Error: (msgtype=0xAA0001,name=PTexture::Msg___delete__) Route error: message sent to unknown actor ID


###!!! [Child][DispatchAsyncMessage] Error: (msgtype=0xAA0001,name=PTexture::Msg___delete__) Route error: message sent to unknown actor ID


###!!! [Child][DispatchAsyncMessage] Error: (msgtype=0xAA0001,name=PTexture::Msg___delete__) Route error: message sent to unknown actor ID
Is there any progress on this bug? I really love to debug my gaia app in firefox nightly.

May I just mock the mozSettings to work around it?
Yeah, we need Firefox to debug Gaia. Priority on this, please!
(Reporter)

Comment 22

3 years ago
The response I've been hearing is that folks don't want to support gaia in Firefox, and instead want us to move to using the new simulator thing. https://wiki.mozilla.org/Mulet
(Reporter)

Comment 23

2 years ago
It seems that the desire from devtools guys is to use the new simulator now. 

https://developer.mozilla.org/en-US/Firefox_OS/Developing_Gaia/Different_ways_to_run_Gaia#Using_Gaia_in_Firefox_Mulet
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.