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

killtree in 0.28.2 causes crash #214

Open
Kilian opened this issue Feb 12, 2024 · 7 comments
Open

killtree in 0.28.2 causes crash #214

Kilian opened this issue Feb 12, 2024 · 7 comments

Comments

@Kilian
Copy link

Kilian commented Feb 12, 2024

after updating to 0.28.2 it crashes on startup on ubuntu 23.04 with the following error:

node:internal/errors:496
    ErrorCaptureStackTrace(err);
    ^

Error: kill ESRCH
    at process.kill (node:internal/process/per_thread:233:13)
    at killTree ([...]/node_modules/vite-plugin-electron/dist/index.js:147:11)
    at killTree [...]/node_modules/vite-plugin-electron/dist/index.js:144:7)
    at treeKillSync ([...]/node_modules/vite-plugin-electron/dist/index.js:126:5)
    at startup.exit ([...]/node_modules/vite-plugin-electron/dist/index.js:237:5)
    at startup ([...]/node_modules/vite-plugin-electron/dist/index.js:225:17)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  errno: -3,
  code: 'ESRCH',
  syscall: 'kill'
}
@DJWezzz
Copy link

DJWezzz commented Feb 16, 2024

Same on Windows 11

@caoxiemeihao
Copy link
Member

@Kilian Sorry I've been very busy lately, I'll spend a weekend trying to figure this out on Ubuntu.

@caoxiemeihao
Copy link
Member

Hey👋 ! @Kilian
Fixed this issue in v0.28.4 (only use try-catch).
I only know that if he pid does not exist during the exec of process.kill(pid), it will result in an Error: kill ESRCH error.
I can't full figure out why the pid exit early, but this not a very important matter.

@caoxiemeihao caoxiemeihao mentioned this issue Mar 17, 2024
@Kilian
Copy link
Author

Kilian commented Mar 18, 2024

Unfortunately this now has a different issue, where it crashes because vite:client-inject is no longer running?

9:39:13 AM [vite] Pre-transform error: The service is no longer running: write EPIPE
9:39:13 AM [vite] Pre-transform error: The service is no longer running: write EPIPE (x2)
9:39:13 AM [vite] Pre-transform error: The service is no longer running: write EPIPE (x3)
9:39:13 AM [vite] Internal server error: The service is no longer running: write EPIPE
  Plugin: vite:client-inject
  File: /@react-refresh
      at /[..]/node_modules/esbuild/lib/main.js:827:29
      at sendRequest (/[..]/node_modules/esbuild/lib/main.js:699:14)
      at start (/[..]/node_modules/esbuild/lib/main.js:825:9)
      at Object.transform2 [as transform] (/[..]/node_modules/esbuild/lib/main.js:890:5)
      at /[..]/node_modules/esbuild/lib/main.js:2205:77
      at new Promise (<anonymous>)
      at Object.transform (/[..]/node_modules/esbuild/lib/main.js:2205:36)
      at transform (/[..]/node_modules/esbuild/lib/main.js:2038:62)
      at replaceDefine (file:///[..]/node_modules/vite/dist/node/chunks/dep-jvB8WLp9.js:48913:26)
      at TransformContext.transform (file:///[..]/node_modules/vite/dist/node/chunks/dep-jvB8WLp9.js:49048:30)
      at Object.transform (file:///[..]/node_modules/vite/dist/node/chunks/dep-jvB8WLp9.js:50956:62)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async loadAndTransform (file:///[..]/node_modules/vite/dist/node/chunks/dep-jvB8WLp9.js:53746:29)

@caoxiemeihao
Copy link
Member

Unfortunately this now has a different issue, where it crashes because vite:client-inject is no longer running?

This error looks like it comes from the renderer process build, can you make a minimal production repo form me?

@caoxiemeihao
Copy link
Member

#251 (comment)
Maybe this will work for you.

@Akryum
Copy link

Akryum commented Sep 25, 2024

#251 (comment) Maybe this will work for you.

I have the problem and using process.kill like in the linked comment worked.

What I had when saving a electron file:

build started...
✓ 0 modules transformed.
[vite:esbuild-transpile] The service is no longer running: write EPIPE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants