Promise may not be fulfilled with 'undefined' when statusCode is not 204
See original GitHub issueEnvironment
react-native 0.64.2 @callstack/repack 2.5.1
Description
I seem to get this error a lot and I’m not sure why, as there’s no other information. It only happens when bundling ios, not android. Here’s the full console log.
ℹ [21:46:13.025Z][DevServerProxy] Starting compiler worker { platform: 'ios', port: 64743 }
ℹ [21:46:13.074Z][DevServerProxy] Hermes device connected { deviceId: 2 }
ℹ [21:46:14.087Z][DevServer@ios] Server listening at http://[::]:64743
ℹ [21:46:14.088Z][DevServerProxy] fetching from remote server {
source: 'http://localhost:64743/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.coinbase.OnboardingMobile'
}
ℹ [21:46:14.094Z][DevServerProxy] fetching from remote server { source: 'http://localhost:64743/api/dashboard/stats?platform=ios' }
ℹ [21:46:14.129Z][webpack-dev-middleware] wait until bundle finished: /index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.coinbase.OnboardingMobile
ℹ [21:46:14.130Z][DevServer@ios] Dashboard client connected { clientId: 'client#0' }
ℹ [21:46:14.132Z][webpack-dev-middleware] wait until bundle finished: /api/dashboard/stats?platform=ios
✖ [21:47:13.971Z][DevServerProxy] Promise may not be fulfilled with 'undefined' when statusCode is not 204 {
err: {
type: 'FastifyError',
message: "Promise may not be fulfilled with 'undefined' when statusCode is not 204",
stack: "FastifyError: Promise may not be fulfilled with 'undefined' when statusCode is not 204\n" +
' at /Users/milesjohnson/Projects/react-native/node_modules/fastify/lib/wrapThenable.js:30:30',
name: 'FastifyError',
code: 'FST_ERR_PROMISE_NOT_FULFILLED',
statusCode: 500
}
}
Reproducible Demo
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (5 by maintainers)
Top Results From Across the Web
Promise may not be fulfilled with 'undefined' when statusCode ...
Promise may not be fulfilled with 'undefined' when statusCode is not 204 ... when statusCode is not 204","stack":"Error: Promise may not be ...
Read more >node.js - Fastify "Promise may not be fulfilled with 'undefined ...
I am learning Fastify and created a post route. My code for the same is as below: const route = async (fastify) =>...
Read more >FST_ERR_PROMISE_NOT_FUL...
"message": "Promise may not be fulfilled with 'undefined' when statusCode is not 204", "stack": "FastifyError: Promise may not be fulfilled ...
Read more >Errors - Fastify
In Node.js, uncaught errors are likely to cause memory leaks, file descriptor leaks, and other major production issues. Domains were a failed attempt...
Read more >Fastify - Breword 文档集合
A promise may not be fulfilled with 'undefined' when statusCode is not 204. FST_ERR_SEND_UNDEFINED_ERR. Undefined error has occurred.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok I think I found a solution.
I’ve checked the code and the timeout is set for 5mins so it’s not the timeout inside Re.Pack than might be causing the issue, but then I’ve added short timeout to the request for a bundle:
curl "http://localhost:8081/index.bundle?platform=ios" --max-time 10
- the bundle compilation takes around 20+s in TesterApp socurl
should terminate the connection due to timeout and it did and I was finally able to see the infamousPromise may not be fulfilled with 'undefined' when statusCode is not 204
.As for the solution: Could someone add
return reply;
to the end of theforwardRequest
(line 234) function insidenode_modules/@callstack/repack/dist/server/DevServerProxy.js
:@zamotany This didn’t fix it for me unfortunately, i receive the exact same error.