Open Bug 1413895 Opened 2 years ago Updated Last year

[PWA] Don't restore tabs ON - tabs are restored when a PWA is left open


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




Tracking Status
fennec + ---
firefox58 --- affected
firefox59 --- affected


(Reporter: oana.horvath, Unassigned)


(Blocks 1 open bug)



(1 file)

Device: Samsung S7 Edge (Android 7.0);
Build: Nightly 58.0a1 (2017-11-01);

Steps to reproduce:
1. In Settings>Advanced menu, set Don't restore tabs when closing Fennec.
2. Open a PWA (e.g. twitter).
3. Close Fennec, but leave the web app open.
4. Re-open Fennec.

Expected result:
Tabs should be closed.

Actual result:
Tabs are restored and they aren't loading.
Can't load other websites in the same tabs either.
tracking-fennec: ? → +
As long as a PWA (or presumably custom tab) is running, swiping to kill Fennec will not actually kill Gecko, so the tabs are never entirely closed. Then, when we don't restore them on reopening Fennec, we end up with these dead tabs. Unfortunately, a fix for this will likely be pretty tricky.
Attached video rec-Galaxy.mp4
There seems to be a deeper problem here. It is also reproducing with "Always restore" tabs.

Even if they are hard to reproduce because I can't find some consistent steps to do so, I've noticed the following recurring issues after restarting Fennec, with web apps opened in the background:
1. Initially, you need to have 2-3 web apps opened in the background.
2. Close all tabs and close Fenenc.
3. Re-open Fennec and open a new tab (because the current tab is unresponsive every time you restart).
4. Load a page that supports PWA and install the shortcut.
5. Open the PWA.

Some of the results I got:
1. One of the initially opened web apps is installed again when you try to install a different one. (see rec-Galaxy.mp4)
2. The or PWA: adding the PWA to the homescreen and taping the icon, it will install another shortcut everytime you try to open it. (see rec-Nexus.mp4).
The second recording was too large, here it is: 

Devices used:
Samsung Galaxy Tab 3 (Android 7.0)
LG Nexus 5 (Android 6.0.1)

Build: Nightly 59 (2017-11-28)
Re-triaging per

Needinfo :susheel if you think this bug should be re-triaged.
Priority: P3 → P5
You need to log in before you can comment on or make changes to this bug.