Closed Bug 1990978 Opened 2 months ago Closed 2 months ago

Deleted history pages reappear upon Firefox restart

Categories

(Firefox for Android :: History, defect, P1)

Firefox 143
All
Android
defect
Points:
21

Tracking

()

VERIFIED FIXED
145 Branch
Tracking Status
relnote-firefox --- 143+
firefox143 + verified
firefox144 + verified
firefox145 + verified

People

(Reporter: BojanNesic85, Assigned: Gela)

References

(Regression)

Details

(Keywords: regression, Whiteboard: [fxdroid][group2])

Attachments

(5 files)

User Agent: Mozilla/5.0 (Android 15; Mobile; rv:143.0) Gecko/143.0 Firefox/143.0

Steps to reproduce:

  1. Opened Firefox 143.0.2 for Android on an Android 15 device.
  2. In the History view, long-pressed and deleted specific pages.
  3. Fully closed and restarted the app.
  4. Noticed that the same deleted entries reappeared in history.
  5. Went to โ‹ฎ โ†’ Settings โ†’ Delete browsing data on quit, toggled it On, and then unchecked every data type.
  6. Returned to the three-dot menu and saw that the Quit entry had vanished.
    (I'm not logged in into Firefox Sync, by the way. Also, I'm using Firefox in Serbian, so exact terms for specific functions and buttons in English version of Firefox may be different than my translation.)

Actual results:

Deleted history entries are never committed to the databaseโ€”on restart they reappear โ€” and because Quit only shows when at least one data type is selected under โ€œDelete browsing data on quitโ€ thereโ€™s no way to perform a clean exit (which would flush manual deletions) without wiping all or some data.

Expected results:

When โ€œDelete browsing data on quitโ€ is enabled, Quit should remain visible even if no data types are checked, allowing users to trigger a proper shutdown (checkpointing the SQLite WAL) so that selective deletions persist without forcing a full data purge.

Points: --- → 21
See Also: → 1991249

Having same problem with 143.02 (Build #2016116031) Firefox on Galaxy S22.

Is this SHIP related or should squad 4 take a look at this history related issue?

Flags: needinfo?(kkaya)

I've cleared cache, uninstalled the app, removed residue files using Google Files and File Manager, restarted the phone, and installed the latest stable version of Firefox from Google Play Store, but the problem remains. I didn't log in to Firefox Sync.

There is good overlap with bug 1991249, so once that is fixed we should have this re-tested.

Assignee: nobody → gmalekpour
Whiteboard: [fxdroid][group2]
Attachment #9517059 - Attachment description: WIP: Bug 1990978 - Bring back the snackbar with Undo button for when a history item is deleted → Bug 1990978 - Bring back the snackbar with Undo button for when a history item is deleted
Duplicate of this bug: 1991249

I have a patch up to revert the removal of that specific snackbar here: https://phabricator.services.mozilla.com/D266738

During my testings I've noticed a similar (but different) bug that is not caused as a part of my patch but we should look into eventually.
The logic of committing item deletions to a "pending" state and deleting them once the snackbar disappears is concerning because visually, we are essentially tricking users into thinking that their browsing history is deleted when it is not. This means if user swipes away to quit the app before the snackbar disappears, all of their deleted history items will come back upon the next launch.

Status: UNCONFIRMED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: FIXED → ---

firefox-beta Uplift Approval Request

  • User impact if declined: Without this patch if user deletes one or multiple items from their search history, we visually remove those from the list, but as soon as they restart the app, those items will reappear. This can leak personal browsing info and have disastrous impacts on users' privacy.
  • Code covered by automated testing: yes
  • Fix verified in Nightly: no
  • Needs manual QE test: yes
  • Steps to reproduce for manual QE testing: Listed in the ticket: https://bugzilla.mozilla.org/show_bug.cgi?id=1990978
  • Risk associated with taking this patch: low
  • Explanation of risk level: We are reverting a patch
  • String changes made/needed: 2 strings that were previously marked as unused are reintroduced back.
  • Is Android affected?: yes
Attachment #9517067 - Flags: approval-mozilla-beta?
Flags: qe-verify+

This patch essentially reverts this change from back in 143: https://phabricator.services.mozilla.com/D255847

The original patch removed the snackbar that was shown when user deleted one or multiple history items from the list. The complexity here lies in the fact that even though we visually remove the item from the list, under the hood we do not actually remove the item(s) until the snackbar is shown and has gone away. Instead, we add the item(s) to a pending list to be deleted "eventually".

Since the original patch simply removed the snackbar visually but did not actually change the logic under the hood to perform the deletion immediately, once user restarts the app, all of their presumably deleted history would reappear.

Given the severity of this issue I am going to reintroduce the snackbar to resolve this since it's the fastest and safest solution. We can then look into updating the entire logic stack to honor deletions immediately.

Original Revision: https://phabricator.services.mozilla.com/D266738

Pushed by gmalekpour@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/4ece4463251e https://hg.mozilla.org/integration/autoland/rev/a7f672005bb2 Bring back the snackbar with Undo button for when a history item is deleted r=android-reviewers,jonalmeida
Flags: needinfo?(kkaya)
Severity: -- → S1
Priority: -- → P1
See Also: → 1991697
Status: REOPENED → RESOLVED
Closed: 2 months ago2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 145 Branch
Keywords: regression
Regressed by: 1969980
See Also: 1991249
Attachment #9517067 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9517067 - Attachment description: Bug 1990978 - Bring back the snackbar with Undo button for when a history item is deleted → Bug 1990978 - Bring back the snackbar with Undo button for when a history item is deleted r=android-reviewers,jonalmeida
Attached video Edited_20251001_134327.mp4 โ€”

Hi,

I've tested this in the latest Nightly build (2025-10-01) with the following results:

  • The snackbar is displayed after one or more history item(s) is/are deleted;
  • The Undo button works as expected, the deleted items are redisplayed on Undo;
  • After waiting for the ~5 seconds for the snackbar no longer be displayed, then closing and opening the app, the deleted item(s) remain(s) deleted;
  • Closing and reopening the app while the snackbar is still displayed results in the deleted item to be displayed again.

Tested devices: Samsung Galaxy S23 Ultra and OnePlus 12R (Android 15).

Since the snackbar was the focus in this ticket, and it's correctly displayed and works correctly, I will mark the ticket as verified on 145. Leaving the original issue (redisplayed history item on closing-reopening in a given time) to be addressed in a different ticket.

Attached video Recording_20251001_134521.mp4 โ€”
Flags: qe-verify+

Tested on the latest Beta build as well (144.0b8).

The results were identical to the ones in Nightly, described above.

Tested devices: Samsung Galaxy S23 Ultra and OnePlus 12R (Android 15).

Marking the ticket as Verified on 144 as well.

Status: RESOLVED → VERIFIED

Please add a release uplift request on this. I'm thinking about spinning an Android 143.0.4 release tomorrow to address this and another frequent crash.

Flags: needinfo?(gmalekpour)
See Also: → 1991963

firefox-release Uplift Approval Request

  • User impact if declined: Without this patch if user deletes one or multiple items from their search history, we visually remove those from the list, but as soon as they restart the app, those items will reappear. This can leak personal browsing info and have disastrous impacts on users' privacy.
  • Code covered by automated testing: yes
  • Fix verified in Nightly: yes
  • Needs manual QE test: yes
  • Steps to reproduce for manual QE testing: Listed in the ticket: https://bugzilla.mozilla.org/show_bug.cgi?id=1990978
  • Risk associated with taking this patch: low
  • Explanation of risk level: We are reverting a patch
  • String changes made/needed: 2 strings that were previously marked as unused are reintroduced back.
  • Is Android affected?: yes
Attachment #9517553 - Flags: approval-mozilla-release?
Flags: qe-verify+

This patch essentially reverts this change from back in 143: https://phabricator.services.mozilla.com/D255847

The original patch removed the snackbar that was shown when user deleted one or multiple history items from the list. The complexity here lies in the fact that even though we visually remove the item from the list, under the hood we do not actually remove the item(s) until the snackbar is shown and has gone away. Instead, we add the item(s) to a pending list to be deleted "eventually".

Since the original patch simply removed the snackbar visually but did not actually change the logic under the hood to perform the deletion immediately, once user restarts the app, all of their presumably deleted history would reappear.

Given the severity of this issue I am going to reintroduce the snackbar to resolve this since it's the fastest and safest solution. We can then look into updating the entire logic stack to honor deletions immediately.

Original Revision: https://phabricator.services.mozilla.com/D266738

Flags: needinfo?(gmalekpour)
Attachment #9517553 - Flags: approval-mozilla-release? → approval-mozilla-release+

Added to the 143.0.4 relnotes.

Tested on the latest RC build as well (143.0.4).

The results were identical to the ones in Nightly and Beta described above.

Tested devices: Samsung Galaxy S23 Ultra and OnePlus 12R (Android 15).

Marking the ticket as Verified on 143 as well.

Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: