I\'m trying to receive a message from my chrome extension via native messaging. The popup.html
console indicates that the message is being sent, but my host is
In order to get my extension working, I followed the following steps:
Although unnecessary,host.exe
really only needed to receive one message from the extension, so I changed my previous "open port" messaging to a "no port" message, i.e.
chrome.runtime.sendNativeMessage(...);
Importantly, when I changed the text I was sending from {"text":data[0]}
to a simple string {"text":"Hello from Chrome!"}
, everything began working smoothly. data[0]
was a string of about 250KB, which should definitely be an acceptable message size according to the developer's site. However, I have created a different question for this problem, as I was able to solve the general message sending and receiving problem I was experiencing.