Closed tabs reappear when reopen app
Categories
(Firefox for Android :: Tabs, defect)
Tracking
()
People
(Reporter: boek, Unassigned)
References
(Depends on 1 open bug)
Details
From github: https://github.com/mozilla-mobile/fenix/issues/24034.
Steps to reproduce
Open Firefox with some open tabs.
Close some of those tabs and close the app inmediately.
Reopen the appExpected behaviour
The closed tabs are gone
Actual behaviour
The closed tabs reappear
Device name
Samsung J7 Prime
Android version
Android 8.1
Firefox release type
Firefox Nightly
Firefox version
99.0a1
Device logs
No response
Additional information
If i have 5 open tabs and close one of them, usually it works ok...
Having 15 open tabs (like now) the problem usually arises...
With 50 open tabs or more, the problem happens almost always.
So, the problem seems to be related to open tabs quantity and the time it takes to persist / sync closed tabs state.
Maybe related to app performance, device performance, or sync issues...┆Issue is synchronized with this Jira Task
Change performed by the Move to Bugzilla add-on.
| Reporter | ||
Comment 1•3 years ago
|
||
Relevant issue: https://github.com/mozilla-mobile/fenix/issues/22454
This bug is still present in Firefox 118.2.0 build #2015978995 (on Android 13) and has been around for a long time.
As many have reported in the linked Github issues, I also have many tabs open + lots of inactive ones.
Usually, when closing a tab and immediately closing Firefox, it would reopen on the next start.
But now I've noticed that I can't reliably trigger the saving of tabs anymore. Even if I wait 15+ minutes before closing Firefox, the closed tabs reopen again on the next start.
| Reporter | ||
Updated•2 years ago
|
This bug is still present. It makes the browser unusable and its incredibly annoying. Please fix this asap
Comment 4•2 years ago
|
||
On my hand the bug/behavior also results in lost tabs. Every new tabs created before some point in time are gone, bookmarks aren't saved anymore, etc. It's like the profile got frozen but firefox still operate normally, until either you close it or it crashes. When you come back the old session is restored (with older closed tabs and without new opened tabs). I can tell it's going to operate that way when I notice that every download fail and/or that I can't share the tab with another app because every sharing with icon is gone.
I can't tell if I am experiencing the same bug but I think I am.
I could reproduce the bug as well with the most recent version (147.0.2) of firefox for android. The adb error logs claim it is an out of memory bug. (
See the attached log below.)
The app itself stays open and has no error message / no popup. The tab-closing-animation runs normally.
Without looking at the logs, there is no way to know that
- a "crash/exception" occurred
- the closed tabs could not be saved
- why it couldn't be saved.
This workaround worked for me temporarily:
- Close other apps, which were running in the background.
- Then close multiple tabs in firefox (while the memory/RAM is still free) until the error is not printed to the error log anymore.
W System : A resource failed to call close.
W mozilla.firefox: Throwing OutOfMemoryError "Failed to allocate a 115895096 byte allocation with 25165824 free bytes and 106MB until OOM, target footprint 182221760, growth limit 268435456" (VmSize 19857276 kB)
W mozilla.firefox: Throwing OutOfMemoryError "Failed to allocate a 115895096 byte allocation with 25165824 free bytes and 103MB until OOM, target footprint 184826104, growth limit 268435456" (VmSize 19876404 kB)
E SessionStorage: Failed to save state to disk due to OutOfMemoryError
E SessionStorage: java.lang.OutOfMemoryError: Failed to allocate a 115895096 byte allocation with 25165824 free bytes and 103MB until OOM, target footprint 184826104, growth limit 268435456
E SessionStorage: at java.lang.StringFactory.newStringFromBytes(Native Method)
E SessionStorage: at java.lang.StringLatin1.newString(StringLatin1.java:770)
E SessionStorage: at java.lang.StringBuilder.toString(StringBuilder.java:478)
E SessionStorage: at org.json.JSONStringer.toString(JSONStringer.java:443)
E SessionStorage: at org.json.JSONObject.toString(JSONObject.java:703)
E SessionStorage: at org.mozilla.geckoview.GeckoSession$SessionState.toString(GeckoSession.java:18)
E SessionStorage: at java.lang.String.valueOf(String.java:4523)
E SessionStorage: at mozilla.components.browser.engine.gecko.GeckoEngineSessionState.writeTo(GeckoEngineSessionState.kt:11)
E SessionStorage: at mozilla.components.browser.session.storage.serialize.BrowserStateWriterKt.tab(BrowserStateWriter.kt:297)
E SessionStorage: at mozilla.components.browser.session.storage.serialize.BrowserStateWriterKt.access$state(BrowserStateWriter.kt:91)
E SessionStorage: at mozilla.components.browser.session.storage.serialize.BrowserStateWriter.write(BrowserStateWriter.kt:33)
E SessionStorage: at mozilla.components.browser.session.storage.SessionStorage.save(SessionStorage.kt:230)
E SessionStorage: at mozilla.components.browser.session.storage.AutoSave$triggerSave$1.invokeSuspend(AutoSave.kt:89)
E SessionStorage: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:9)
E SessionStorage: at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:122)
E SessionStorage: at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:4)
E SessionStorage: at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:3)
E SessionStorage: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:94)
This error repeated periodically every 5 seconds in the log. (likely because of the autosave interval?)
Description
•