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

Rust workers' dev mode fails with option open Devtools if Chrome not installed, 100% CPU usage #2080

Open
robmv opened this issue May 2, 2024 · 0 comments

Comments

@robmv
Copy link

robmv commented May 2, 2024

After starting the dev mode of the Rust worker example, the option [d] open Devtools fails with the error:

.../node_modules/wrangler/wrangler-dist/cli.js:29573
            throw a;
            ^

Error: spawn google-chrome ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:286:19)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on ChildProcess instance at:
    at ChildProcess._handle.onexit (node:internal/child_process:292:12)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn google-chrome',
  path: 'google-chrome',
  spawnargs: [
    'https://devtools.devprod.cloudflare.dev/js_app?theme=systemPreferred&ws=127.0.0.1%3A9229%2Fws&domain=worker-rust&debugger=true'
  ]
}

This happens because google-chrome isn't installed (I use Fedora packaged Chromium if I need to test Chrome in my development machine, no need for Chrome specifically).

The problem is that after this, the developer mode crashes and leave a workerd process stuck at 100% on a single core. A manual kill of the process is needed:

Screenshot from 2024-05-01 20-11-56

Note: if the Devtools requires Chrome and isn't compatible with Firefox, at least try optionally with chromium-browser if Chrome isn't found.

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

1 participant