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

Failed to connect to daemon error on macOS #9394

Open
1 task done
JoCa96 opened this issue Nov 6, 2024 · 3 comments
Open
1 task done

Failed to connect to daemon error on macOS #9394

JoCa96 opened this issue Nov 6, 2024 · 3 comments
Labels
kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage

Comments

@JoCa96
Copy link

JoCa96 commented Nov 6, 2024

Verify canary release

  • I verified that the issue exists in the latest Turborepo canary release.

Link to code that reproduces this issue

https://github.com/JoCa96/turbo-bug

What package manager are you using / does the bug impact?

npm, pnpm

What operating system are you using?

Mac

Which canary version will you have in your reproduction?

2.2.4-canary.7

Describe the Bug

Running a watch command results in an error even when the daemon is not used:

e.g.

  • pnpm exec turbo watch --filter=pkg-a dev:run
  • pnpm exec turbo --no-daemon watch --filter=pkg-a dev:run
  • TURBO_DAEMON=0 && pnpm exec turbo --no-daemon watch --filter=pkg-a dev:run
turbo 2.2.4-canary.7

• Packages in scope: pkg-a
• Running dev:run in 1 packages
• Remote caching disabled
  × failed to connect to daemon
  ├─▶ timeout while watching directory: deadline has elapsed
  ╰─▶ deadline has elapsed

Expected Behavior

No error

To Reproduce

cd packages/pkg-a
pnpm run dev

Shows log:

turbo 2.2.4-canary.7

• Packages in scope: pkg-a
• Running dev:run in 1 packages
• Remote caching disabled
  × failed to connect to daemon
  ├─▶ timeout while watching directory: deadline has elapsed
  ╰─▶ deadline has elapsed

Additional context

  • bug also appears on older system
  • ps axu | grep turbo shows:
user  xxxxxx   0.0  0.0 408858800  13872   ??  Ss    9:52AM   0:00.14 /xxx/my-turborepo/node_modules/.pnpm/[email protected]/node_modules/turbo-darwin-arm64/bin/turbo --skip-infer daemon
  • npx envinfo --system --npmPackages turbo --binaries prints the following
  System:
    OS: macOS 13.6.7
    CPU: (10) arm64 Apple M1 Max
    Memory: 1000.77 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.17.0 - ~/Library/Caches/fnm_multishells/91962_1730884903902/bin/node
    Yarn: 3.4.1 - ~/Library/Caches/fnm_multishells/91962_1730884903902/bin/yarn
    npm: 10.8.2 - ~/Library/Caches/fnm_multishells/91962_1730884903902/bin/npm
    pnpm: 8.15.6 - ~/Library/Caches/fnm_multishells/91962_1730884903902/bin/pnpm
    bun: 1.1.21 - ~/.bun/bin/bun
  npmPackages:
    turbo: ^2.2.4-canary.7 => 2.2.4-canary.7
@JoCa96 JoCa96 added kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage labels Nov 6, 2024
@eduardoroliveira
Copy link

Cleaning the cache with the command below, solved the issue for me:

npx turbo daemon clean

@JoCa96
Copy link
Author

JoCa96 commented Dec 18, 2024

Unfortunately, this only resolves the issue for a short time.

@mtoader
Copy link

mtoader commented Dec 21, 2024

This seems to happen to me also with 2.3.3 and latest canary .. One thing i noticed was that when this happens i get two folder in the turbod folder:

➜ ls -al /var/folders/_1/m_2xrg4d5vqgmswzr51dsg700000gp/T/turbod/
total 0
drwxr-xr-x    4 mihai  staff   128 Dec 21 09:56 .
drwx------@ 134 mihai  staff  4288 Dec 21 10:02 ..
drwxr-xr-x    4 mihai  staff   128 Dec 21 09:56 4f0d47126379be71
drwxr-xr-x    2 mihai  staff    64 Dec 21 09:56 72d3d2bdcd2f7576

the client (process that runs the main watch command) seems to be using the 72.. while the daemons seems to be using 4f ...

I assume the daemon is spawned with a slightly different config (or hash) and because of that can't connect.

This effectively makes turbo watch unusable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage
Projects
None yet
Development

No branches or pull requests

3 participants