0
votes

I'm developing an objective-c app for OS X that will involve message passing with Google Chrome. I have followed the examples and downloaded the samples from here. However, I cannot get the extension to connect to my app. The path to my app in the manifest file is the absolute path to a unix-executable file found at "/Users/username/Library/Developer/Xcode/DerivedData/app_name-UUID/Build/Products/Debug/app_name.app/Contents/MacOS/app_name". I have placed the same manifest file in both the locations noted in the previous link (although I understand only one is required).

When I try to connect to the running app I get the message "Failed to connect: Specified native messaging host not found".

Can I test the messaging API while the native app is still in development? If so, how? Or do I need to package the app into a .dmg file first?

1
Start Chrome from the terminal and look at the output in the terminal to see more helpful error messages. - Rob W
That didn't show me any additional output. - Andrew Gene
Does the following answer solve your problem? stackoverflow.com/a/25193936? - Rob W
I have the exact same problem, on Mac. RobW helped me through an earlier issue, but now I get "Specified native messaging host not found". I've gone over and over the directions for this specific error here (developer.chrome.com/extensions/…) to no avail. Everything looks right, but no sooner do I connect than an onDisconnect is fired with that message as the chrome.runtime.lastError.message. - Alyoshak

1 Answers

0
votes

See RobW's answer here: Native Messaging Host Not Found. The solution may be that you have your "NativeMessagingHosts" folder (which contains the manifest) inside a folder named "Default". Just move the NativeMessagingHosts folder up one level so that it resides in the "Chrome" folder. The documentation was not yet updated.