[chrome-native-messaging] Chrome extension Error when communicating

1,298 views
Skip to first unread message

Michael L

unread,
Feb 5, 2014, 4:12:42 AM2/5/14
to chromium-...@chromium.org
Hello,trying to convert from NPAPI to Native Messaging I have encountered some problems.
Basically this is what i am doing:
  • Extension starts the  connection to natives messaging host(.exe ,written in c++) from background page,when the page loads
  • Native messaging host has a while loop and is supposed to read messages from stdin
    What happens is ,when the page loads the port connects and disconnects very fast(lastError is Error when communicating with the native messaging host.) and the host receives EOF directly.However,if when the background page loads I send some data to the messaging host via postMessage the host receives the data but disconnects after a few messages,same error ,the host receives EOF.This number of 'tries' is variable ,even when i test it with the same data sent.

Another problem,not quite important(I managed to find a workaround,not so good) is downloading a file from the native host(for Windows) breaks the connection.I am using the WinApi function UrlDownloadToFile.

Vidya Pawar

unread,
Feb 12, 2014, 7:42:02 PM2/12/14
to chromium-...@chromium.org
Hi,

I am getting the same issue with the sample app given in the link below,


Can you provide your inputs?

Thanks and Regards,
-Vidya

Michael L

unread,
Mar 26, 2014, 9:57:47 AM3/26/14
to chromium-...@chromium.org
Hi,my input was something like:
and id,url,binary_data(image buffer);
Reply all
Reply to author
Forward
0 new messages