[PR #502] [MERGED] Detect and surface plugin runtime crashes #3351

Closed
opened 2026-07-15 02:03:01 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mountain-loop/yaak/pull/502
Author: @gschier
Created: 7/9/2026
Status: Merged
Merged: 7/9/2026
Merged by: @gschier

Base: mainHead: surface-plugin-runtime-crashes


📝 Commits (4)

  • 085a325 Detect and surface plugin runtime crashes
  • c3d8822 Merge branch 'main' into surface-plugin-runtime-crashes
  • af3b020 Show toast for all plugin runtime crashes instead of exiting
  • b0edfff Collapse runtime crash signaling to a single watch channel

📊 Changes

3 files changed (+87 additions, -20 deletions)

View changed files

📝 crates-tauri/yaak-app-client/src/plugins_ext.rs (+25 -1)
📝 crates/yaak-plugins/src/manager.rs (+37 -9)
📝 crates/yaak-plugins/src/nodejs.rs (+25 -10)

📄 Description

What

The plugin runtime child process was never monitored after spawning. If it died, the app hung forever at "Waiting for plugins to initialize" with nothing in the logs and no window shown.

Hit in dev when macOS 27 killed the vendored node binary for an invalid code signature — a silent SIGKILL at exec, so the runtime produced zero output.

How

The app is usable without the plugin runtime (just with missing features), so a runtime crash never takes the app down:

  • nodejs.rs — the spawn task now select!s between the kill signal and child.wait(), logging Plugin runtime exited unexpectedly (<status>) and reporting the exit through a channel
  • manager.rs — a runtime exit unblocks startup (plugin initialization is skipped) and the exit status is exposed via take_runtime_crash_rx()
  • plugins_ext.rs — a persistent danger toast shows the crash; if it happens during startup, the toast waits for a window to exist before showing

Testing

  • Stripped the signature from the vendored yaaknode (reproduces the SIGKILL): app starts plugin-less, logs the error, and shows the toast
  • kill -9 on the runtime while the app is running: toast appears, app stays up

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mountain-loop/yaak/pull/502 **Author:** [@gschier](https://github.com/gschier) **Created:** 7/9/2026 **Status:** ✅ Merged **Merged:** 7/9/2026 **Merged by:** [@gschier](https://github.com/gschier) **Base:** `main` ← **Head:** `surface-plugin-runtime-crashes` --- ### 📝 Commits (4) - [`085a325`](https://github.com/mountain-loop/yaak/commit/085a3252e2542ef434637ffd0b2ed9350d966840) Detect and surface plugin runtime crashes - [`c3d8822`](https://github.com/mountain-loop/yaak/commit/c3d8822452d32713f556016ddba59bc7c00ded04) Merge branch 'main' into surface-plugin-runtime-crashes - [`af3b020`](https://github.com/mountain-loop/yaak/commit/af3b020b798c53dbfa9715d9cbe6e9b593236caa) Show toast for all plugin runtime crashes instead of exiting - [`b0edfff`](https://github.com/mountain-loop/yaak/commit/b0edfffadfcbfc563182d06325660731b66ff5c7) Collapse runtime crash signaling to a single watch channel ### 📊 Changes **3 files changed** (+87 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `crates-tauri/yaak-app-client/src/plugins_ext.rs` (+25 -1) 📝 `crates/yaak-plugins/src/manager.rs` (+37 -9) 📝 `crates/yaak-plugins/src/nodejs.rs` (+25 -10) </details> ### 📄 Description ## What The plugin runtime child process was never monitored after spawning. If it died, the app hung forever at "Waiting for plugins to initialize" with nothing in the logs and no window shown. Hit in dev when macOS 27 killed the vendored node binary for an invalid code signature — a silent SIGKILL at exec, so the runtime produced zero output. ## How The app is usable without the plugin runtime (just with missing features), so a runtime crash never takes the app down: - `nodejs.rs` — the spawn task now `select!`s between the kill signal and `child.wait()`, logging `Plugin runtime exited unexpectedly (<status>)` and reporting the exit through a channel - `manager.rs` — a runtime exit unblocks startup (plugin initialization is skipped) and the exit status is exposed via `take_runtime_crash_rx()` - `plugins_ext.rs` — a persistent danger toast shows the crash; if it happens during startup, the toast waits for a window to exist before showing ## Testing - Stripped the signature from the vendored `yaaknode` (reproduces the SIGKILL): app starts plugin-less, logs the error, and shows the toast - `kill -9` on the runtime while the app is running: toast appears, app stays up --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-07-15 02:03:01 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/yaak#3351