You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
WSL: toasts never appear after a fresh install until snoretoast-x64.exe is chmod +x #151
WSL: toasts never appear after a fresh install until snoretoast-x64.exe is chmod +x
Summary
On WSL2, a fresh install of the plugin never shows Windows toast notifications. The
failure is silent, even with OPENCODE_NOTIFIER_DEBUG=1.
node-notifier's bundled snoretoast-x64.exe is unpacked with mode 0644. WSL2 still
enforces the Unix execute bit when launching a Windows binary, so every toast spawn
fails with EACCES. WindowsToaster only forwards errors whose code === -1, so the
error is swallowed and the plugin's callback never sees a failure. chmod +x on the
binary fixes it until the next plugin update re-extracts the cache.
Environment
OS: WSL2, Ubuntu 26.04
Windows: Windows 11 Home, 10.0.26300.9974
Terminal: Windows Terminal
OpenCode: v2.3.0
Plugin: @mohak34/opencode-notifier@1.1.2
Reproduction
Start from a WSL2 environment where the plugin has not been installed before, so no
prior chmod exists.
Install @mohak34/opencode-notifier@1.1.2 and trigger any notification event
(completion, permission, or error).
No toast appears and OpenCode logs nothing.
$ ls -l ~/.cache/opencode/npm/@mohak34/opencode-notifier@latest/*/node_modules/node-notifier/vendor/snoreToast/-rw-r--r-- 1 cardi cardi 2519032 ... snoretoast-x64.exe-rw-r--r-- 1 cardi cardi 2065912 ... snoretoast-x86.exe
$ ./snoretoast-x64.exe -helpbash: ./snoretoast-x64.exe: Permission denied
$ chmod +x snoretoast-x64.exe # toasts then work
Root cause
The node-notifier repository stores both executables as 100755, but the published npm
tarball contains them as 0644 (npm normalizes file modes on publish):
This is the WSL case documented in node-notifier's README and issue mikaelbr/node-notifier#353.
The README here links that note, but it requires users to discover it and repeat the chmod after every plugin update.
Proposed fix
Restore the execute bit when the plugin loads on WSL, before WindowsToaster is
constructed. The same workaround is already used by a local plugin, and it fixes the
clean-install case end to end. PR follows.
Activity