Skip to content

Recover screenshots after app reinstall or update#408

Merged
passsy merged 1 commit into
stablefrom
recover-screenshots-after-reinstall
Jun 8, 2026
Merged

Recover screenshots after app reinstall or update#408
passsy merged 1 commit into
stablefrom
recover-screenshots-after-reinstall

Conversation

@passsy

@passsy passsy commented Jun 8, 2026

Copy link
Copy Markdown
Member

Problem

Screenshots vanished from feedback submitted after an app reinstall or update.

On iOS the data container GUID is reassigned on every install (Apple TN2406). The absolute screenshot path persisted at capture time points at a directory that no longer exists — even though the file itself was migrated under the same name. When loading pending feedback, the file couldn't be found and the screenshot was dropped.

Fix

retrieveAllPendingItems now rebuilds each on-disk screenshot path from the current documents directory and the persisted file name, instead of trusting the stored absolute path.

The current directory is resolved lazily — only when an item actually has a screenshot on disk — so screenshot-less feedback (the common case) never touches the path_provider platform channel.

Before

stored path:  /var/.../<OLD-GUID>/screenshots/abc.png   → missing → screenshot lost

After

rebuilt path: /var/.../<NEW-GUID>/screenshots/abc.png   → found → screenshot recovered

Tests

  • New unit test in pending_feedback_item_storage_test.dart simulating the iOS container path change (TN2406).
  • offline_feedback_test.dart covers v2/v3 offline feedback with screenshots end-to-end.

Screenshots vanished from feedback submitted after an app
reinstall or update. On iOS the data container GUID is reassigned
on every install (Apple TN2406), so the absolute path persisted at
capture time points at a directory that no longer exists, even
though the file itself was migrated under the same name.

retrieveAllPendingItems now rebuilds each on-disk screenshot path
from the current documents directory and the persisted file name.
The directory is resolved only when an item actually has a
screenshot on disk, so screenshot-less feedback never touches the
path_provider channel.
@passsy passsy force-pushed the recover-screenshots-after-reinstall branch from 5f99b32 to 48ffb3f Compare June 8, 2026 12:52
@passsy passsy merged commit a678548 into stable Jun 8, 2026
8 checks passed
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