web-ext icon indicating copy to clipboard operation
web-ext copied to clipboard

--api-proxy is ignore when signing

Open fopinappb opened this issue 8 months ago • 4 comments

I'm likely doing something wrong as I cannot find any issue/link on this but I'm not able to use --api-proxy behind a proxy.

  • I've tried using node 18, 20 and 22 (in case it was a edge case in fetch) but all of them simply ignore the proxy specified in --api-proxy.
  • I've tried web-ext 8.3.0 and latest (8.6.0)
  • I'm calling it as npx web-ext sign --channel unlisted -c .web-config.mjs --api-proxy http://127.0.0.1:9990 -v
  • 9990 is just a listening netcat that never gets any connection
  • I've updated submit-addon.js locally to console.log the agent and it is created as expected (as HttpsProxyAgent) and passed to fetch. Just fetch never makes use of it...?

(Update) After downgrading to 7.11.0 I can sign via proxy but it fails again if I use --use-submission-api to force the new v8 behavior

fopinappb avatar May 07 '25 16:05 fopinappb

Could you share the verbose logs of web-ext ? (add -v to the command line).

And what proxy application and OS are you using?

Rob--W avatar May 22 '25 12:05 Rob--W

It could be a regression from https://github.com/mozilla/web-ext/pull/3217, would the proxy work with web-ext v8.2.0 by chance?

willdurand avatar May 22 '25 12:05 willdurand

@Rob--W I tried on both macOS and Linux. Not sure what you mean by “proxy application”: I pass a proxy url in the flag and it didn’t use it at all (confirmed by using plain netcat on that port - no incoming connections)

@willdurand I don't have the setup at the moment to retest but 7.11.0 also failed if using submission API (which becomes the only method in 8)

fopina avatar May 22 '25 19:05 fopina

It could be a regression from #3217, would the proxy work with web-ext v8.2.0 by chance?

This is the reason. Undici doesnt handle proxies in the same way as node-fetch does. Staying on 8.2 until it is fixed...

(I tried to fix it locally but wasnt able to--my understanding on undici is minimal and patience non-existent..)

afmhenry avatar Oct 17 '25 08:10 afmhenry