Hello,
after updating to new CLI 9.0.0 and updating manifest with app.runtime.name: nodejs18.x fetch to db server stopped working and always ends up with this error:
FetchError: request to https://XX.XX.XX.XX:1234/xyz failed, reason: connect ETIMEDOUT 185.166.143.31:1234
at ClientRequest.<anonymous> (webpack://jira-global-page-custom-ui/node_modules/@forge/api/node_modules/node-fetch/lib/index.mjs:1494:1)
at ClientRequest.emit (node:events:529:35)
at TLSSocket.socketErrorListener (node:_http_client:501:9)
at TLSSocket.emit (node:events:529:35)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
type: 'system',
errno: 'ETIMEDOUT',
code: 'ETIMEDOUT'
}
What I find strange is that timeout is on Atlassian server ip with same port as original request.
This happens only on newly deployed app with this CLI version, older seems to still work fine.
Db server is ok and responsive.
So far I tried:
- downgrading nodejs from 21.something to 18.20.2 (to fit with the app.runtime.name: nodejs18.x),
- creating new app to just test the fetch
- removing NODE_TLS_REJECT_UNAUTHORIZED=0
but nothing seems to have any effect.
SOLUTION:
Before I posted this, I decided to try one more thing and it finally worked. I updated nodejs to 22.0.0 and set app.runtime.name: sandbox. Now all seems to be working like before.
P.S. I posted this in case anyone runs into the same problem, I could not find anything related to this issue.