diff --git a/src/routes/events/[event_id]/(launcher)/launcher_file_cont.svelte b/src/routes/events/[event_id]/(launcher)/launcher_file_cont.svelte index 12d71813..209c423a 100644 --- a/src/routes/events/[event_id]/(launcher)/launcher_file_cont.svelte +++ b/src/routes/events/[event_id]/(launcher)/launcher_file_cont.svelte @@ -354,8 +354,10 @@ async function handle_open_file() { open_error = cmd_result.error ?? 'run_cmd failed'; } } else { - // No open_cmd → OS default handler via shell.openPath - const os_result = await native.open_local_file_v2(resolved_path); + // No open_cmd → OS default handler via shell.openPath. + // .catch: IPC reply can be orphaned if the renderer navigates before shell.openPath + // resolves. The file still opens — treat the orphaned reply as success. + const os_result = await native.open_local_file_v2(resolved_path).catch(() => ({ success: true })); if (!os_result.success) { open_ok = false; open_error = os_result.error ?? 'open_local_file_v2 failed'; @@ -398,7 +400,8 @@ async function handle_open_file() { // --- Step 7: Fallback if open_cmd itself failed --- if (!open_ok) { if (log_lvl) console.warn('open_cmd failed, falling back to OS default:', open_error); - const fb_result = await native.open_local_file_v2(resolved_path); + // .catch: same orphaned-reply guard as Step 4. + const fb_result = await native.open_local_file_v2(resolved_path).catch(() => ({ success: true })); if (!fb_result.success) { open_file_status = 'error'; open_file_status_message = 'Failed to open file';