Both MDN Native Messaging example and Google Chrome extension samples had a bug in the Python implementation of the Native Messaging host.
Native Messaging host can send 1MB of data to the client (browser) per message.
The Python code was counting space characters.
Additionally, using python
alone in a shell script, and not using
python3
will fail on systems that do not have python
in PATH
,