Web Apps can not be opened from Firefox for Android notification and crashes Firefox

VERIFIED FIXED in Firefox 25

Status

()

defect
P1
critical
VERIFIED FIXED
6 years ago
5 years ago

People

(Reporter: u421692, Assigned: wesj)

Tracking

(Blocks 1 bug, {crash, reproducible})

25 Branch
Firefox 26
ARM
Android
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox24 unaffected, firefox25+ verified, firefox26+ verified, relnote-firefox -, fennec25+)

Details

(Whiteboard: [native-crash][startupcrash][A4A], crash signature)

Attachments

(3 attachments)

Reporter

Description

6 years ago
Posted file webapps_crash Logs
Environment:
Device: LG Nexus 4 (Android 4.2.2)
Build: Nightly 25.0a1 (2013-08-04)

Steps to reproduce:
1. Open Firefox
2. Open Firefox Marketplace
3. Tap on "Free" button next to any web app to install it
4. After installation, tap on "Launch" button
5. Minimize Firefox and start the web app from home-screen shortcut(only on second try, the app will start)
6. Open Firefox.

Expected results:
At Step 4: Web app is opened without any issues.
At Step 6: Firefox is opened without any issues. 

Actual results:
At Step 4: Web app is started and you can see the splash screen but it fails to load and user is taken back to Firefox.
At Step 6: Firefox crashes. See Bug 805754

Updated

6 years ago
Blocks: 805754

Updated

6 years ago
Severity: normal → critical
Crash Signature: [@ mozalloc_abort(char const*) | NS_DebugBreak | mozilla::Logger::~Logger() ]
Keywords: crash
Summary: Web Apps can not be opened from Firefox or Android notification and crashes Firefox → Web Apps can not be opened from Firefox for Android notification and crashes Firefox
Whiteboard: [native-crash]
Priority: -- → P1
Whiteboard: [native-crash] → [native-crash][A4A]
Wes - Can you help diagnose this?
Assignee: nobody → wjohnston
Assignee

Comment 2

6 years ago
Webapps start for me on nightly (i.e. I can't reproduce step 4), but I can reproduce the crashes. Also, Firefox tries to start using the webapp url for some reason. Looking....

Updated

6 years ago
Whiteboard: [native-crash][A4A] → [native-crash][startupcrash][A4A]
Assignee

Comment 3

6 years ago
Attaching a debugger doesn't seem to find anything useful here either. I'm down to bisecting this.
It's likely #2 top crasher in Fennec 26.0a1 (topcrash keyword for bug 805754).
tracking-fennec: --- → ?

Updated

6 years ago
Keywords: reproducible

Comment 5

6 years ago
So, I can reproduce this pretty well by launching a web app, then pressing the home button, and launching Nightly.
Me, too... The Kitchen Sink App is a good one to try with.
Assignee

Comment 7

6 years ago
Yes, anytime you launch an app while Fennec is running (or vice versa), you'll see this.
tracking-fennec: ? → 25+
Posted file crash.txt
I see a crash in Gecko when trying to open an app from another APK.  I'm building Fennec from a branch with a few changes, so it may not be the same issue; but I haven't made any changes to Gecko.

Here's a logcat.
Assignee

Comment 9

6 years ago
Posted patch PatchSplinter Review
Finally managed to track this down. James was right, we're using the wrong profile. I forgot to check out that hunch. Fallout from Guest mode patches. :(
Attachment #798008 - Flags: review?(mark.finkle)
Status: NEW → ASSIGNED
Comment on attachment 798008 [details] [diff] [review]
Patch

This seems wrong. It seems like we won't handle the sIsUsingCustomProfile case at all anymore.

Also, Gecko should not need the -P param to use the default profile.
Attachment #798008 - Flags: review?(mark.finkle) → review-
Assignee

Comment 11

6 years ago
(In reply to Mark Finkle (:mfinkle) from comment #10)
> Comment on attachment 798008 [details] [diff] [review]
> Patch
> 
> This seems wrong. It seems like we won't handle the sIsUsingCustomProfile
> case at all anymore.
> 
> Also, Gecko should not need the -P param to use the default profile.

We didn't handle the sIsUsingCUstomProfile case before either (here). sIsUsingCustomProfile meant that the intent had passed a profile to us in the args. i.e. We didn't need to handle it (here). The user already had.

Remembering back, I think once Java started reading profiles.ini, we just decided it was safest if Java always told Gecko what to load. Why we did that using -P instead of --profile, I can't remember. We'll be doing something similar in bug 886925.
Assignee

Comment 13

6 years ago
Sorry, I didn't make this clear before. This is a regression from:

https://bug871863.bugzilla.mozilla.org/attachment.cgi?id=773746

which is changed from (expanding the ternary):

if (GeckoAppShell.getGeckoInterface() == null || GeckoApp.sIsUsingCustomProfile) {
  profile = "";
} else {
  profile = " -P " + GeckoAppShell.getGeckoInterface().getProfile().getName();
}

to

if (GeckoAppShell.getGeckoInterface() == null || GeckoApp.sIsUsingCustomProfile) {
  profile = " -P " + GeckoAppShell.getGeckoInterface().getProfile().getName();
}

i.e. Brad screwed this up. Also, the try run looks ok.
Comment on attachment 798008 [details] [diff] [review]
Patch

Brad screwed this up? Why didn't you say so! :)
Attachment #798008 - Flags: review- → review+
https://hg.mozilla.org/mozilla-central/rev/4f076c424cd9
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 26

Comment 17

6 years ago
This has practically disappeared from 26 Nightly now, but 25 Aurora still has this signature in high volume. wesj, are you nominating this for uplift?
Flags: needinfo?(wjohnston)
Assignee

Comment 18

6 years ago
Comment on attachment 798008 [details] [diff] [review]
Patch

[Approval Request Comment]
Bug caused by (feature/regressing bug #): Guest mode
User impact if declined: Webapps crash on launch
Testing completed (on m-c, etc.): Landed on mc this week. Sounds like its working.
Risk to taking this patch (and alternatives if risky): Low risk. Reverting to old behavior.
String or IDL/UUID changes made by this patch: None.
Attachment #798008 - Flags: approval-mozilla-aurora?
Attachment #798008 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Verified fixed on:
Build: Firefox for Android 25.0a2 (2013-09-16) and Firefox for Android 26.0a1 (2013-09-16)
Device: LG Nexus 4
OS: Android 4.2.2
Status: RESOLVED → VERIFIED
Erin this got fixed on 25 when still on Aurora and won't ship to Beta users (also was not in the 25.0a2 auroranotes) so I don't think there's anything to note here - please renom if you think I've missed something.
Flags: needinfo?(elancaster)
Flags: needinfo?(elancaster)
You need to log in before you can comment on or make changes to this bug.