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
Open nm_bun.json in a text editor, set "path" to absolute path of nm_bun.js and chrome-extension://<ID>/ using ID from 5 in "allowed_origins" array.
Copy the file to Chrome or Chromium configuration folder, e.g., Chromium on *nix ~/.config/chromium/NativeMessagingHosts; Chrome dev channel on *nix ~/.config/google-chrome-unstable/NativeMessagingHosts.
Make sure bun executable and nm_bun.js are executable.
To test click service worker link in panel of unpacked extension which is DevTools for background.js in MV3 ServiceWorker, observe echo'ed message from Bun Native Messaging host. To disconnect run port.disconnect().
The Native Messaging host echoes back the message passed.
The Array is never sent back to the Native Messaging client (Chromium 127 Developer Build).
Additional information
The same code still works nm_host.js still works using deno version 1.44. There are three (3) DevTools windows open in the screenshot; Bun Native Messaging extension window is on top, then Deno then Node.js. Notice the windows underneath have arrays with length at 209715 where the Bun host does not send back the message to the client and will exit when sending a sencond message
and node version v23.0.0-nightly20240526aaca18b54e. Deno and Node.js handle subsequent messages.
The text was updated successfully, but these errors were encountered:
guest271314
changed the title
Native Messaging host not working, essentially the same code works using Deno and Node.js
Bun.stdin.stream() and Bun.file(0).stream() consistently hang on 983036 bytes of 1048576 bytes expected
Jun 4, 2024
guest271314
added a commit
to guest271314/NativeMessagingHosts
that referenced
this issue
Jun 4, 2024
What version of Bun is running?
v1.1.12 i
What platform is your computer?
x64
What steps can reproduce the bug?
Follow these instructions https://github.com/guest271314/native-messaging-bun/tree/main
Point to this Native Messaging host https://github.com/guest271314/NativeMessagingHosts/blob/4878edcb14401d3f2b5aac08448f8e0f0916956a/nm_host.js in
nm_bun.js
where all that is needed is the shebang lineWhat is the expected behavior?
Bun Native Messaging host to echo back an
Array
having length209715
based on https://github.com/guest271314/native-messaging-bun/blob/main/background.js#L6C1-L6C37The same code run in Bun, Deno, and Node.js runtime environments worked as of this commit guest271314/NativeMessagingHosts@4878edc
What do you see instead?
The
Array
is never sent back to the Native Messaging client (Chromium 127 Developer Build).Additional information
The same code still works
nm_host.js
still works usingdeno
version 1.44. There are three (3) DevTools windows open in the screenshot; Bun Native Messaging extension window is on top, then Deno then Node.js. Notice the windows underneath have arrays with length at 209715 where the Bun host does not send back the message to the client and will exit when sending a sencond messageand
node
version v23.0.0-nightly20240526aaca18b54e. Deno and Node.js handle subsequent messages.The text was updated successfully, but these errors were encountered: