Skip to content

fix(mobile): use legacy expo-media-library/file-system imports#29435

Merged
chrisnojima merged 1 commit into
masterfrom
nojima/HOTPOT-save-broken
Jul 18, 2026
Merged

fix(mobile): use legacy expo-media-library/file-system imports#29435
chrisnojima merged 1 commit into
masterfrom
nojima/HOTPOT-save-broken

Conversation

@chrisnojima

Copy link
Copy Markdown
Contributor

Problem

Saving images from chat on iOS broke after the expo 57 bump: the download bar fills, then nothing happens and the transfer indicator stays stuck.

Root cause

expo 57 replaced the root-export legacy methods of expo-media-library and expo-file-system with deprecation shims that throw at runtime while keeping their TypeScript types, so tsc stayed green. MediaLibrary.saveToLibraryAsync threw immediately after download, which skipped setAttachmentMobileSaving(ordinal, false) and left the UI stuck. FileSystem.deleteAsync was also throwing (swallowed by a try/catch, leaking the temp file).

Fix

Import both modules from their /legacy subpaths, which keep the real implementations. The new class-based APIs (Asset.create(), File) are the eventual migration path, but Asset.create may require broader photo permissions than the add-only saveToLibraryAsync, so this keeps exact prior behavior.

Validation

  • yarn lint / yarn tsc pass
  • Manual: save image in chat on iOS → progress completes, toast shows, photo lands in camera roll

🤖 Generated with Claude Code

expo 57 root exports replace legacy methods (saveToLibraryAsync,
deleteAsync) with shims that throw at runtime while keeping their
types, so tsc stayed green. Save-to-camera-roll threw immediately
after download, leaving the progress bar stuck at 100% on iOS.
@chrisnojima
chrisnojima merged commit 249a01c into master Jul 18, 2026
1 check was pending
@chrisnojima
chrisnojima deleted the nojima/HOTPOT-save-broken branch July 18, 2026 19:00
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