Closed Bug 1363052 Opened 7 years ago Closed 7 years ago

Web Apps - Re-launching a web app with an internal/external page opened, resets is to the homepage


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

55 Branch


(firefox55 unaffected, firefox57 affected, firefox58 affected)

Tracking Status
firefox55 --- unaffected
firefox57 --- affected
firefox58 --- affected


(Reporter: ohorvath, Unassigned)



(Whiteboard: [pwa-front-end])

Device: Nexus 6 (Android 7);
Build: Nightly 55.0a1 (2017-05-08);

Steps to reproduce:
1. Open a web app and navigate to an external link, that is opened inside the web app (eg. 
2. Tap the device's home button.
3. With the web app minimized, tap on its home screen icon to launch it again.

Expected result:
The web app shows the external page from where it was minimized.

Actual result:
The web app is reset to the homepage.

Notes: not reproducing on Chrome web apps.
So this is done to handle the case in which an activity is being reused for another app, We may be able to do a better job of detecting when an activity is being reused
I'm not sure if this would be entirely fool-proof, but when initially opening a tab for a web app activity, we store the local manifest path as received from the intent on the tab ( Maybe we can use that  to compare it with the new intent? I think the caller of onTabSelectFromIntent (and for symmetry onTabOpenFromIntent as well) could be modified to pass on the respective intent as well, so the WebAppActivity could then use it for comparison.
Priority: -- → P1
Assignee: nobody → dale
Resetting and will pick this up again when GeckoView PWA's relands
Assignee: dale → nobody
Still reproducing on Nightly 57.0a1, using GeckoView.
Summary: Web Apps - Re-launching a web app with an external page opened, resets is to the homepage → Web Apps - Re-launching a web app with an internal/external page opened, resets is to the homepage
Flags: needinfo?(cnevinchen)
Flags: needinfo?(cnevinchen)
Whiteboard: [pwa-front-end]
Needs to be considered in the context of
Hi Oana, Can you verify again with the latest GeckoView PWA implementation?
I can't seem to reproduce the original bug
Flags: needinfo?(oana.horvath)
There is a difference between how the PWA's external links are handled:
1. opens external links as internal pages, not in custom tabs. For this PWA, the pages are restored (but they should open in custom tabs and that's a different issue).
2. Twitter pwa opens external links in custom tabs, but these are not restored. For example, on Twitter: open an external link in a custom tab, minimize the web app and tap the launcher again. It won't restore the custom tab opened.

So, the issue is still reproducible having external links opened in custom tabs.
Flags: needinfo?(oana.horvath)
We use custom tabs for external links now, so this no longer occurs.
Closed: 7 years ago
Resolution: --- → WORKSFORME
The issue still occurs with using custom tabs for external links, as I've mentioned in comment 7 (with the mention that point #1 from that comment is invalid now). Let me know if I'm misunderstanding the expected behavior, or if I should reopen this bug.
Flags: needinfo?(snorp)
Actually, I've just seen that Chrome does the same thing.
Ah, I understand comment #7 better now. I think our current behavior is correct.
Flags: needinfo?(snorp)
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.