-
Notifications
You must be signed in to change notification settings - Fork 2.7k
native messaging example: port disconnects without an error #560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It looks like this is your first issue. Welcome! 👋 One of the project maintainers will be with you as soon as possible. We appreciate your patience. To safeguard the health of the project, please take a moment to read our code of conduct. |
Came here to raise the same issue, this native messaging ping pong hello world demo is broken on Linux for me 👎 |
Broken on macOS Sonoma 14.5 and Firefox 128.0 as well. |
Is this broken as in "first time I tried and it didn't work" or "was working before and now it doesn't work anymore"? |
I reactivated an internal dev-plugin that I used about two years ago (https://github.com/sirthias/triggered-reload), which was working fine back then but doesn't work anymore with the latest FF. So the problem does look like a regression to me... |
Ah, one more detail: The only hunch that I currently have: |
@sirthias
|
Apple Silicon
Yes, the latest Sonoma 14.5
Nope, no errors or other clues.
Didn't know about |
Do you see anything interesting when you step through the debugger while debugging Firefox yourself? To do so:
If needed I am willing to have a Zoom meeting where you share your screen share to debug this issue together with you. |
Thank you, @Rob--W! When I give Since the native messaging example runs a python script the Note: Giving FF itself Full-Disk-Access is not sufficient. I guess FF starts the external binary detached from its own process tree and the external binary thus doesn't inherit FF's permissions. |
In my testing I was able to get the revised native messaging demo to work as expected as long as the Python script was not located in @sirthias, where was your native messaging host located? |
My external script lives somewhere deep below |
It does not work for me if I run the script from (this is on macOS sonoma 14.5 and firefox dev 129.0b2 - I havent tried it on linux) Edit: Ill give it a go later to see if Im getting the same error and also test it on regular firefox |
@epragalakis Have tried giving the python interpreter binary Full-Disk-Access, at least temporarily? |
I was reporting the bug from Linux for the record |
@epragalakis I just ran into this on macOS and personally that's because the diff --git a/native-messaging/app/ping_pong.py b/native-messaging/app/ping_pong.py
index e934380..2cf8779 100755
--- a/native-messaging/app/ping_pong.py
+++ b/native-messaging/app/ping_pong.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3 |
I havent tried this since I reported it but from what I remember I also attempted to run the test with a javascript file. Since I have a new setup, I will need to give this another go. edit: same error on linux. @willdurand both the python and python3 commands point to python 3. |
it works now on linux :) (worth noting that storing the manifest in the |
What information was incorrect, unhelpful, or incomplete?
the code example does not run on two different OS' and the documentation does not explain why.
What did you expect to see?
more complete and descriptive errors
Do you have any supporting links, references, or citations?
No response
Do you have anything more you want to share?
I'm trying to run this web-extension example: https://github.com/mdn/webextensions-examples/tree/main/native-messaging on Linux (latest firefox) and macOs (latest firefox dev) and on calling browser.runtime.connectNative('ping_pong'); I get a disconnect event with a null error object.
The text was updated successfully, but these errors were encountered: