title: Unchecked lastError value: Error: No matching window - I get this error when trying to execute script with command in Firefox WebExtension
body: <p>I have this part of code (everything is in background.js), which basically executes javascript in pages based on page's URL. It should work on toolbar button click, and Ctrl + Q command.</p>
  
  <p>I assign it to button click like this, and it works:</p>
  
  <pre><code>chrome.browserAction.onClicked.addListener(function(tab) {
  browser.tabs.query(
          {active:true},
          function(tabs) {
              var tab = tabs[0];
  
              if(tab.url.indexOf("app.fillz.com/orders/edit") != -1){
                  chrome.tabs.executeScript({
                      file: "fillz.js"
                  });
              } else if(tab.url.indexOf("amazon") != -1 &amp;&amp; tab.url.indexOf("buy/addressselect/handlers/display.html") != -1){
                  chrome.tabs.executeScript({
                      file: "amazon.js"
                  });
              }
          }
  );
  });
  </code></pre>
  
  <p>Problem is when I try to assign that same code to the onCommand event, like this:</p>
  
  <pre><code>chrome.commands.onCommand.addListener(function(command) {
  if (command == "fills2amazonCopyAndPaste") {
      browser.tabs.query(
              {active:true},
              function(tabs) {
                  var tab = tabs[0];
  
                  if(tab.url.indexOf("app.fillz.com/orders/edit") != -1){
                      console.log("FILLZ");
                      chrome.tabs.executeScript({
                          file: "fillz.js"
                      });
                  } else if(tab.url.indexOf("amazon") != -1 &amp;&amp; tab.url.indexOf("buy/addressselect/handlers/display.html") != -1){
                      console.log("AMAZON");
                      chrome.tabs.executeScript({
                          file: "amazon.js"
                      });
                  }
              }
      );
  }
  });
  </code></pre>
  
  <p>Command is recognized, also the url of currently active tab, I checked it with those two console.log() commands in code above, but scripts don't get executed when I try to do it with command. In Browser Console, there is only this error:</p>
  
  <pre><code>Unchecked lastError value: Error: No matching window
  </code></pre>
  
  <p>originating from: //gre/modules/ExtensionUtils.jsm</p>
  
  <p>What could be the problem, I know my manifest.json file is alright as command gets recognized, but it simply won't execute javascript...</p>