<p>Actually the error is not very useful but I figured the problem out: adding <code>&quot;https://export.arxiv.org/*&quot;,</code> to the manifest's permissions.</p>
<p>For some reason (?) Chrome allows <code>https://export.arxiv.org/api/...</code> declaring   <code>https://arxiv.org/*</code> but not Firefox</p>
Content scripts difference between Firefox and Chrome: not able to get API data
<p>I'm fetching data on Arxiv.org's api with my chrome extension.</p>
<p>The following code works when executed:</p>
<ul>
<li>[x] Popup on Chrome</li>
<li>[x] Content script on Chrome</li>
<li>[x] Popup on Firefox</li>
<li>[ ] Content script on Firefox &lt;- why is that, how can I debug?</li>
</ul>
<p>If it is of any help, <code>content_script.js</code> is triggered on <a href="https://arxiv.org/abs/1801.06146" rel="nofollow noreferrer">https://arxiv.org/abs/1801.06146</a></p>
<pre class="lang-js prettyprint-override"><code>// content_script.js
$.get(`https://export.arxiv.org/api/query`, { id_list: &quot;1801.06146&quot; })
    .done((data) =&gt; {
        console.log(&quot;done&quot;);
        console.log(data);
    })
    .fail((jqXHR, textStatus, errorThrown) =&gt; {
        console.log(&quot;fail&quot;);
        console.log({ jqXHR, textStatus, errorThrown });
    });
</code></pre>
<p>The FF failure looks like:</p>
<p><a href="https://i.stack.imgur.com/3nyLb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3nyLb.png" alt="jserror" /></a></p>
<pre class="lang-json prettyprint-override"><code>// manifest.json
&quot;permissions&quot;: [
    &quot;https://arxiv.org/*&quot;,
    &quot;https://proceedings.neurips.cc/*&quot;,
    &quot;https://openaccess.thecvf.com/*&quot;,
    &quot;tabs&quot;,
    &quot;activeTab&quot;,
    &quot;storage&quot;,
    &quot;unlimitedStorage&quot;,
    &quot;downloads&quot;
  ],
  &quot;content_scripts&quot;: [
    {
      &quot;matches&quot;: [
        &quot;*://arxiv.org/*&quot;,
        &quot;*://*.arxiv-vanity.com/*&quot;,
        &quot;*://proceedings.neurips.cc/*&quot;,
        &quot;*://openaccess.thecvf.com/*&quot;
      ],
      &quot;run_at&quot;: &quot;document_start&quot;,
      &quot;js&quot;: [
        &quot;src/shared/jquery.min.js&quot;,
        &quot;src/shared/utils.min.js&quot;,
        &quot;src/content_scripts/content_script.js&quot;
      ],
      &quot;css&quot;: [
        &quot;src/content_scripts/downloadButton.css&quot;,
        &quot;src/content_scripts/loader.css&quot;,
        &quot;src/content_scripts/content_script.css&quot;
      ]
    }
  ]
</code></pre>