-
Notifications
You must be signed in to change notification settings - Fork 27.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERR_INVALID_ARG_TYPE when closing app #55631
Comments
Along with that, I tried canary and latest release. After stopping server by CTL + C , it actually didnt stop the server, in background i can see the server is still running, and if i save any file after changing in that repo, it automatically starts again, although i just stopped server. Now i need to kill the process. Earlier in dev mode memory usage going high, still its going high, but after restarting server provides some relief for a while, |
At least the ERR_INVALID_ARG_TYPE error is fixed in #55606. Wait for the next canary release. |
I can confirm that #55606 indeed resolved this. The error is gone, the While we wait for a canary release, you can use diff --git a/dist/server/lib/start-server.js b/dist/server/lib/start-server.js
index fb221537008462774227e0567cbc7087455e8a87..c637e54f789d757bb28a8da4c74072b7957122ba 100644
--- a/dist/server/lib/start-server.js
+++ b/dist/server/lib/start-server.js
@@ -211,9 +211,10 @@ async function startServer({ dir, port, isDev, hostname, minimalMode, allowRetry
// This is the render worker, we keep the process alive
console.error(err);
};
- process.on("exit", cleanup);
- process.on("SIGINT", cleanup);
- process.on("SIGTERM", cleanup);
+ process.on('exit', (code) => cleanup(code))
+ // callback value is signal string, exit with 0
+ process.on('SIGINT', () => cleanup(0))
+ process.on('SIGTERM', () => cleanup(0))
process.on("uncaughtException", exception);
process.on("unhandledRejection", exception);
const initResult = await getRequestHandlers({ If you use something other than |
off topic, i love your terminal. what theme is that? |
Monokai Pro on VSCode. |
I'm also noticing maybe memory leak? each time i save the ram gets more and more for |
@azvyae understand about duplication, but when using with single one and you keep saving lets say a .tsx file you will notice that ram keeps increasing for that |
Screen.Recording.2023-09-20.at.17.06.05.mov |
Garbage collector kicks in but it not as low as it should be but even with GC it keeps increasing the more i save |
This has been fixed on the latest You have to be at least on: 13.5.2-canary.0 |
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Link to the code that reproduces this issue
https://github.com/MariuzM/test_next
To Reproduce
When i do CTRL + C to close app i get this error, this started happening with
13.5.1
Current vs. Expected behavior
No errors
Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.6.0: Wed Jul 5 22:22:05 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T6000 Binaries: Node: 20.6.1 npm: 9.8.1 Yarn: 1.22.19 pnpm: 8.6.12 Relevant Packages: next: 13.5.1 eslint-config-next: 13.5.1 react: 18.2.0 react-dom: 18.2.0 typescript: 5.2.2 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Not sure
Additional context
No response
NEXT-1640
The text was updated successfully, but these errors were encountered: