wxt
wxt copied to clipboard
`pnpm wxt submit` to AMO does not work in Node.js 24
Describe the bug
pnpm wxt submit seems to fail on Node.js 24 with a 415 Unsupported Media Type error.
Request: https://addons.mozilla.org/api/v5/addons/upload/
Response: {
"_data": {
"detail": "Unsupported media type \"text/plain;charset=UTF-8\" in request."
}
}
Error: [POST] "https://addons.mozilla.org/api/v5/addons/upload/": 415 Unsupported Media Type
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async $fetch2 (node_modules/.pnpm/[email protected]/node_modules/ofetch/dist/shared/ofetch.d8adb063.cjs:322:15)
at async AddonsApi.uploadCreate (node_modules/.pnpm/[email protected]/node_modules/publish-browser-extension/dist/cli.cjs:3228:12)
at async FirefoxAddonStore.uploadAndPollValidation (node_modules/.pnpm/[email protected]/node_modules/publish-browser-extension/dist/cli.cjs:3347:19)
at async FirefoxAddonStore.submit (node_modules/.pnpm/[email protected]/node_modules/publish-browser-extension/dist/cli.cjs:3325:20)
at async Task.task [as taskFn] (node_modules/.pnpm/[email protected]/node_modules/publish-browser-extension/dist/cli.cjs:3524:11)
at async Task.run (node_modules/.pnpm/[email protected]/node_modules/listr2/dist/index.cjs:2146:11)
✖ Firefox Addon Store [FAILED: [POST] "https://addons.mozilla.org/api/v5/addons/upload/": 415 Unsupported Media Type]
Error: Submissions failed: 1
at submit (node_modules/.pnpm/[email protected]/node_modules/publish-browser-extension/dist/cli.cjs:3544:11)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async CAC.<anonymous> (node_modules/.pnpm/[email protected]/node_modules/publish-browser-extension/dist/cli.cjs:3936:5)
[cause]: [ [ 'firefox',
{ success: false,
err:
FetchError: [POST] "https://addons.mozilla.org/api/v5/addons/upload/": 415 Unsupported Media Type
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async $fetch2 (/home/runner/work/better-surf/better-surf/node_modules/.pnpm/[email protected]/node_modules/ofetch/dist/shared/ofetch.d8adb063.cjs:322:15)
at async AddonsApi.uploadCreate (/home/runner/work/better-surf/better-surf/node_modules/.pnpm/[email protected]/node_modules/publish-browser-extension/dist/cli.cjs:3228:12)
at async FirefoxAddonStore.uploadAndPollValidation (/home/runner/work/better-surf/better-surf/node_modules/.pnpm/[email protected]/node_modules/publish-browser-extension/dist/cli.cjs:3347:19)
at async FirefoxAddonStore.submit (/home/runner/work/better-surf/better-surf/node_modules/.pnpm/[email protected]/node_modules/publish-browser-extension/dist/cli.cjs:3325:20)
at async Task.task [as taskFn] (/home/runner/work/better-surf/better-surf/node_modules/.pnpm/[email protected]/node_modules/publish-browser-extension/dist/cli.cjs:3524:11)
at async Task.run (/home/runner/work/better-surf/better-surf/node_modules/.pnpm/[email protected]/node_modules/listr2/dist/index.cjs:2146:11) } ] ]
Reproduction
I was originally using Node.js 23 and have bumped to 24 which caused the issue.
Works fine on Node.js 22.
+ node-version: 24
- node-version: 22
Github Actions configuration:
name: Submit to Addons.mozilla.org
on: workflow_dispatch
jobs:
submit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Zip extensions
run: pnpm zip:firefox
- name: Submit to stores
run: |
pnpm wxt submit \
--firefox-zip .output/*-firefox.zip --firefox-sources-zip .output/*-sources.zip
env:
FIREFOX_EXTENSION_ID: ${{ secrets.FIREFOX_EXTENSION_ID }}
FIREFOX_JWT_ISSUER: ${{ secrets.FIREFOX_JWT_ISSUER }}
FIREFOX_JWT_SECRET: ${{ secrets.FIREFOX_JWT_SECRET }}
Steps to reproduce
No response
System Info
Reference Github Actions configuration
Used Package Manager
pnpm
Validations
- [x] Read the Contributing Guidelines.
- [x] Read the docs.
- [x] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [x] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- [x] The provided reproduction is a minimal reproducible example of the bug.
This also occurs locally for me using node 24 and the bun package manager (not bun runtime). Switching to node 21 to upload resolves the issue
Thanks for the report, I'll try and fix it later today.
Any update on this? Getting the same issue with npm. Switched from using node 22 to node 24.