O aplicativo nativo não funciona na extensão do Chrome

Estou tentando a extensão da API de mensagens nativas do Chrome para Chrome.

Manifest.json para aplicativo nativo:

{
  "name": "app.native",
  "description": "Native Message API Test.",
  "path": "native.exe",
  "type": "stdio",
  "allowed_origins": ["chrome-extension://kembignchdjhopkkcolnamikcenaocdm/"]
}

Valor do Registro do Windows:

HKEY_LOCAL_MACHINE\SOFTWARE\Google\Chrome\NativeMessagingHosts\app.native=D:\connectNative\manifest.json

Eu também tenteiD:\\\\connectNative\\\\manifest.json

E adiciono "nativeMessaging" a "Permissions" na extensão manifest.json do Chrome.

Aplicativo nativo cpp:

#include <iostream>
#include <string>
#include <fstream>

using namespace std;

int main(int argc, char* argv[]) {
    string input = "";
    string message="{\"text\": \"This is a response message\",\"num\": \"three\"}";
    unsigned int len = message.length();
    cout << char(((len>>0) & 0xFF))
         << char(((len>>8) & 0xFF))
         << char(((len>>16) & 0xFF))
         << char(((len>>24) & 0xFF));
    cout << message <<endl;
    getline(cin, input);
    cout << "You entered: " << input << endl;
    ofstream myfile;
    myfile.open ("example.txt");
    myfile << "Writing this to a file.\n";
    myfile << input;
    myfile.close();

    return 0;
}

Depois de tudo feito, tento na minha extensão do Chrome:

var testport = chrome.runtime.connectNative('app.native');
testport.onMessage.addListener(function(msg) {
    console.log("Received" + msg);
});
testport.onDisconnect.addListener(function() {
  console.log("Disconnected");
});

Ele não pode receber nenhuma mensagem e sempre imprime "Desconectado".

Eu tento conectar-me a um aplicativo inexistente, ele ainda imprime "Desconectado", então sei que esse aplicativo nativo não está configurado corretamente.

Alguém pode apontar o que está errado ou o que eu perdi?

questionAnswers(2)

yourAnswerToTheQuestion