webextensions-examples icon indicating copy to clipboard operation
webextensions-examples copied to clipboard

native-messaging app json file points to wrong file

Open Stack-of-Pancakes opened this issue 6 years ago • 1 comments

Either the webextensions-examples/native-messaging/app/ping_pong.json "path" key should be pointing to the .py file and the webextensions-examples/native-messaging/check_config_win.py is incorrect or vice-versa.

Currently the webextensions-examples/native-messaging/check_config_win.py checks the ping_pong.json file and gets the "path" key, which it assumes is the webextensions-examples/native-messaging/app/ping_pong_win.bat file. Then it fails when it is unable to find a line that starts with "call python". This can be corrected by changing the "path" value to end with "ping_pong_win.bat".

Stack-of-Pancakes avatar Mar 16 '18 19:03 Stack-of-Pancakes

native messaging for windows check script fails like so:

C:\Users\user>cd C:\Users\user\Documents\webextensions-examples-master\native-messaging

C:\Users\user\Documents\webextensions-examples-master\native-messaging>check_config_win.py
Traceback (most recent call last):
  File "C:\Users\user\Documents\webextensions-examples-master\native-messaging\check_config_win.py", line 22, in <module>
    key = winreg.OpenKey(getattr(winreg, root), key_path)
FileNotFoundError: [WinError 2] The system cannot find the file specified

I have reg key Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\NativeMessagingHosts\ping_pong

with value C:\Users\user\Documents\webextensions-examples-master\native-messaging\app\ping_pong.json

In addition, the wording at https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_manifests#Manifest_location is ambiguous

njamescouk avatar Nov 01 '19 23:11 njamescouk

No activity within the last three years, closing.

rebloor avatar Jul 31 '23 00:07 rebloor