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

Remix server is crashing randomly when rebuilding #6768

Closed
1 task done
thitemple opened this issue Jul 5, 2023 · 13 comments · Fixed by #6773 or #6779
Closed
1 task done

Remix server is crashing randomly when rebuilding #6768

thitemple opened this issue Jul 5, 2023 · 13 comments · Fixed by #6773 or #6779

Comments

@thitemple
Copy link

thitemple commented Jul 5, 2023

What version of Remix are you using?

1.8.1

Are all your remix dependencies & dev-dependencies using the same version?

  • Yes

Steps to Reproduce

Have the server running edit some code, and randomly it crashes. It doesn't happen all the time

image

GET / 200 - - 570.251 ms
 info  rebuilding... (~ app/components/Nav.tsx)
 info  rebuilt (170ms)

/Users/thitemple/src/templecoding-site/node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@remix-run/dev/dist/devServer_unstable/proc.js:29
    throw new Error(`Failed to kill process ${pid}: ${error}`);
          ^

Error: Failed to kill process 17433: Error: Command failed with exit code 1: kill -9 17433
kill: 17433: No such process
    at kill (/Users/thitemple/src/templecoding-site/node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@remix-run/dev/dist/devServer_unstable/proc.js:29:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Promise.all (index 1)
    at async Object.killtree (/Users/thitemple/src/templecoding-site/node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@remix-run/dev/dist/devServer_unstable/proc.js:43:3)
    at async onBuildFinish (/Users/thitemple/src/templecoding-site/node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@remix-run/dev/dist/devServer_unstable/index.js:236:13)

Node.js v18.16.0

It seams to be happening only when using v2_dev: true

Expected Behavior

To no crash and reload.

Actual Behavior

It is crashing enough times to be disruptive

@bakkelim
Copy link

bakkelim commented Jul 5, 2023

I have the same issue on my Windows pc (node v18.16.0) but not on my Mac laptop (node v18.12.1).
Remix v1.18.1

@github-actions
Copy link
Contributor

github-actions bot commented Jul 6, 2023

🤖 Hello there,

We just published version v0.0.0-nightly-da44482-20230706 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@github-actions github-actions bot closed this as completed Jul 6, 2023
@bakkelim
Copy link

bakkelim commented Jul 6, 2023

Just tested the nightly build and get following error now:

Express server listening on port 3000
 info  rebuilding... (~ src\app\routes\users.$userNumber.freg.tsx)
 info  building...

 info  rebuilt (343ms)

Waiting for the debugger to disconnect...
C:\dev\temasoft\tt-admin-portal\node_modules\execa\lib\error.js:60
                error = new Error(message);
                        ^

Error: Command failed with exit code 1: taskkill /F /PID 14524
ERROR: The process with PID 14524 could not be terminated.
Reason: There is no running instance of the task.
    at makeError (C:\dev\temasoft\tt-admin-portal\node_modules\execa\lib\error.js:60:11)
    at handlePromise (C:\dev\temasoft\tt-admin-portal\node_modules\execa\index.js:118:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async kill (C:\dev\temasoft\tt-admin-portal\node_modules\@remix-run\dev\dist\devServer_unstable\proc.js:26:5)
    at async Promise.all (index 2)
    at async Object.killtree (C:\dev\temasoft\tt-admin-portal\node_modules\@remix-run\dev\dist\devServer_unstable\proc.js:48:3)
    at async onBuildFinish (C:\dev\temasoft\tt-admin-portal\node_modules\@remix-run\dev\dist\devServer_unstable\index.js:232:13) {
  shortMessage: 'Command failed with exit code 1: taskkill /F /PID 14524',
  command: 'taskkill /F /PID 14524',
  escapedCommand: 'taskkill "/F" "/PID" 14524',
  exitCode: 1,
  signal: undefined,
  signalDescription: undefined,
  stdout: '',
  stderr: 'ERROR: The process with PID 14524 could not be terminated.\r\n' +
    'Reason: There is no running instance of the task.\r',
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}

Node.js v18.16.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Waiting for the debugger to disconnect...
PS C:\dev\temasoft\tt-admin-portal>

@github-actions
Copy link
Contributor

github-actions bot commented Jul 7, 2023

🤖 Hello there,

We just published version v0.0.0-nightly-eccc180-20230707 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@github-actions github-actions bot closed this as completed Jul 7, 2023
@bakkelim
Copy link

bakkelim commented Jul 7, 2023

Can confirm that this is working for me now 🎉

@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version 1.19.0-pre.0 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

1 similar comment
@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version 1.19.0-pre.0 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version 1.19.0 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

1 similar comment
@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version 1.19.0 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@hanayashiki
Copy link

Same problem in 1.19.1. When will this be resolved?

@pcattori
Copy link
Contributor

pcattori commented Sep 6, 2023

@hanayashiki could you share the error you are seeing in your terminal as well as what OS you are using?

@hanayashiki
Copy link

hanayashiki commented Sep 7, 2023

@hanayashiki could you share the error you are seeing in your terminal as well as what OS you are using?

It seems if my editing leads to immediate crashing of the server, the watcher crashes too.

macOS Monterey 12.4
MacBook Pro (16-inch, 2019)
2.6 GHz 6-Core Intel Core i7
/Users/chenyuwang/pawpawmall/packages/store/src/root.tsx:83
const RemixDevTools = process.env.NODE_ENV === 'development' ? lazy(() => import("remix-development-tools")) : null;
                                                               ^
ReferenceError: lazy is not defined
    at Object.<anonymous> (/Users/chenyuwang/pawpawmall/packages/store/src/root.tsx:83:64)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Object.require.extensions.<computed> [as .js] (/Users/chenyuwang/pawpawmall/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected]/node_modules/ts-node/src/index.ts:1608:43)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Function.Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (/Users/chenyuwang/pawpawmall/packages/store/server.ts:14:15)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
 ELIFECYCLE  Command failed with exit code 1.
 info  rebuilding... (~ src/root.tsx)

 info  rebuilt (484ms)

/Users/chenyuwang/pawpawmall/node_modules/.pnpm/[email protected]/node_modules/pidtree/lib/pidtree.js:61
      callback(new Error('No matching pid found'));
               ^

Error: No matching pid found
    at /Users/chenyuwang/pawpawmall/node_modules/.pnpm/[email protected]/node_modules/pidtree/lib/pidtree.js:61:16
    at /Users/chenyuwang/pawpawmall/node_modules/.pnpm/[email protected]/node_modules/pidtree/lib/ps.js:40:7
    at ChildProcess.<anonymous> (/Users/chenyuwang/pawpawmall/node_modules/.pnpm/[email protected]/node_modules/pidtree/lib/bin.js:57:5)

@pcattori
Copy link
Contributor

pcattori commented Sep 7, 2023

On the dev and v2 branch (release-next), this is already fixed.

You can try it out with the latest pre-release (npx upgrade-remix 2.0.0-pre.8). Fix will land in v2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment