This morning, when trying to execute: “forge build” I get errors like below. Any idea what is going on? Yesterday all was ok.
If I try to open the URL mentioned in the error I get a 404 error.
Thanks.
root@LP-AST03526:/opt/RD/JiraCustomFieldPlugin/forge# forge build --verbose
Building and uploading your app.
Press Ctrl+C to cancel.
Running forge lint...
Error: invalid json response body at https://developer.atlassian.com/cloud/jira/service-desk/swagger.v3.json reason: Unexpected end of JSON input
Error: invalid json response body at https://developer.atlassian.com/cloud/jira/service-desk/swagger.v3.json reason: Unexpected end of JSON input
at lint (/root/.nvm/versions/node/v24.15.0/lib/node_modules/@forge/cli/node_modules/@forge/lint/out/lint/lint.js:131:15)
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
at async LintService.run (/root/.nvm/versions/node/v24.15.0/lib/node_modules/@forge/cli/out/service/lint-service.js:30:29)
at async BuildController.verifyPreBuild (/root/.nvm/versions/node/v24.15.0/lib/node_modules/@forge/cli/out/command-line/controller/build-controller.js:71:33)
at async BuildController.run (/root/.nvm/versions/node/v24.15.0/lib/node_modules/@forge/cli/out/command-line/controller/build-controller.js:49:13)
at async /root/.nvm/versions/node/v24.15.0/lib/node_modules/@forge/cli/out/command-line/register-build-commands.js:48:16
at async Command.actionProcessor (/root/.nvm/versions/node/v24.15.0/lib/node_modules/@forge/cli/out/command-line/command.js:283:28)
at async Command.parseAsync (/root/.nvm/versions/node/v24.15.0/lib/node_modules/@forge/cli/node_modules/commander/lib/command.js:1104:5)
at async Command.parse (/root/.nvm/versions/node/v24.15.0/lib/node_modules/@forge/cli/out/command-line/command.js:165:13)
at async main (/root/.nvm/versions/node/v24.15.0/lib/node_modules/@forge/cli/out/command-line/index.js:94:5)
root@LP-AST03526:/opt/RD/JiraCustomFieldPlugin/forge#
The forge lint command downloads the swagger files for Atlassian REST endpoints so that it can check for missing scope declarations in your manifest. It looks like, for some reason, the CLI is not receiving a valid JSON file when attempting to do this.
As a workaround, you can use the --no-verify flag when running forge build, which would bypass the linting checks.
forge deploy -e staging
12s
+ forge deploy -e staging
Deploying your app to the staging environment.
Press Ctrl+C to cancel.
Running forge lint...
Error: Invalid response body while trying to fetch https://developer.atlassian.com/cloud/confluence/swagger.v3.json: Premature close
We also tried the suggested workaround by addding --no-verify :
forge deploy -e staging --no-verify
Unfortunately, forge deploy still fails with the same error while fetching the Swagger JSON, so --no-verify doesn’t help in our case. As a result, we are currently blocked from deploying our Forge app, which is blocking our QA testing.
This solution worked for me. Not only that, I used `nvm` to install `v.22.23.0` in my local environment and after running `forge lint` and `forge deploy` with that version I was able to consistently reproduce the bug described above.
One solution is to pin back to a previous version of Node which does not include the regression, ie: v24.16 or v22.22
We also have a ticket in our backlog to migrate the Forge CLI from node-fetch to the native fetch (undici), which would also fix some deprecation messages - FRGE-1750