Closed
Bug 1035867
Opened 11 years ago
Closed 11 years ago
Fail to launch webapp with TypeError: navigator.mozApps is undefined
Categories
(Firefox for Android Graveyard :: Web Apps (PWAs), defect, P1)
Tracking
(fennec33+)
VERIFIED
FIXED
Firefox 33
Tracking | Status | |
---|---|---|
fennec | 33+ | --- |
People
(Reporter: bc, Assigned: amac)
References
Details
(Keywords: regression, Whiteboard: [WebRuntime])
Attachments
(3 files)
1. adb install webapp-startup-test.apk
2. adb shell 'am start -n com.firefox.cli.apk.webappstartupperformancetestbclary.pc91282b8e6a
542101851c47a670b9c8c/org.mozilla.android.synthapk.LauncherActivity -a android.intent.action.MAIN --es env0 MOZ_CRASHREPORTER_NO_REPORT=1'
E/GeckoConsole(18340): Full Message: {file: "chrome://browser/content/WebappRT.js" line: 83 column: 0 source: "83"}]
Full message: TypeError: navigator.mozApps is undefined
Full stack: WebappRT.getManifestFor/<@chrome://browser/content/WebappRT.js:83:11
Handler.prototype.process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:866:23
this.PromiseWalker.walkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:745:7
this.DOMApplicationRegistry.doGetList@resource://gre/modules/Webapps.jsm:1134:7
this.DOMApplicationRegistry.receiveMessage@resource://gre/modules/Webapps.jsm:1005:1
init@resource://gre/modules/AppsServiceChild.jsm:111:16
@resource://gre/modules/AppsServiceChild.jsm:391:1
@jar:jar:file:///data/app/org.mozilla.fennec-1.apk!/assets/omni.ja!/components/Webapps.js:15:1
WebappRT.getManifestFor/<@chrome://browser/content/WebappRT.js:83:11
Handler.prototype.process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:866:23
this.PromiseWalker.walkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:745:7
good: http://hg.mozilla.org/integration/mozilla-inbound/rev/f81fe2b04fef
bad: http://hg.mozilla.org/integration/mozilla-inbound/rev/b2fd5a214d2a
Maybe bug 903291 ? I'm trying to bisect now.
Reporter | ||
Updated•11 years ago
|
tracking-fennec: --- → ?
Reporter | ||
Comment 1•11 years ago
|
||
Ran a bisection looking for WEBAPP STARTUP COMPLETE in logcat and found:
The first bad revision is:
changeset: 192594:ea4acc8b76dd
user: Fernando Jiménez <ferjmoreno@gmail.com>
date: Sat May 24 12:28:13 2014 -0700
summary: Bug 903291 - App download hangs indefinitely if the child process dies before confirming the install. r=fabrice
I'll double check looking for TypeError: navigator.mozApps is undefined
Blocks: 903291
Updated•11 years ago
|
Severity: normal → critical
Priority: -- → P1
Whiteboard: [WebRuntime]
Comment 3•11 years ago
|
||
Bug 903291 was backed out, but hopefully we can find a way to test for this regression when it eventually re-lands?
Assignee: nobody → ferjmoreno
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Target Milestone: --- → Firefox 33
Updated•11 years ago
|
tracking-fennec: ? → 33+
Reporter | ||
Comment 4•11 years ago
|
||
This regressed again after landed. I confirmed with
http://ftp.mozilla.org/pub/mozilla.org/mobile/tinderbox-builds/mozilla-central-android/1406196121/
20140724030201
https://hg.mozilla.org/mozilla-central/rev/a91ec42d6a9c
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Reporter | ||
Comment 5•11 years ago
|
||
manually checking m-c i get
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=66cb4d556959&tochange=a91ec42d6a9c
Assignee | ||
Comment 6•11 years ago
|
||
I don't have a android build tree... nor an Android phone, actually, which is going to make this interesting :P
Could you please check to see if this fixes the problem?
Flags: needinfo?(bclary)
Updated•11 years ago
|
Attachment #8461592 -
Flags: feedback?(myk)
Reporter | ||
Comment 7•11 years ago
|
||
Fabrice, I keep getting an unrelated build error on mozilla-inbound:
13:09.24 invalid resource directory name: /mozilla/builds/inbound/mozilla/mobile/android/branding/official/res/drawable-xxxhdpi
13:09.24 make[5]: *** [.aapt.deps] Error 1
13:09.24 make[5]: *** Deleting file `.aapt.deps'
13:09.24 make[5]: *** Waiting for unfinished jobs....
Can someone who can get a build completed test the patch?
Flags: needinfo?(bclary)
Reporter | ||
Comment 8•11 years ago
|
||
fyi, i'm building with --with-android-sdk=/home/bclary/opt/android-sdk-linux/platforms/android-17 Is that no longer supported?
Assignee | ||
Comment 9•11 years ago
|
||
Ok, I installed Android on my Peak, and compiled Fennec (using android 19 and copying ziptool from an old sdk I had around since the new one doesn't have it anymore it seems).
I installed it on the phone and ran the APK of comment 0... and I don't know if what I get is expected or not :)
The browser starts, shows a bot icon with a square and then a white screen. In the logcat I don't get the mozApps exception anymore (I get a Java exception though). Attached is the logcat from running the APK.
Assignee | ||
Comment 10•11 years ago
|
||
Then again, I get exactly the same behavior without the patch...
Comment 11•11 years ago
|
||
(In reply to Bob Clary [:bc:] from comment #8)
> fyi, i'm building with
> --with-android-sdk=/home/bclary/opt/android-sdk-linux/platforms/android-17
> Is that no longer supported?
It's still supported, in fact it's the default in releng mozconfigs:
http://hg.mozilla.org/mozilla-central/annotate/06ac51c2b8a8/mobile/android/config/mozconfigs/common#18
I'm building now and will test shortly.
Comment 12•11 years ago
|
||
Comment on attachment 8461592 [details] [diff] [review]
Remove the DOMApplicationRegistry.registryReady promise check
Review of attachment 8461592 [details] [diff] [review]:
-----------------------------------------------------------------
(In reply to Antonio Manuel Amaya Calvo (:amac) from comment #9)
> The browser starts, shows a bot icon with a square and then a white screen.
Does the white screen display the text "Done!" at the top? If so, you've successfully launched and run the app. Otherwise, you're experiencing a "white screen of sorrow," which is a class of bugs in the startup process after the splash screen (bot icon with square) is hidden but before the app is rendered.
> In the logcat I don't get the mozApps exception anymore (I get a Java
> exception though). Attached is the logcat from running the APK.
Hmm, I don't see a Java exception in this log.
Strangely, this fixes the problem, although I don't understand how, and I'm worried that it'll introduce problems in the future. Can you explain the reasoning behind no longer awaiting registryReady?
Attachment #8461592 -
Flags: feedback?(myk) → feedback+
Assignee | ||
Comment 13•11 years ago
|
||
I'm getting a white screen of sorrow then :).
registryReady is not needed because the mozApps constructor sends a sync message to Webapps.jsm. And that message isn't answered until the registry is ready. So
navigator.mozApps only returns after the registry is ready no matter how's it called.
And to be honest, I'm not sure either why removing that promise makes it work. I knew, though, that I got a problem on some builds when it was waiting on that promise inside of doGetList. I solved that by using a promise that's resolved earlier and doesn't depend on receiving a message to being fulfilled (it's resolved when the registry is read, not when the activities are ready). And I had hunch this might be the same problem.
Assignee | ||
Comment 14•11 years ago
|
||
I'll send a try push later on and request review then.
Assignee | ||
Comment 15•11 years ago
|
||
Try run is at:
https://tbpl.mozilla.org/?tree=Try&rev=89e36929e2ae
Oh, about the Java exception, my bad, I thought the
D/StrictMode( 5815): at org.mozilla.gecko.util.HardwareUtils.getMemSize(HardwareUtils.java:168)
D/StrictMode( 5815): at org.mozilla.gecko.GeckoAppShell.getScreenDepth(GeckoAppShell.java:1304)
...
were part of a exception stack dump.
Assignee: ferjmoreno → amac.bug
Reporter | ||
Comment 16•11 years ago
|
||
The try build works for me. Let's get this landed so Autophone can go back to testing webapp startup times.
Assignee | ||
Updated•11 years ago
|
Attachment #8461592 -
Flags: review?(myk)
Comment 17•11 years ago
|
||
Comment on attachment 8461592 [details] [diff] [review]
Remove the DOMApplicationRegistry.registryReady promise check
Review of attachment 8461592 [details] [diff] [review]:
-----------------------------------------------------------------
(In reply to Antonio Manuel Amaya Calvo (:amac) from comment #13)
> I'm getting a white screen of sorrow then :).
>
> registryReady is not needed because the mozApps constructor sends a sync
> message to Webapps.jsm. And that message isn't answered until the registry
> is ready. So
> navigator.mozApps only returns after the registry is ready no matter how's
> it called.
Ah, good point!
> And to be honest, I'm not sure either why removing that promise makes it
> work. I knew, though, that I got a problem on some builds when it was
> waiting on that promise inside of doGetList. I solved that by using a
> promise that's resolved earlier and doesn't depend on receiving a message to
> being fulfilled (it's resolved when the registry is read, not when the
> activities are ready). And I had hunch this might be the same problem.
Hmm, ok. We should land this anyway, since it's the right thing to do, but I sure would like to know how navigator.mozApps can be undefined after awaiting registryReady. I read through the code in bug 903291, and I don't see any reason for it to cause this problem. I'll continue to think about this issue.
Attachment #8461592 -
Flags: review?(myk) → review+
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Reporter | ||
Comment 18•11 years ago
|
||
Keywords: checkin-needed
![]() |
||
Comment 19•11 years ago
|
||
Status: REOPENED → RESOLVED
Closed: 11 years ago → 11 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 20•11 years ago
|
||
bug 903291 has landed again and this is verified in autophone. thanks all.
Status: RESOLVED → VERIFIED
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•