Closed Bug 959244 Opened 6 years ago Closed 6 years ago

APKs installed from anywhere except the marketplace fail to run.

Categories

(Firefox for Android :: Web Apps (PWAs), defect)

All
Android
defect
Not set

Tracking

()

VERIFIED FIXED
Firefox 29
Tracking Status
firefox29 --- verified

People

(Reporter: jhugman, Assigned: jhugman)

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

Steps to reproduce:

1. Launch fennec. 
2. Browse to the firefox marketplace
3. Install any app. e.g. Chess.
4. Launch the app.
5. Observe that it runs. 
6. Uninstall fennec. 
7. Install fennec. At this point, the APK is installed, but the webapp that is contained in the APK isn't. 
8. Launch the APK.

Expected: the splash screen shows, the web app installs, and then runs.
Observed: the splash screen shows, and then shows about:blank.
Attachment #8361168 - Flags: feedback?(myk)
Attachment #8361168 - Flags: feedback?(martyn)
Comment on attachment 8361168 [details] [diff] [review]
Manifest URL and name not being passed back to Java.

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

This seems alright, except that it adds some information to the message while at the same time it makes WebAppImpl stop relying on the message for that information.  Shouldn't we do either one or the other but not both?

After all, I don't see any other message handlers that might want that information, nor does WebAppImpl fall back on the information in the message if it can't get it from the ApkResources object.  If it did, because sometimes ApkResources doesn't have that info, then it would make sense to still send it in the message.

As it stands, I would only do one of these things.  But tell me if I'm mistaken!
Attachment #8361168 - Flags: feedback?(myk) → feedback+
Comment on attachment 8361168 [details] [diff] [review]
Manifest URL and name not being passed back to Java.

Feedback+ from me (modulo earlier remarks), so requesting review from wesj.
Attachment #8361168 - Flags: review?(wjohnston)
Comment on attachment 8361168 [details] [diff] [review]
Manifest URL and name not being passed back to Java.

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

Like myk said, one or the other, but not both fixes.

::: mobile/android/base/webapp/WebAppImpl.java
@@ -293,5 @@
>          if (event.equals("WebApps:PostInstall")) {
>              String origin = message.optString("origin");
> -            String manifestUrl = message.optString("manifestURL");
> -            String name = message.optString("name", "WebApp");
> -            launchWebApp(origin, manifestUrl, name);

I think I'd lean towards leaving this in maybe.... and not using mApkResources. I'm not sure which (if either) is more reliable at this point. Is it possible that the Gecko install may have redirected the manifestURL or name?
Attachment #8361168 - Flags: review?(wjohnston) → review+
The manifest url in mApkResources is the ultimate source of truth.

The manifest itself is only downloaded on the server, and is bundled with the APK.

I will remove the manifest URL from the Post:Install message.
Attachment #8361168 - Attachment is obsolete: true
Attachment #8361168 - Flags: feedback?(martyn)
https://hg.mozilla.org/mozilla-central/rev/771eb936595f
Assignee: nobody → myk
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 29
This was actually fixed by jhugman, although I accidentally credited myself in the commit log.  My bad!
Assignee: myk → jhugman
Keywords: regression
Summary: Regression: APKs installed from anywhere except the marketplace fail to run. → APKs installed from anywhere except the marketplace fail to run.
Flags: needinfo?(aaron.train)
Keywords: verifyme
Status: RESOLVED → VERIFIED
Flags: needinfo?(aaron.train)
Keywords: verifyme
You need to log in before you can comment on or make changes to this bug.