Closed Bug 882760 Opened 7 years ago Closed 7 years ago

B2G desktop build broken on mozilla-central

Categories

(Firefox OS Graveyard :: Gaia, defect, blocker)

All
Linux
defect
Not set
blocker

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jgriffin, Assigned: ochameau)

References

Details

Attachments

(2 files, 1 obsolete file)

Gaia unit tests have been broken on cedar since the cedar reset; they now fail to start:

https://tbpl.mozilla.org/php/getParsedLog.php?id=24105106&tree=Cedar&full=1

It isn't clear from the log what's wrong; I'll have to try and reproduce locally.
Attached file m-c diff
I still had a copy of the old cedar lying around so I ran 'hg outgoing mozilla-central --no-merge' and got this list of changesets.

Maybe one of these is what was making them work.
I know that the test-agent sometimes just freezes. We have this on travis sometimes too (for example [1]).

We noticed that in the past when the "script is unresponsive" dialog was happening, but we're supposed to disable it now.

James, do you have thoughts about this ?

[1] https://travis-ci.org/mozilla-b2g/gaia/builds/8066025
The problem is that B2G desktop builds fail to start correctly at all on mozilla-central/gaia master.  They show only a black screen.

The jsconsole shows a number of errors; I don't know if any are the cause:

Timestamp: 06/17/2013 11:14:19 AM
Error: NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIDocShell.setFullscreenAllowed]
Source File: chrome://global/content/BrowserElementChild.js
Line: 23

This is the last thing preventing us from rolling out gaia unit tests across the trees.

Timestamp: 06/17/2013 11:14:19 AM
Warning: ReferenceError: reference to undefined property Cc['@mozilla.org/android/bridge;1']
Source File: resource://gre/modules/accessibility/AccessFu.jsm
Line: 32

Timestamp: 06/17/2013 11:14:20 AM
Error: [Exception... "'Failure' when calling method: [nsIPromptFactory::getPrompt]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0"  data: no]
Summary: Gaia unit tests broken on cedar → B2G desktop build broken on mozilla-central
Incidentally, this kind of breakage will be prevented once we get these tests running everywhere.
This only happens with a debug gaia.

It all starts here when we call SetFullscreenAllowed:
http://hg.mozilla.org/mozilla-central/file/d2a7cfa34154/dom/browser-element/BrowserElementChild.js#l23

And we end up here:
http://hg.mozilla.org/mozilla-central/annotate/58b1f6b4b570/docshell/base/nsDocShell.cpp#l2384

So when we go full-screen we try to get a prompt and fail because we don't support the full-screen prompt.

justin, do you know of any recent changes (approx jun 6 - 13) around the GetIsBrowserOrApp code?
Flags: needinfo?(justin.lebar+bug)
Assignee: nobody → anygregor
And we have a winner:
I can't start the debug b2g desktop build after bug 878319 landed.
Flags: needinfo?(justin.lebar+bug)
Blocks: 878319
Severity: normal → blocker
Assignee: anygregor → poirot.alex
Comment on attachment 765618 [details] [diff] [review]
Fix devtool's JSM global issue on b2g.

Dave, As I discovered yesterday in bug 879228 from my backout, `this` in b2g's jsm is a really weird beast. You have to set exported symbol variable to this. Global variables/functions in your jsm won't be exported. And here, I think that function set to this by the loadSubScript don't end up being new global of the jsm...
Attachment #765618 - Flags: review?(dcamp)
Attachment #765618 - Flags: feedback?(aus)
Comment on attachment 765618 [details] [diff] [review]
Fix devtool's JSM global issue on b2g.

Review of attachment 765618 [details] [diff] [review]:
-----------------------------------------------------------------

I had gwagner test a similar patch and he said it didn't work.  I'll happily r+ this, because it's correct, but someone should see if that fixes the problem.
Attachment #765618 - Flags: review?(dcamp) → review+
Comment on attachment 765618 [details] [diff] [review]
Fix devtool's JSM global issue on b2g.

Review of attachment 765618 [details] [diff] [review]:
-----------------------------------------------------------------

I have the same feedback as dcamp. While the patch looks correct it doesn't seem to solve the root problem. The build still fails to run correctly for me with Gaia built with DEBUG=1 DESKTOP=0 and B2G with --enable-debug. The system app still seems to fail to start up which results in an "Unable to connect" error during startup. There are no obvious errors in the jsconsole or console.
(In reply to Dave Camp (:dcamp) from comment #9)
> Comment on attachment 765618 [details] [diff] [review]
> Fix devtool's JSM global issue on b2g.
> 
> Review of attachment 765618 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> I had gwagner test a similar patch and he said it didn't work. 

I hope that's because we are facing two issues at once. This patch isn't enough to get b2g on master alive again!

This devtools patch will fix the makeInfaillible is undefined exception, that you can see when you fix first a gaia issue!

This gaia issue is related to the Firefox compatiblity mode. When you set DEBUG=1, since bug 866702, this mode is automagically set. And unfortunately, it happens to break permissions on b2g desktop.
So, you can workaround this by running:
  DEBUG=1 DESKTOP=0 make

But I'm suggesting to stop doing this magic in gaia's bug 885544.

To summarize, with these gecko+gaia patch, I hope it will be fully functionnal.
I'm cloberring my old b2g desktop build to confirm that.
Ok, then, as it is broken for a while, we may have even more bugs.
I'll report back when I managed to get a working build.
Attachment #765618 - Attachment is obsolete: true
Attachment #765618 - Flags: feedback?(aus)
Comment on attachment 765638 [details] [diff] [review]
Fix devtool's JSM global issue on b2g.

Ok, patch verified. This (and only this plus the DESKTOP=0) actually fix the startup issue.
Then I can see some sizing issues, where all icons/fonts are huge, but that another story.
Attachment #765638 - Flags: review?(dcamp)
Comment on attachment 765638 [details] [diff] [review]
Fix devtool's JSM global issue on b2g.

Review of attachment 765638 [details] [diff] [review]:
-----------------------------------------------------------------

(Stealing review.)

If this really works, it's fine.

It's really a problem to destabilize basic features of the language like this. If I can't assume that a patch like this has no visible effect, I really can't operate very well as a programmer.
Attachment #765638 - Flags: review?(dcamp) → review+
(In reply to Alexandre Poirot (:ochameau) from comment #14)
> Comment on attachment 765638 [details] [diff] [review]
> Fix devtool's JSM global issue on b2g.
> 
> Ok, patch verified. This (and only this plus the DESKTOP=0) actually fix the
> startup issue.
> Then I can see some sizing issues, where all icons/fonts are huge, but that
> another story.

did you also try with DEBUG=1 DESKTOP=0? I can't get it to run with DEBUG=1
I still get the no connection screen.
With this patch, the build launches correctly for me with DEBUG=1.
You need either to pass DESKTOP=0 or apply the gaia patch from bug 885544
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/8764db53e893
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.