asamuzaK / withExEditorHost

Native messaging host for withExEditor
MIT License
33 stars 8 forks source link

Red exclamation mark for unknown reason #83

Closed mb720 closed 4 years ago

mb720 commented 4 years ago

I think the upgrade to Firefox 74 broke withExEditor.

I get a red exclamation mark at withExEditor's icon in Firefox and nothing happens when I select "Edit Text with ..." from the context menu of a text area in Firefox. It says "Host Connection Connected" and "Host Version Compatible" in withExEditor's options. I'm using withExEditorHost 5.4.2 on Arch Linux.

Can you help me debug this?

asamuzaK commented 4 years ago

Any error logged in browser console? Any error notified?

asamuzaK commented 4 years ago

Also make sure that Editor Label input field is not disabled.

mb720 commented 4 years ago

Thanks for the instructions. I noticed that the Editor Label input field is disabled. This is what I see in the browser console after reloading the extension:

Error: Could not establish connection. Receiving end does not exist. content.js:1765:20
Error: Could not establish connection. Receiving end does not exist. content.js:1765:20
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. background.js:1
    sendRequestToSpecificTab moz-extension://8064b80e-e428-4c3d-a3c9-8adca186464e/js/background.js:1
LoginRecipes: getRecipes: falling back to a synchronous message for: moz-extension://153ec662-7966-4d01-bf21-801cd80c0eae LoginRecipes.jsm:265:9
No matching message handler for the given recipient. 2 MessageChannel.jsm:964
    _handleMessage resource://gre/modules/MessageChannel.jsm:964
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. background.js:1
    sendRequestToSpecificTab moz-extension://8064b80e-e428-4c3d-a3c9-8adca186464e/js/background.js:1
Error: Could not establish connection. Receiving end does not exist. 2 content.js:1765:20
asamuzaK commented 4 years ago

Run setup script again and see what happens.

BTW, those error logs are because the extension is reloaded. They are unrelated to this issue. If you reload tabs, they will be connected again.

mb720 commented 4 years ago

Ok, I ran the script again, reloaded the plugin and the tabs but I still get the red exclamation mark. Wait, I think I know what it is, I'm now assuming the error's on me. Give me a bit of time to verify this.

asamuzaK commented 4 years ago

A red exclamation mark appears when any of the following applies:

Check below:

mb720 commented 4 years ago

After switching terminal emulators from termite to kitty, I forgot to update my ~/.config/withexeditorhost/config/firefox/editorconfig.json.

I had to change it from

{
  "editorPath": "/usr/bin/termite",
  "cmdArgs": ["--exec=nvim ${file}"]
}

to

{
  "editorPath": "/usr/bin/kitty",
  "cmdArgs": ["nvim", "${file}"]
}

Sorry for taking up some of your time, but now I (and possible others) know what to check if there's a red exclamation mark.

This had nothing to do with the latest version of Firefox so I'll change the title of this issue.

asamuzaK commented 4 years ago

Refactored withExEditor options page to indicate editor state. capture