Skip to content
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

Server process not killed after upgrading to v3.13.2 #948

Open
peralta opened this issue Sep 16, 2024 · 1 comment
Open

Server process not killed after upgrading to v3.13.2 #948

peralta opened this issue Sep 16, 2024 · 1 comment
Labels
bug Something isn't working pending triage

Comments

@peralta
Copy link

peralta commented Sep 16, 2024

Environment

Nuxt project info:                                                    20:43:02

------------------------------
- Operating System: Linux
- Node Version:     v18.20.4
- Nuxt Version:     3.13.2
- CLI Version:      3.13.2
- Nitro Version:    2.9.7
- Package Manager:  [email protected]
- Builder:          -
- User Config:      devtools, devServer, site, experimental, nitro, modules, purgecss, gtag, notivue, fonts, icon, routeRules, sitemap, plugins, css, vite, app, compatibilityDate
- Runtime Modules:  @nuxtjs/[email protected], @nuxt/[email protected], [email protected], [email protected], notivue/nuxt, @nuxtjs/[email protected], @nuxt/[email protected], [email protected], @nuxt/[email protected], [email protected], @nuxt/[email protected]
- Build Modules:    -
------------------------------

Reproduction

After upgrading nuxt v3.13.2 from v3.13.1, which triggered the dependency update from test-utils to the same version, the first test node server process is not killed. Following tests fail because address is already in use.

Describe the bug

Downgrading test-utils to v3.13.1 fixes the issue. Probably related to the tinyexec PR: #939

Additional context

No response

Logs

No response

Copy link

dosubot bot commented Sep 16, 2024

Hey there, @peralta! I'm Dosu, a bot designed to help you with bug fixes, questions, and becoming a contributor. I'm here to assist you while waiting for a human maintainer. Let's squash those bugs together! 🤖

The issue you're experiencing with the server process not being killed after upgrading to Nuxt v3.13.2 is indeed related to the introduction of tinyexec in test-utils. The tinyexec implementation is not properly handling the termination of processes, which causes the server process to linger and subsequent tests to fail due to the address being in use.

In the startServer function, tinyexec is used to start the server process, but if the server is not properly stopped using the stopServer function, which calls ctx.serverProcess.kill(), the process remains running. This issue likely stems from tinyexec not correctly handling the termination of the server process [1][2].

Downgrading to test-utils v3.13.1, which uses execa instead of tinyexec, resolves the issue because execa handles process termination more reliably. You can follow the discussion and potential fixes in the related pull request here.

To continue talking to Dosu, mention @dosu.

@dosubot dosubot bot added the bug Something isn't working label Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending triage
Projects
None yet
Development

No branches or pull requests

1 participant