title: Error when communicating with the native messaging host from extension
body: <p>I need to pass phonenumber from web page to desktop dialer. I have host, that catches phone number from page that passed from background.js: <br></p>
  
  <pre><code>var responseMessage = "";
  chrome.runtime.onMessage.addListener(
    function(request, sender, sendResponse) {
        console.log(request.phonenumber);
                  chrome.runtime.sendNativeMessage('com.avvd.microsipcallfield', {text: request.phonenumber},function(response) {
      if (chrome.runtime.lastError) {
          responseMessage = chrome.runtime.lastError.message
          console.log(responseMessage);
      } else {
          responseMessage = response;
                  }} )
        sendResponse(responseMessage);
    });
  </code></pre>
  
  <p>and sending it to host: </p>
  
  <pre><code>{
    "name": "com.avvd.microsipcallfield",
    "description": "Call Field Microsip host",
    "path": "C:\\Users\\All Users\\callFieldHost\\host.bat",
    "type": "stdio",
    "allowed_origins": [
      "chrome-extension://lbhgehbjeemkjmooaeopmfljahdoombd/"
    ]
  }
  </code></pre>
  
  <p>Host.bat</p>
  
  <pre><code>java -jar HostDecoder.jar %*
  </code></pre>
  
  <p>in general, for the time being there is no host, there will be an application that opens an object from JSON and sends it to the dialer. However
  I wrote simple recorder and this is an output:</p>
  
  <pre><code>1argument: chrome-extension://lbhgehbjeemkjmooaeopmfljahdoombd/
  2argument: --parent-window=0
  </code></pre>
  
  <p>While i try to send number i get in console
  "Error when communicating with the native messaging host." and how we can see there is no number passed to host listener. 
  Can somebody advice me to look for to repair this?  </p>