Repository navigation
Description
Summary
When voice transcription fails in the bb iOS app, the "Voice input failed" toast offers Download recording. Tapping it does nothing. The audio exists only in the page's memory, so once the toast is dismissed or the web view reloads, the recording is gone. The same button works in a desktop browser.
Versions and environment
- bb server 0.45.0 (
npx bb-app) on macOS, reached from the bb iOS app over Tailscale (no bb Connect). - iPhone on iOS 27.0.1, bb native app (production build).
- Transcription provider: Codex (ChatGPT sign-in).
- Code read at
main9a47d42.
Steps to reproduce
- In the bb iOS app, start voice input in any thread's composer and record a few seconds.
- Make transcription fail. Any failure works. Ours were Codex returning
HTTP 500: Error in ASR APIand a 10 s timeout. A reliable way is to stop the server's network access to chatgpt.com. - In the "Voice input failed" toast, tap Download recording.
Expected vs actual
- Expected: the recording is saved or offered through the iOS share sheet.
- Actual: nothing happens, with no error and no prompt.
Evidence
Root cause, from reading the code (not yet confirmed in a debugger):
- The toast's cancel action calls
downloadBlob(audioFile, audioFile.name):
bb/apps/app/src/hooks/useVoiceInput.ts
Lines 513 to 516 in 9a47d42
cancel: { label: "Download recording", onClick: () => downloadBlob(audioFile, audioFile.name), }, downloadBlobcreates ablob:object URL and clicks an<a download>:
https://github.com/get-bb/bb/blob/9a47d42c78ca9689af0b78da9b3155a8c0b36251/apps/app/src/lib/download-blob.ts- In the iOS app, that navigation goes through
onShouldStartLoadWithRequest. Ablob:URL is neither shell navigation nor "externally openable" (onlyhttp:,https:andmailto:are), so the handler returnsfalseand silently drops it:
bb/apps/mobile/src/screens/webview/ProfileWebViewScreen.tsx
Lines 342 to 348 in 9a47d42
onShouldStartLoadWithRequest={(request) => { if (isShellNavigation(request.url, profile.serverUrl)) return true; if (isExternallyOpenable(request.url)) { void Linking.openURL(request.url).catch(() => undefined); } return false; }}
bb/apps/mobile/src/lib/shell/shell-url.ts
Lines 57 to 66 in 9a47d42
export function isExternallyOpenable(url: string): boolean { try { const { protocol } = new URL(url); return ( protocol === "http:" || protocol === "https:" || protocol === "mailto:" ); } catch { return false; } } - Production builds set
webviewDebuggingEnabled={__DEV__}, so the audio cannot be recovered with Safari Web Inspector either. We tried over USB withios_webkit_debug_proxy: the device was listed, but it exposed no pages.
webviewDebuggingEnabled={__DEV__}
Server log for one failed attempt (~/.bb/logs/server.47.log, 2026-10-09):
{"level":40,"component":"server","task":"voice","serviceId":"codex","pluginId":"provider-codex","errorMessage":"Codex transcription request failed with HTTP 500: Error in ASR API","msg":"Voice transcription failed"}
{"level":30,"component":"server","task":"voice","serviceId":"codex","pluginId":"provider-codex","timeoutMs":10000,"msg":"Voice transcription timed out"}
Possible fix: route the failed recording to native code, for example over the mobile bridge, and present it with the iOS share sheet. Alternatively, have onShouldStartLoadWithRequest handle blob: downloads.
What you ruled out
- Not a duplicate of Voice transcription is lost when its composer unmounts #4236 (transcription lost when the composer unmounts) or Codex voice transcription times out at 10 s for notes over ~5 minutes #5016 (10 s timeout for long notes). Both are closed and cover different causes.
- The Retry action now on
main(useVoiceInput.ts#L501-L512) reduces how often this matters. It does not help once the toast is dismissed or the web view reloads, and it cannot help while the transcription service keeps failing. - Not reproduced live on a
mainbuild. The user hit it on 0.45.0, and the cause above is from reading the code onmain, which is unchanged in these paths.
Suggested priority and effort
The user loses work: an important voice note was lost with no workaround on iOS. This affects every iOS app user whose transcription fails. The fix is small to medium.
AGENT GENERATED
Activity
bb-slop-cop commentedon Oct 9, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotmobile,ui,partial-repro. All were missing and have been applied.blob:download anchor, with no native file handoff; the existing native share contract rejects blob/data URLs. The proposed blanket navigation rejection is incorrect: same-origin blob URLs are allowed on root mounts, but rejected on prefixed mounts.origin/main(6d3e82f35) produce identical diagnostic findings; each passes 17 probe/voice-hook tests, and the second passes 10 existing shell-URL tests. The second probe was forced, not cache replayed. Actual iOS saving and recording loss remain unverified.darknoon commentedon Oct 10, 2026
Human written:
My ideal resolution here would be that the composer offers a button to retry, instead of the current "download the file" flow, and that it gets saved in the composer until it's successfully transcribed.
Ie the user's data is not lost.
Keep failed voice recordings in the composer and retry with the origi…