What is Native Messaging Host?

5,542 views
Skip to first unread message

Vidya Pawar

unread,
Feb 11, 2014, 2:07:16 PM2/11/14
to chromium-...@chromium.org
Hi,

What is Native Messaging Host on Chrome?

I do have a Linux command line utility which accesses system files and CPU registers to display the CPU information this works fine with no changes on the Chrome Shell.

Now I want  to develop the same features on Chrome with the GUI, so Trying to find out by which is the best way to create a Chrome app

I am trying to see if I could use Native Messaging API , so that I could connect the command line Linux version to Chrome app?

Is it a feasible way.? so have gone through the links below




But Not able to find 'WHAT IS NATIVE MESSAGING HOST' ?

Can you please give some working example of Native Messaging host  on Linux ?

Thank you in advance!

Thanks and Regards,
-Vidya

David P. Caldwell

unread,
Feb 11, 2014, 3:22:06 PM2/11/14
to Vidya Pawar, chromium-...@chromium.org
--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/826322b2-0408-47fa-ab97-caa95996d2c0%40chromium.org.
For more options, visit https://groups.google.com/a/chromium.org/groups/opt_out.

Vidya Pawar

unread,
Feb 11, 2014, 7:55:35 PM2/11/14
to David P. Caldwell, chromium-...@chromium.org
Hi David,

Thank you for the quick reply.

I am able to see the extension in the Chrome ->Settings->Extensions section.

It has the Relaod (Ctrl+R) option but not the Launch option?

I believe it is same extension as given in the link below



Now, How can I run this extension  ?

Thanks and Regards,
-Vidya
--
-Vidya

Rajesh Katalkar

unread,
Feb 12, 2014, 1:19:50 AM2/12/14
to Vidya Pawar, David P. Caldwell, Chromium-extensions
Vidya, that example is not extension but an chrome app.You will see "Apps" button below chrome addressbar..just click and then you see app icons .click on it and it will start


Vidya Pawar

unread,
Feb 12, 2014, 4:38:54 PM2/12/14
to chromium-...@chromium.org
Thank you Rajesh! 
Now I see the app under app section.

It loads the main.html but after loading the app I am getting  following JavaScript error in the 'Console' section

Uncaught SyntaxError: Invald regular expression: missing /

the com.google.chrome.example.echo.json is copied to appropriate location under my Linux system as below

/etc.opt/chrome/native-messaging-hosts 

After searching about this , I got couple of solutions but still not able to fix this issue.

You have any idea what me causing the issue

Vidya Pawar

unread,
Feb 12, 2014, 7:04:34 PM2/12/14
to chromium-...@chromium.org
Hi ,
I have now resolved the Javascript issue.

Now while sending the message to Naive host it gives me following error

Failed to connect : Error when communicating with the native messaging host.

in debugging I found that the port object's 'Name' attribute has " " value.

any thoughts what might e causing this issue?

Thank you in advance!

Thanks and Regards,
-Vidya


--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/.



--
-Vidya

Reply all
Reply to author
Forward
0 new messages