Skip to content

fix unhandled exception crash when sharing WAL audio file#8028

Merged
kodjima33 merged 2 commits into
mainfrom
fix-share-wal-audio-crash
Jun 20, 2026
Merged

fix unhandled exception crash when sharing WAL audio file#8028
kodjima33 merged 2 commits into
mainfrom
fix-share-wal-audio-crash

Conversation

@krushnarout

@krushnarout krushnarout commented Jun 19, 2026

Copy link
Copy Markdown
Member

Problem

Crashlytics reported a fatal crash when sharing WAL audio files:

Fatal Exception: FlutterError - Exception: Unable to create shareable audio file
  AudioPlayerUtils.shareAsAudio (audio_player_utils.dart:200)
  SyncProvider.shareWalAsWav (sync_provider.dart:553)
  _WalItemDetailPageState._handleShare (wal_item_detail_page.dart:604)

Crashlytics: https://console.firebase.google.com/u/0/project/based-hardware/crashlytics/app/ios:com.friend-app-with-wearable.ios12/issues/f0be1b339c31954195a689fc6c4765ff

_handleShare had a try/finally but no catch — the exception thrown by shareAsAudio when the audio file can't be created propagated as an unhandled FlutterError and crashed the app.

Fix

  • Add a catch block in _handleShare to show a snackbar error instead of crashing
  • Remove dead _isSharing field and its two setState calls — the field was written but never read in the UI

Test plan

  • Share a WAL audio file — works normally
  • Simulate failure (corrupted/missing file) — shows error snackbar, no crash
  • Verify Crashlytics issue stops reproducing after rollout

🤖 Generated with Claude Code

Review in cubic

krushnarout and others added 2 commits June 19, 2026 22:14
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Re-trigger cubic

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mobile bug fix conf 5/5: catch share failure (was uncaught FlutterError crash) + show error snackbar

@kodjima33 kodjima33 merged commit 7a4d928 into main Jun 20, 2026
3 checks passed
@kodjima33 kodjima33 deleted the fix-share-wal-audio-crash branch June 20, 2026 14:34
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.

2 participants