Kimple
Kimple

Reputation: 127

Attempt to postMessage on disconnected port

I was following this guide on native messaging, but now I've come to a stand-still. The developer console on Firefox keeps giving me the same error: "Attempt to postMessage on disconnected port" along with "Webconsole context has changed" before it.

enter image description here

I've checked the registries, the ping_pong registry key is in the correct place, HKEY_LOCAL_MACHINE\\SOFTWARE\\Mozilla\\NativeMessagingHosts\\ping_pong, and it's value is pointing to the location of my manifest.json file.

My extension id and "allowed_extensions" match.

I found this, and it did stop at the end saying I don't have a python script in the batch file, but that shouldn't be the cause of my error messages.

I have Firefox Quantum 61.0.2, if that's of any use.

What am I doing wrong?

Upvotes: 8

Views: 9577

Answers (1)

Leonid Shevtsov
Leonid Shevtsov

Reputation: 14189

This is a generic error and it means the native messaging host configuration is wrong. The specific error is logged in the Browser Console (Firefox Menu --> Web Developer --> Browser Console) and it is much more helpful.

(For me, the specific error was a typo in the native messaging manifest.)

(Discussed in: https://github.com/mdn/webextensions-examples/issues/266)

Upvotes: 7

Related Questions