Running Native Messaging host app on Chromium OS

577 views
Skip to first unread message

seifeddine ferjani

unread,
Jun 6, 2019, 10:18:47 AM6/6/19
to Chromium Extensions
Hello,

I am trying to run the native messaging python app example  on Chromium OS.
On Linux I am able to run the app by following the instructions given on the tutorial below: 
However, on chromium os I had the following error : "Specified Native messaging host not found."

I try to install the json manifest file in different paths Iike :
~/.config/google-chrome/NativeMessagingHosts
~/.config/chromium/NativeMessagingHosts
/home/chronos/NativeMessagingHosts
/home/chronos/native-messaging-hosts
 but unfortunately I got always the same error.

Here is my json file :
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

{
  "name": "com.google.chrome.example.echo",
  "description": "Chrome Native Messaging API Example Host",
  "path": "/home/chronos/user/Downloads/host/native-messaging-example-host",
  "type": "stdio",
  "allowed_origins": [
    "chrome-extension://knldjmfmopnpolahpmmgbagdohdnhkik/"
  ]
}


Can someone help with this problem.

Best Regards,
Saifeddine FERJANI

Simeon Vincent

unread,
Jun 6, 2019, 2:25:51 PM6/6/19
to Chromium Extensions
I believe the issue you're describing is caused by the design of Chromium OS's container system. In short, Chrome OS cannot directly access the resources required for native messaging due to the security boundary between VMs and the host OS. For more details, see https://chromium.googlesource.com/chromiumos/docs/+/master/containers_and_vms.md

You may be able to work around this by installing Chromium in your Linux VM and running your extension there. FWIW I get that running a Chromium browser inside Chromium OS is weird, but that's the (containerized) world we live in.

Simeon - @dotproto
Extensions Developer Advocate 
Reply all
Reply to author
Forward
0 new messages