firefox-ios: "Close All Tabs" crashes app intermittently
Steps to reproduce
- Open a website.
- Tab tabs button. Open a new (normal) tab.
- Open a website on the new tab.
- Tab tabs button again.
- Tap trash can icon 🗑️.
- Tap “Close All Tabs”.
The steps are reproducible manually and via the XCUITest testCloseAllTabsUndo()
. The same crash is shown on both iPhone and iPad.
https://github.com/mozilla-mobile/firefox-ios/blob/main/Tests/XCUITests/TopTabsTest.swift#L121
I have not reproduced the issue on private tabs.
Expected behavior
Tabs are closed. The homepage with the “Undo” button is displayed.
Actual behavior
The app crashes about 1/3 of the time after tapping “Close All Tabs”. When I open the app again, the tabs are preserved.
Device & build information
- Device: iOS simulator iOS 17.0. Physical iPad device.
- OS: 17.0 (Not an issue on 16.x)
- Build version: 9000 (35105)
- First seen version: Oct 11ish?
- Notes Attachments:
https://github.com/mozilla-mobile/firefox-ios/assets/1740517/49ec0ddb-f3ed-4e7f-b334-3130cb32ea2a
┆Issue is synchronized with this Jira Task
About this issue
- Original URL
- State: open
- Created 9 months ago
- Comments: 18 (4 by maintainers)
I was able to reproduce this issue 2 times out of 10 tries with the iPhone 15 Pro (17.4.1) on v125 (40715). CC: @afurlan-firefox
https://github.com/mozilla-mobile/firefox-ios/assets/42831109/839f2a04-4c99-4d3d-bdbb-4196beaa155f
➤ Dianna Smith commented:
Looks like introduced in Fx120.0 and will be reverted in 120.3
➤ Yoana Rios Diaz commented:
The crash is still happening but it is harder to reproduce manually. It is recommended to run testLongPressReload repeatedly to test possible fixes. The cause seems to be the same inconsistency in JumpBackIn Viewmodel/Adaptor when all tabs are deleted
@yoanarios Yes, the corresponding test for iPad fails in the same way too, but the test for iPad isn’t a part of smoke test running on Bitrise.
Reopening the issue because the crash is reproducible again.
This issue was first fixed in this commit and I cannot reproduce the crash anymore but in the current main branch (commit sha: b8062cde711b34b3188f5c80379d44d1b37d8d09) is reproducible again so I will investigate the possible causes
The fix has been merged and I moved the ticket to QA needed if is not reproducible anymore I think we are good to close it