title: browser.cookies.getAll() always returns nothing - Firefox Extension
body: <p>I have been trying to list all browser cookies in my extension with <code>browser.cookies.getAll()</code>. At first, I thought it was a permissions issue, but my permissions appear to be set correctly. Here is my code:</p>
  <p><strong>manifest.json</strong></p>
  <pre><code>{
      &quot;manifest_version&quot;: 2,
      &quot;name&quot;: &quot;CookieExample&quot;,
      &quot;version&quot;: &quot;0.1&quot;,
      
      &quot;applications&quot;: {
          &quot;gecko&quot;: {
              &quot;id&quot;: &quot;cookieexample@example.com&quot;
          }
      },
      
      &quot;permissions&quot;: [
          &quot;cookies&quot;,
          &quot;webNavigation&quot;,
          &quot;webRequest&quot;,
          &quot;webRequestBlocking&quot;,
          &quot;&lt;all_urls&gt;&quot;
      ],
      
      &quot;background&quot;: {
          &quot;scripts&quot;: [&quot;cookies.js&quot;]
      }        
  }
  </code></pre>
  <p><strong>cookies.js</strong></p>
  <pre><code>browser.cookies.getAll({}, function(cookies) {
      console.log(cookies);
  });
  </code></pre>
  <p>The console simply logs <code>[]</code> as the return value. I don't know where I've gone wrong or if it's a problem with the browser. <a href="https://addons.mozilla.org/en-US/firefox/addon/a-cookie-manager/" rel="nofollow noreferrer">Cookie Manager</a> works just fine and lists all browser cookies without a hitch. Looking into its source code, the only difference is that it uses a cookie store ID to query for cookies, whereas I used nothing.</p>