Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for Uncaught Exception and Crash, Lost Messages in Unsynchronized Local-Only Folders #8655

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

dnicules
Copy link

@dnicules dnicules commented Dec 9, 2024

These are our fixes to address issues #7688 and #823

Uncaught Exception, Crash: Issue #7688
Problem:

  • Previously, if a user goes offline, moves a message into another folder, opens the message, and stars/unstars it, the app would consistently crash
    • This did NOT happen when a message was starred/unstarred from the List View.

Solution:

  • Now we catch an exception in queueSetFlag() to avoid the crash; this is how it is handled in List View.
    • List View catches the exception in runInBackground()

"Lost" Messages in Unsynchronized, Local-Only Folders: Issue #823
Problem:

  • A user using Thunderbird with an account having no archive folder reported that, on moving a message to archive, they were not able to move it elsewhere in any way; the message effectively became local-only and lost to the server.
  • Potentially happens with other folders that only exist locally but not on the server

Solution:

  • Online Fix: If a user has connectivity, refresh the folder list before making any move operations
  • Offline Fix: A dialog/prompt shows up, informing the user that the operation might lead to data loss
    • The user is allowed to proceed anyways, cancel the operation, or to proceed and never show the warning again
  • Applies to moving (to arbitrary folders, or also to drafts and spam), copying, archiving.

Authors: @dnicules @gkhourii

Fixed uncaught exception which, under a certain edge case (Issue thunderbird#7688) starring or unstarring a message explicitly in Message View after moving it offline may cause the app to crash.
- Catch exception in queueSetFlag created in call to pendingSetFlag.create()
- Mimics behavior of starring/unstarring a message in List View
Added verification for moving messages into other folders (in response to Issue thunderbird#823)
- Currently, users can move messages into local-only folders which don't exist server-side, may end up with messages stuck in these local folders and effectively lost
- When online, refresh the folder list prior to moving; prevent messages ending up in "dead" unsynced folders which do not exist server-side
- When offline, provide the user with a warning saying that "ThunderBird is not connected to the Internet. Any changes you make now may not be synced properly."
    - Users may proceed anyways, cancel the move/copy/draft/archive/spam operation, or "don't show again" and always proceed anyways
Added verification for moving messages into other folders (in response to Issue thunderbird#823)
- Currently, users can move messages into local-only folders which don't exist server-side, may end up with messages stuck in these local folders and effectively lost
- When online, refresh the folder list prior to moving; prevent messages ending up in "dead" unsynced folders which do not exist server-side
- When offline, provide the user with a warning saying that "ThunderBird is not connected to the Internet. Any changes you make now may not be synced properly."
    - Users may proceed anyways, cancel the move/copy/draft/archive/spam operation, or "don't show again" and always proceed anyways
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant