<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Porting Extension from Chrome : macOS Native Messaging]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">I'm trying to port my Chrome extension to Opera.  It uses <a href="https://dev.opera.com/extensions/message-passing/" target="_blank" rel="noopener noreferrer nofollow ugc">Native Messaging</a> to communicate with my native Macintosh (macOS) application.  It's not working in Opera.</p>
<p dir="auto">The line of JavaScript code which is supposed to open a port,<br />
port = chrome.runtime.connectNative(hostName);<br />
executes successfully (without raising) in a try{} block, and returns what appears to be a port object, but my messaging tool does not launch.</p>
<p dir="auto">In looking at <a href="https://dev.opera.com/extensions/message-passing/" target="_blank" rel="noopener noreferrer nofollow ugc">that documentation</a>, I find it strange that my I am told to install my special manifest file here:<br />
/Library/Google/Chrome/NativeMessagingHosts/com.my_company.my_application.json<br />
First of all, this is, eeeek, in the Google/Chrome subdirectory, which seems like the wrong company :))  Second, because this path does not begin with a tilde (~) it is, eeeek, in a system-admin level directory.  Because of this, I had to enter my administrator password twice in order to create the folder and put it there.  Google Chrome gives you the option to put it in the user's directory instead, which I do for my Chrome extension.</p>
<p dir="auto">Is this just a copy and paste error from the Chrome documentation?  If so, what is the correct location for the special manifest .json file?<br />
Has anyone ever tested or used an Opera extension with Native Messaging on a Macintosh?</p>
<p dir="auto">Thanks!</p>
]]></description><link>https://forums.opera.com/topic/15735/porting-extension-from-chrome-macos-native-messaging</link><generator>RSS for Node</generator><lastBuildDate>Thu, 13 Aug 2026 07:02:10 GMT</lastBuildDate><atom:link href="https://forums.opera.com/topic/15735.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 15 Jun 2016 02:10:59 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Porting Extension from Chrome : macOS Native Messaging on Tue, 28 Jun 2016 07:38:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forums.opera.com/uid/11576">@shwetankdixit</a>, I don't see anything about Linux mentioned in the documentation.</p>
<p dir="auto">On my DNA-23526 bug-report I got this answer:</p>
<pre><code>Could you try using following paths
/etc/chromium/native-messaging-hosts
or:
&lt;OPERA_PROFILE_DIR&gt;/NativeMessagingHosts
Profile path will be displayed on opera:about page.`
</code></pre>
<p dir="auto">Opera:about doesn't show anything about a google-chrome path, but mentioned path worked at that moment. Please don't blame me for filing more bug reports when it stopped working. The path really changed between versions, without documentation or rationale.</p>
<p dir="auto">And it feels wrong and risky:<br />
If Google-Chrome isn't installed, the google-chrome path is a path any program can create/write to.</p>
<p dir="auto">And when you have Chrome installed and decide to drop it because you prefer Opera, and remove Chrome and all of it's settings, suddenly Opera fails. Doesn't make sense to me.</p>
]]></description><link>https://forums.opera.com/post/102113</link><guid isPermaLink="true">https://forums.opera.com/post/102113</guid><dc:creator><![CDATA[janghou]]></dc:creator><pubDate>Tue, 28 Jun 2016 07:38:08 GMT</pubDate></item><item><title><![CDATA[Reply to Porting Extension from Chrome : macOS Native Messaging on Fri, 24 Jun 2016 08:25:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forums.opera.com/uid/137869">@jerrykrinock</a> please check again <img src="https://forums.opera.com/assets/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=qqje97jok90" class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face" title=":)" alt="🙂" /> It should be there ...</p>
]]></description><link>https://forums.opera.com/post/101913</link><guid isPermaLink="true">https://forums.opera.com/post/101913</guid><dc:creator><![CDATA[shwetankdixit]]></dc:creator><pubDate>Fri, 24 Jun 2016 08:25:05 GMT</pubDate></item><item><title><![CDATA[Reply to Porting Extension from Chrome : macOS Native Messaging on Wed, 22 Jun 2016 18:58:23 GMT]]></title><description><![CDATA[<p dir="auto">Thank you, <a class="plugin-mentions-user plugin-mentions-a" href="https://forums.opera.com/uid/11576">@shwetankdixit</a>.  Maybe your changes have not been published yet, but in the documentation I still see this path:</p>
<p dir="auto"><code>/Library/Google/Chrome/NativeMessagingHosts/...</code></p>
<p dir="auto">That should be corrected to:</p>
<p dir="auto"><code>~/Library/Application Support/Google/Chrome/NativeMessagingHosts/...</code></p>
]]></description><link>https://forums.opera.com/post/101841</link><guid isPermaLink="true">https://forums.opera.com/post/101841</guid><dc:creator><![CDATA[jerrykrinock]]></dc:creator><pubDate>Wed, 22 Jun 2016 18:58:23 GMT</pubDate></item><item><title><![CDATA[Reply to Porting Extension from Chrome : macOS Native Messaging on Wed, 22 Jun 2016 13:11:41 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="https://forums.opera.com/uid/137869">@jerrykrinock</a></p>
<p dir="auto">Native messaging is supposed to work as mentioned in the documentation. I've made some minor fixes in the docs, but the point remains that right now Opera looks for the chrome directory. We're re-evaluating again on whether to change this approach or not, but so far, as you have also experienced, it works as is.</p>
]]></description><link>https://forums.opera.com/post/101829</link><guid isPermaLink="true">https://forums.opera.com/post/101829</guid><dc:creator><![CDATA[shwetankdixit]]></dc:creator><pubDate>Wed, 22 Jun 2016 13:11:41 GMT</pubDate></item><item><title><![CDATA[Reply to Porting Extension from Chrome : macOS Native Messaging on Tue, 21 Jun 2016 23:38:16 GMT]]></title><description><![CDATA[<p dir="auto">I'm not quite done yet but, so far, it looks like putting my Native Messaging manifest file in Google Chrome's Application Support folder in the user's Home directory is going to work.</p>
<p dir="auto">So I've sent an update to DNAWIZ-3797  (My previous comment had wrong DNA number.)</p>
]]></description><link>https://forums.opera.com/post/101805</link><guid isPermaLink="true">https://forums.opera.com/post/101805</guid><dc:creator><![CDATA[jerrykrinock]]></dc:creator><pubDate>Tue, 21 Jun 2016 23:38:16 GMT</pubDate></item><item><title><![CDATA[Reply to Porting Extension from Chrome : macOS Native Messaging on Tue, 21 Jun 2016 19:10:49 GMT]]></title><description><![CDATA[<p dir="auto">@kszularz:  Thank you, and please read on.</p>
<p dir="auto">@janghour:  Sorry I didn't quite understand your first posts.  As I said earlier, my extension did not launch its native messaging tool when I installed a Native Messaging manifest file in the /Library/Google/Chrome… system directory as specified in the documentation, nor when I installed it in any reasonable Opera directory.  However, just now I added the ID of the extension installed in Opera to the <code>allowed_origins</code> in Native Messaging manifest file I have installed for Chrome,</p>
<p dir="auto"><code>~/Library/Application Support/Google/Chrome/NativeMessagingHosts</code></p>
<p dir="auto">and now, amazingly, my native messaging tool launches as expected when Opera loads my extension!  My plans were to use the same native messaging tool for both Chrome and Opera, anyhow.</p>
<p dir="auto">So, @kszularz, although it looks ridiculous, this might work, <em>as is</em>.  I shall update my bug at DNAWIZ-3730 after doing some more testing.</p>
]]></description><link>https://forums.opera.com/post/101796</link><guid isPermaLink="true">https://forums.opera.com/post/101796</guid><dc:creator><![CDATA[jerrykrinock]]></dc:creator><pubDate>Tue, 21 Jun 2016 19:10:49 GMT</pubDate></item><item><title><![CDATA[Reply to Porting Extension from Chrome : macOS Native Messaging on Tue, 21 Jun 2016 16:10:46 GMT]]></title><description><![CDATA[<p dir="auto">@kszularz thx, maybe this can help, the bugs I filed on this issue:</p>
<ul>
<li>DNA-23526</li>
<li>DNA-43909</li>
<li>DNAWIZ-3730</li>
</ul>
]]></description><link>https://forums.opera.com/post/101788</link><guid isPermaLink="true">https://forums.opera.com/post/101788</guid><dc:creator><![CDATA[janghou]]></dc:creator><pubDate>Tue, 21 Jun 2016 16:10:46 GMT</pubDate></item><item><title><![CDATA[Reply to Porting Extension from Chrome : macOS Native Messaging on Tue, 21 Jun 2016 13:22:52 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">Big thanks for such a detailed investigation on this topic.</p>
<p dir="auto">I'm really sorry to hear this bug as well as errors in the documentation prevent you from writing great extensions for Opera.</p>
<p dir="auto">Now the big report is going to be reviewed by our QA team.</p>
]]></description><link>https://forums.opera.com/post/101782</link><guid isPermaLink="true">https://forums.opera.com/post/101782</guid><dc:creator><![CDATA[[[global:former_user]]]]></dc:creator><pubDate>Tue, 21 Jun 2016 13:22:52 GMT</pubDate></item><item><title><![CDATA[Reply to Porting Extension from Chrome : macOS Native Messaging on Tue, 21 Jun 2016 12:29:15 GMT]]></title><description><![CDATA[<p dir="auto">I agree, the documentation seems to be copied, and not updated. I can't imagine the path for a manifest should be a google path instead of it's own .config/opera path, although I agree that is reality, but I consider this a bug.</p>
<p dir="auto">What happens when you install your extensions, I can get them working using the Google Chrome path for the manifest.</p>
]]></description><link>https://forums.opera.com/post/101779</link><guid isPermaLink="true">https://forums.opera.com/post/101779</guid><dc:creator><![CDATA[janghou]]></dc:creator><pubDate>Tue, 21 Jun 2016 12:29:15 GMT</pubDate></item><item><title><![CDATA[Reply to Porting Extension from Chrome : macOS Native Messaging on Sat, 18 Jun 2016 22:11:08 GMT]]></title><description><![CDATA[<p dir="auto">After trying everything, I too have filed a new bug with the Opera Bug Wizard.  The Opera Bug Wizard did not give me a Bug Number.  All I got was this:</p>
<p dir="auto"><em>DNAWIZ-3797</em>.</p>
<p dir="auto">The remainder of this post is the text of my bug report.</p>
<hr />
<h3>Summary</h3>
<p dir="auto">I have developed browser extensions for many years, including one for Google Chrome, which uses their Native Messaging API.  Even though Vivaldi does not provide any documentation, it works in Vivaldi the same as it does in Chrome, with obvious changes.  I was able to install my extension and get it working in Vivaldi in less than an hour.  But I cannot get it to work in Opera, and after trying every reasonable variation on the ambiguities in the <a href="https://dev.opera.com/extensions/message-passing/" target="_blank" rel="noopener noreferrer nofollow ugc">documentation</a>, I have concluded that the Native Messaging API does not work in Opera when running in mac OS (OS X).  I am using Opera version 38.</p>
<h3>Details</h3>
<p dir="auto">When my extension runs in Opera, the line of JavaScript code which is supposed to open a port,</p>
<pre><code>port = chrome.runtime.connectNative(hostName);
</code></pre>
<p dir="auto">executes successfully (without raising) in a try{} block, and returns what appears to be a port object, but its properties are rather empty, and my native binary does not launch, as it does when my extension runs in Google Chrome or Vivaldi.</p>
<p dir="auto">In looking at that <a href="https://dev.opera.com/extensions/message-passing/" target="_blank" rel="noopener noreferrer nofollow ugc">documentation</a>, I find it strange that my I am told to install my Native Messaging manifest file here:</p>
<ul>
<li>/Library/Google/Chrome/NativeMessagingHosts/com.mycompany.myapplication.json</li>
</ul>
<p dir="auto">First of all, the Google/Chrome subdirectory is owned by, you know, the wrong browser company.  Second, because this path does not begin with a tilde (~) it is, eeeek, in a system-admin level directory. Because of this, I had to enter my administrator password twice in order to create the folder and put it there. Google Chrome gives you the option to put it in the user's directory instead, which I do for my Chrome extension.</p>
<p dir="auto">I also tried putting my Native Messaging manifest file in other reasonable locations:</p>
<ul>
<li>~/Library/Google/Chrome/NativeMessagingHosts/</li>
<li>~/Library/Application Support/com.operasoftware.Opera/NativeMessagingHosts/</li>
<li>~/Library/Application Support/Opera/NativeMessagingHosts/</li>
</ul>
<p dir="auto">but none of these worked either.</p>
<p dir="auto">In addition to the Google/Chrome path mentioned above, there are other indications that this documentation was never thoroughly reviewed and tested, for example,</p>
<p dir="auto"><em>Chrome starts the host in a separate process…</em></p>
<p dir="auto">Obviously, this should have been changed to:</p>
<p dir="auto"><em>Opera starts the host in a separate process…</em></p>
<p dir="auto">To resolve this issue, Opera staff should please review the <a href="https://dev.opera.com/extensions/message-passing/" target="_blank" rel="noopener noreferrer nofollow ugc">documentation</a> and make corrections as necessary so that they can make a simple example extension which works, and post a link to it in the documentation.  Maybe I'm making some silly mistake, but, you know for something like this, with multiple moving parts, a working example is essential.</p>
<p dir="auto">Thank you for reading.</p>
<p dir="auto">Jerry Krinock</p>
]]></description><link>https://forums.opera.com/post/101612</link><guid isPermaLink="true">https://forums.opera.com/post/101612</guid><dc:creator><![CDATA[jerrykrinock]]></dc:creator><pubDate>Sat, 18 Jun 2016 22:11:08 GMT</pubDate></item><item><title><![CDATA[Reply to Porting Extension from Chrome : macOS Native Messaging on Sat, 18 Jun 2016 17:34:47 GMT]]></title><description><![CDATA[<p dir="auto">janghou, thank you very much for sharing your experience.  I've been trying your various suggestions, but no success so far.  Please clarify: when you got the example to work, were on running Linux or Apple macOS?</p>
]]></description><link>https://forums.opera.com/post/101589</link><guid isPermaLink="true">https://forums.opera.com/post/101589</guid><dc:creator><![CDATA[jerrykrinock]]></dc:creator><pubDate>Sat, 18 Jun 2016 17:34:47 GMT</pubDate></item><item><title><![CDATA[Reply to Porting Extension from Chrome : macOS Native Messaging on Fri, 17 Jun 2016 08:13:28 GMT]]></title><description><![CDATA[<p dir="auto">Yes, Opera uses the path for Google Chrome to look for manifests:</p>
<p dir="auto"><strong>~/.config/google-chrome/NativeMessagingHosts</strong></p>
<p dir="auto">Now I know why the example works, I had it also installed in Google Chrome, not my own extensions. When I place the manifest in above Google Chrome location the extension starts working.</p>
<p dir="auto">Will file another bug report, pfff.</p>
]]></description><link>https://forums.opera.com/post/101521</link><guid isPermaLink="true">https://forums.opera.com/post/101521</guid><dc:creator><![CDATA[janghou]]></dc:creator><pubDate>Fri, 17 Jun 2016 08:13:28 GMT</pubDate></item><item><title><![CDATA[Reply to Porting Extension from Chrome : macOS Native Messaging on Fri, 17 Jun 2016 07:06:07 GMT]]></title><description><![CDATA[<p dir="auto">I agree, it is broken. It was broken, I filed a bug report. DNA-23526, They <a href="http://www.opera.com/blogs/desktop/changelog-24/#b1558.17" target="_blank" rel="noopener noreferrer nofollow ugc">fixed it</a>.<br />
Then it broke again sometime, at least for extensions in developer mode, same extension works in Chromium, it doesn't in Opera.  Mostly on error ***Can't find manifest for native messaging host <strong>com.my_company.my_application</strong>, while it's there. I field another bug report, but no fix DNA-43909. Since then I use Chromium a bit more. <img src="https://forums.opera.com/assets/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=qqje97jok90" class="not-responsive emoji emoji-emoji-one emoji--winking_face" title=";)" alt="😉" /></p>
<p dir="auto"><strong>To debug</strong></p>
<ul>
<li>start Opera from terminal, it will give you some errors in terminal.</li>
<li>Try  the <em>official</em> <a href="https://developer.chrome.com/extensions/nativeMessaging#examples" target="_blank" rel="noopener noreferrer nofollow ugc">example</a>.<br />
Strangely that one works in Opera, while my own do not work in Opera, but they do work in Chromium.</li>
</ul>
<p dir="auto"><strong>Path to manifest</strong> (I use it in opera-developer).</p>
<ul>
<li>On Linux: ~/.config/opera-developer/NativeMessagingHosts/com.my_company.my_application.json</li>
<li>On OSX (I guess): ~/Library/Application Support/Opera/NativeMessagingHosts/com.my_company.my_application.json</li>
<li>for chromium: ~/.config/chromium/NativeMessagingHosts/com.my_company.my_application.json</li>
</ul>
<p dir="auto">Annoyingly, there is no error message, when you have set the extension ID wrong</p>
<blockquote>
<p dir="auto">"allowed_origins": [ "chrome-extension://xxx/"  ]</p>
</blockquote>
]]></description><link>https://forums.opera.com/post/101518</link><guid isPermaLink="true">https://forums.opera.com/post/101518</guid><dc:creator><![CDATA[janghou]]></dc:creator><pubDate>Fri, 17 Jun 2016 07:06:07 GMT</pubDate></item><item><title><![CDATA[Reply to Porting Extension from Chrome : macOS Native Messaging on Wed, 15 Jun 2016 15:12:58 GMT]]></title><description><![CDATA[<p dir="auto">I tried to putting my special manifest file in a more logical location,</p>
<p dir="auto">~/Library/Application Support/com.operasoftware.OperaDeveloper/NativeMessagingHosts</p>
<p dir="auto">But still my messaging tool does not launch.</p>
<p dir="auto">I've also looked through the Opera Add-Ons for another extension which I thought might be using Native Messaging but could not find any.  I imagine that they would need to be associated with a native app that would install the manifest and messaging tool, like my extension.</p>
<p dir="auto">Has anyone ever used Native Messaging in an Opera Extension?  I wonder if this feature has ever been tested?</p>
<p dir="auto">Thank you!</p>
]]></description><link>https://forums.opera.com/post/101389</link><guid isPermaLink="true">https://forums.opera.com/post/101389</guid><dc:creator><![CDATA[jerrykrinock]]></dc:creator><pubDate>Wed, 15 Jun 2016 15:12:58 GMT</pubDate></item></channel></rss>