mdn / content

The content behind MDN Web Docs
https://developer.mozilla.org
Other
9.23k stars 22.5k forks source link

nm_nodejs.mjs example is not running on firefox linux #36513

Open epragalakis opened 1 month ago

epragalakis commented 1 month ago

MDN URL

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_messaging

What information was incorrect, unhelpful, or incomplete?

Im not able to receive and send messages with the example provided.

What did you expect to see?

For reference, this python example runs as expected: https://github.com/mdn/webextensions-examples/tree/main/native-messaging

Do you have anything more you want to share?

MDN metadata

Page report details * Folder: `en-us/mozilla/add-ons/webextensions/native_messaging` * MDN URL: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_messaging * GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/mozilla/add-ons/webextensions/native_messaging/index.md * Last commit: https://github.com/mdn/content/commit/d7143e171b5f18fb37a686a7d4947db417fd74f3 * Document last modified: 2024-09-10T05:12:00.000Z
Josh-Cena commented 1 month ago

Do you think it has something to do with our use of /proc/${process.pid}/fd/1? What's your OS and what's the exact errors you are getting in your console?

epragalakis commented 4 weeks ago

I'm on fedora 40. There arent more exact errors from what I mentioned above.

~Do you know why the example uses fs instead of process.stdin/stdout ?~ edit: nvm I think you already answered that here: https://github.com/mdn/content/pull/27228#issuecomment-2438643594

does it work for you?