nx-console
nx-console copied to clipboard
Nx console stuck on refreshing workspace on Intellij
Current Behavior
Intellij is stuck on "Refreshing workspace"
Expected Behavior
The refresh workspace either errors out, or actually finish
Steps to Reproduce
I can't have a clear reproduction, as it's a random issues. It happens on any nx monorepo that uses inference, and maybe others that don't
I would love to have more logs (or know how to access them) to have a better idea of what is going on
Failure Logs / Images / Videos
Environment
- Nx Console version: Intellij 2024.3 on 1.33.0
NX Report complete - copy this into the issue template
Node : 20.11.1
OS : darwin-arm64
Native Target : aarch64-macos
yarn : 4.3.1
nx : 20.1.2
@nx/js : 20.1.2
@nx/jest : 20.1.2
@nx/eslint : 20.1.2
@nx/workspace : 20.1.2
@nx/cypress : 20.1.2
@nx/devkit : 20.1.2
@nx/eslint-plugin : 20.1.2
@nx/playwright : 20.1.2
@nx/plugin : 20.1.2
@nx/react : 20.1.2
@nx/storybook : 20.1.2
@nx/vite : 20.1.2
@nx/web : 20.1.2
@nx/webpack : 20.1.2
typescript : 5.5.4
---------------------------------------
Nx Powerpack
Licensed to Payfit for 90 users in 1 workspace until 4/30/2025
---------------------------------------
Registered Plugins:
./tools/nx-tools/src/plugins/main.ts
---------------------------------------
Community plugins:
rxjs : 6.6.7
---------------------------------------
Local workspace plugins:
@payfit/nx-tools
Here's how you access the best logs:
Go to Help > Diagnostic Tools > Debug Log Settings... and then insert #dev.nx.console:trace. Then paste the idea.log or sections of it when the error happens. You can get to it via Help -> Open log in Editor
Do you have an idea about how we could surface this information better to people? Maybe a Help section somewhere with instructions or an action that does this automatically somehow...
Hello! Thanks for the info on how to debug!
Do you have an idea about how we could surface this information better to people? Maybe a Help section somewhere with instructions or an action that does this automatically somehow...
Maybe in the issue template ?
In the meanwhile, here is the logs (filtered to remove telemetry + non nx logs) I found after it popped up again today:
2024-12-09 08:09:11,540 [2433946] INFO - #dev.nx.console.generate.ui.file.V2NxGenerateUiFile - received message GenerateUiRequestValidationOutputMessage(payloadType=request-validation)
2024-12-09 08:09:11,540 [2433946] INFO - #dev.nx.console.generate.ui.file.NxGenerateUiFile - posting message {"payloadType":"validation-results","payload":{}}
2024-12-09 08:09:12,052 [2434458] INFO - #dev.nx.console.generate.ui.file.V2NxGenerateUiFile - received message GenerateUiRunGeneratorOutputMessage(payloadType=run-generator, payload=GenerateUiRunGeneratorPayload(positional=@nx/plugin:plugin, flags=[--directory=tools/my-plugin, --linter=eslint, --no-interactive, --dry-run], cwd=null))
2024-12-09 08:09:12,053 [2434459] INFO - #dev.nx.console.utils.NxExecutable - Checking if there is standalone nx
2024-12-09 08:09:12,054 [2434460] INFO - #dev.nx.console.utils.NxExecutable - Using /Users/nicolasbeaussart-hatchuel/work/payfit/expr/nx-reference-react-devkit/node_modules/.bin as base to find local nx binary
2024-12-09 08:09:24,652 [2447058] INFO - #dev.nx.console.generate.ui.file.V2NxGenerateUiFile - received message GenerateUiRequestValidationOutputMessage(payloadType=request-validation)
2024-12-09 08:09:24,652 [2447058] INFO - #dev.nx.console.generate.ui.file.NxGenerateUiFile - posting message {"payloadType":"validation-results","payload":{}}
2024-12-09 08:09:25,158 [2447564] INFO - #dev.nx.console.generate.ui.file.V2NxGenerateUiFile - received message GenerateUiRunGeneratorOutputMessage(payloadType=run-generator, payload=GenerateUiRunGeneratorPayload(positional=@nx/plugin:plugin, flags=[--directory=tools/my-plugin, --linter=eslint, --unitTestRunner=none, --no-interactive, --dry-run], cwd=null))
2024-12-09 08:09:25,158 [2447564] INFO - #dev.nx.console.utils.NxExecutable - Checking if there is standalone nx
2024-12-09 08:09:25,158 [2447564] INFO - #dev.nx.console.utils.NxExecutable - Using /Users/nicolasbeaussart-hatchuel/work/payfit/expr/nx-reference-react-devkit/node_modules/.bin as base to find local nx binary
2024-12-09 08:09:40,846 [2463252] INFO - #dev.nx.console.generate.ui.file.V2NxGenerateUiFile - received message GenerateUiRunGeneratorOutputMessage(payloadType=run-generator, payload=GenerateUiRunGeneratorPayload(positional=@nx/plugin:plugin, flags=[--directory=tools/my-plugin, --linter=eslint, --unitTestRunner=none, --no-interactive], cwd=null))
2024-12-09 08:09:40,846 [2463252] INFO - #dev.nx.console.utils.NxExecutable - Checking if there is standalone nx
2024-12-09 08:09:40,847 [2463253] INFO - #dev.nx.console.utils.NxExecutable - Using /Users/nicolasbeaussart-hatchuel/work/payfit/expr/nx-reference-react-devkit/node_modules/.bin as base to find local nx binary
2024-12-09 08:09:45,805 [2468211] FINER - #dev.nx.console.nxls.NxlsProcess - Nxls early exit: process.exit called with code 1
2024-12-09 08:09:45,805 [2468211] INFO - #dev.nx.console.nxls.NxlsWrapper - Stopping nxls
2024-12-09 08:09:45,806 [2468212] INFO - #dev.nx.console.nxls.NxlsWrapper - Unable to send messages to the nxls, the process has exited
2024-12-09 08:09:45,806 [2468212] INFO - #dev.nx.console.nxls.NxlsWrapper - Disconnected file:///Users/nicolasbeaussart-hatchuel/work/payfit/expr/nx-reference-react-devkit/package.json
2024-12-09 08:09:45,806 [2468212] INFO - #dev.nx.console.nxls.NxlsWrapper - Unable to send messages to the nxls, the process has exited
2024-12-09 08:09:45,806 [2468212] INFO - #dev.nx.console.nxls.NxlsWrapper - Disconnected file:///Users/nicolasbeaussart-hatchuel/work/payfit/expr/nx-reference-react-devkit/nx.json
2024-12-09 08:09:45,806 [2468212] INFO - #dev.nx.console.nxls.NxlsWrapper - Unable to send messages to the nxls, the process has exited
2024-12-09 08:09:45,806 [2468212] INFO - #dev.nx.console.nxls.NxlsWrapper - Disconnected file:///Users/nicolasbeaussart-hatchuel/work/payfit/expr/nx-reference-react-devkit/packages/ui/kit/package.json
2024-12-09 08:09:45,806 [2468212] INFO - #dev.nx.console.nxls.NxlsWrapper - Unable to send messages to the nxls, the process has exited
2024-12-09 08:09:45,806 [2468212] FINER - #dev.nx.console.nxls.NxlsWrapper - Sending request to nxls: shutdown (null)
2024-12-09 08:09:45,806 [2468212] INFO - #dev.nx.console.nxls.NxlsWrapper - Unable to send messages to the nxls, the process has exited
2024-12-09 08:09:46,810 [2469216] INFO - #dev.nx.console.nxls.NxlsWrapper - Unable to send messages to the nxls, the process has exited
2024-12-09 08:09:46,810 [2469216] INFO - #dev.nx.console.nxls.NxlsWrapper - Unable to send messages to the nxls, the process has exited
2024-12-09 08:09:46,810 [2469216] INFO - #dev.nx.console.nxls.NxlsProcess - stopping nxls process
2024-12-09 08:09:46,810 [2469216] INFO - #dev.nx.console.nxls.NxlsProcess - process is not alive
2024-12-09 08:09:46,810 [2469216] INFO - #dev.nx.console.nxls.NxlsProcess - Process exited: true
2024-12-09 08:16:43,853 [2886259] INFO - #dev.nx.console.listeners.NxEditorListener - Connecting /Users/nicolasbeaussart-hatchuel/work/payfit/expr/nx-reference-react-devkit/packages/utils/package.json to lsp
2024-12-09 08:16:43,853 [2886259] INFO - #dev.nx.console.nxls.NxlsWrapper - Nxls not ready for documents yet..
2024-12-09 08:16:43,863 [2886269] FINER - #dev.nx.console.nxls.NxlsWrapper - Sending request to nxls: nx/workspace (NxWorkspaceRequest(reset=false))
2024-12-09 08:16:43,863 [2886269] INFO - #dev.nx.console.nxls.NxlsWrapper - Unable to send messages to the nxls, the process has exited
2024-12-09 08:16:44,275 [2886681] FINER - #dev.nx.console.nxls.NxlsWrapper - Sending request to nxls: nx/workspace (NxWorkspaceRequest(reset=false))
2024-12-09 08:16:44,275 [2886681] INFO - #dev.nx.console.nxls.NxlsWrapper - Unable to send messages to the nxls, the process has exited
2024-12-09 08:16:46,770 [2889176] INFO - #dev.nx.console.completion.NxCompletionContributor - Getting completions
2024-12-09 08:16:46,772 [2889178] INFO - #dev.nx.console.completion.NxCompletionContributor - Getting completions
2024-12-09 08:16:47,180 [2889586] FINER - #dev.nx.console.nxls.NxlsWrapper - Sending request to nxls: nx/workspace (NxWorkspaceRequest(reset=false))
2024-12-09 08:16:47,181 [2889587] INFO - #dev.nx.console.nxls.NxlsWrapper - Unable to send messages to the nxls, the process has exited
2024-12-09 08:21:34,832 [3177238] FINER - #dev.nx.console.nxls.NxlsWrapper - Sending request to nxls: nx/stopDaemon (null)
2024-12-09 08:21:34,832 [3177238] INFO - #dev.nx.console.nxls.NxlsWrapper - Unable to send messages to the nxls, the process has exited
2024-12-09 08:23:47,015 [3309421] FINER - #dev.nx.console.nxls.NxlsWrapper - Sending request to nxls: nx/generators (NxGeneratorsRequest(options=NxGeneratorsRequestOptions(includeHidden=false, includeNgAdd=false)))
2024-12-09 08:23:47,015 [3309421] INFO - #dev.nx.console.nxls.NxlsWrapper - Unable to send messages to the nxls, the process has exited
2024-12-09 08:23:51,344 [3313750] FINER - #dev.nx.console.nxls.NxlsWrapper - Sending request to nxls: nx/workspace (NxWorkspaceRequest(reset=false))
2024-12-09 08:23:51,344 [3313750] INFO - #dev.nx.console.nxls.NxlsWrapper - Unable to send messages to the nxls, the process has exited
2024-12-09 08:23:51,742 [3314148] FINER - #dev.nx.console.nxls.NxlsWrapper - Sending request to nxls: nx/workspace (NxWorkspaceRequest(reset=false))
2024-12-09 08:23:51,742 [3314148] INFO - #dev.nx.console.nxls.NxlsWrapper - Unable to send messages to the nxls, the process has exited
2024-12-09 08:24:00,897 [3323303] FINER - #dev.nx.console.nxls.NxlsWrapper - Sending request to nxls: nx/generators (NxGeneratorsRequest(options=NxGeneratorsRequestOptions(includeHidden=false, includeNgAdd=false)))
2024-12-09 08:24:00,897 [3323303] INFO - #dev.nx.console.nxls.NxlsWrapper - Unable to send messages to the nxls, the process has exited
Running nx daemon status shows that it's still working.
So the nxls process exited early, but I don't know how to get the nxls logs 😅
2024-12-09 08:09:45,805 [2468211] FINER - #dev.nx.console.nxls.NxlsProcess - Nxls early exit: process.exit called with code 1
Also, I'm wondering, why is the console trying to stop the nx daemon ?
hmm this means that it died during startup... does refreshing fix the issue?
hmm this means that it died during startup...
I cropped the logs since it was a 29 megs logs 😅 It works for a while, and then, it breaks for no reason I can understand :/
does refreshing fix the issue?
Restarting the whole ide fixes it yes, but that's the sonly solution I've found :/
Clicking "refresh workspace" is blocked in the progress bar shown in the issue
Yikes, not sure how this is happening. There has been some changes to how the nxls starts up... Can you try again on 1.35.1? It should be out today or tomorrow
I'm having very similar issues with the VSCode extension. It almost never survives more than 15 minutes of work. I have to terminate all node processes to release the daemon.log file. When I start VSCode, in most cases NX won't start until i run nx reset from the terminal. It "releases" the extension but the reset process fails.
When it's finally working, there is another issue which might be related. Every NX command I run takes forever to start. Seems like it's refreshing the workspace on every file change. Really strange behavior and I can't figure out what's causing it. I just switch to working with the command line and use the extension when I have to. Mostly to for generators.
Hey @eyalellenbogen that sounds bad, please create a new GH issue so we can keep the discussions separate. Provide at least your nx report and if you can distill it down to a minimal repro that increases our chances of tracking this down and fixing it a lot! So please try that.
Thanks, looking forward to hearing from you.
Same here
If that state is reached, I think the refresh does nothing at all as I don't see any logs from the plugin after clicking on the button. Does not disappear and does not show an x to close/kill. Only thing working is an IDE restart.
I thing these are the logs of the cause
2025-04-12 07:34:19,936 [75413251] WARN - org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint - Unexpected params '[null]' for 'public final void dev.nx.console.nxls.client.NxlsLanguageClient.refreshWorkspaceStarted()' is ignored
2025-04-12 07:34:19,936 [75413251] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - Refresh workspace started called from nxls
2025-04-12 07:34:19,938 [75413253] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2025-04-12T05:34:19.937Z - Retrieving workspace configuration for nx 20.7.2
2025-04-12 07:34:19,938 [75413253] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2025-04-12T05:34:19.938Z - Using local Nx package at C:/Users/MyPC.LAPTOP-XYZ/Workspace/my-project/node_modules/nx/src/utils/output.js
2025-04-12 07:34:19,938 [75413253] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2025-04-12T05:34:19.938Z - Using local Nx package at C:/Users/MyPC.LAPTOP-XYZ/Workspace/my-project/node_modules/nx/src/project-graph/file-map-utils.js
2025-04-12 07:34:19,938 [75413253] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2025-04-12T05:34:19.938Z - Using local Nx package at C:/Users/MyPC.LAPTOP-XYZ/Workspace/my-project/node_modules/nx/src/daemon/client/client.js
2025-04-12 07:34:19,938 [75413253] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2025-04-12T05:34:19.938Z - Using local Nx package at C:/Users/MyPC.LAPTOP-XYZ/Workspace/my-project/node_modules/nx/src/project-graph/project-graph.js
2025-04-12 07:34:19,938 [75413253] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2025-04-12T05:34:19.941Z - createProjectGraphAndSourceMapsAsync
2025-04-12 07:34:19,957 [75413272] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2025-04-12T05:34:19.959Z - createProjectGraphAndSourceMapsAsync successful
2025-04-12 07:34:19,972 [75413287] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2025-04-12T05:34:19.971Z - Resetting daemon client
2025-04-12 07:34:19,972 [75413287] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2025-04-12T05:34:19.971Z - Retrieved workspace configuration in: 34.3210999998264 ms
2025-04-12 07:34:20,234 [75413549] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2025-04-12T05:34:20.233Z - Unregistering file watcher
2025-04-12 07:34:20,234 [75413549] WARN - org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint - Unexpected params '[null]' for 'public final void dev.nx.console.nxls.client.NxlsLanguageClient.refreshWorkspace()' is ignored
2025-04-12 07:34:20,234 [75413549] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - Refresh workspace called from nxls
2025-04-12 07:34:20,234 [75413549] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2025-04-12T05:34:20.234Z - Using local Nx package at C:/Users/MyPC.LAPTOP-XYZ/Workspace/my-project/node_modules/nx/src/native/index.js
2025-04-12 07:34:23,370 [75416685] INFO - #c.j.e.l.s.h.m.HyperskillMetricsScheduler - Hyperskill user logged out. No events were sent.
2025-04-12 07:34:23,370 [75416685] INFO - #c.j.e.l.s.h.m.HyperskillMetricsScheduler - Hyperskill user logged out. No events were sent.
2025-04-12 07:34:23,370 [75416685] INFO - #c.j.e.l.s.h.m.HyperskillMetricsScheduler - Hyperskill user logged out. No events were sent.
2025-04-12 07:34:23,410 [75416725] INFO - #c.j.e.l.s.h.m.HyperskillMetricsScheduler - Hyperskill user logged out. No events were sent.
2025-04-12 07:35:10,807 [75464122] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2025-04-12T05:35:10.807Z - native watcher detected project changes in files package.json
2025-04-12 07:35:10,945 [75464260] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2025-04-12T05:35:10.944Z - native watcher detected project changes in files yarn.lock
2025-04-12 07:35:11,953 [75465268] WARN - org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint - Unexpected params '[null]' for 'public final void dev.nx.console.nxls.client.NxlsLanguageClient.refreshWorkspaceStarted()' is ignored
2025-04-12 07:35:11,953 [75465268] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - Refresh workspace started called from nxls
2025-04-12 07:35:11,954 [75465269] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2025-04-12T05:35:11.954Z - Retrieving workspace configuration for nx 20.7.2
2025-04-12 07:35:11,954 [75465269] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2025-04-12T05:35:11.955Z - Using local Nx package at C:/Users/MyPC.LAPTOP-XYZ/Workspace/my-project/node_modules/nx/src/daemon/client/client.js
2025-04-12 07:35:11,954 [75465269] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2025-04-12T05:35:11.955Z - Using local Nx package at C:/Users/MyPC.LAPTOP-XYZ/Workspace/my-project/node_modules/nx/src/utils/output.js
2025-04-12 07:35:11,954 [75465269] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2025-04-12T05:35:11.955Z - Using local Nx package at C:/Users/MyPC.LAPTOP-XYZ/Workspace/my-project/node_modules/nx/src/project-graph/file-map-utils.js
2025-04-12 07:35:11,954 [75465269] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2025-04-12T05:35:11.955Z - Using local Nx package at C:/Users/MyPC.LAPTOP-XYZ/Workspace/my-project/node_modules/nx/src/project-graph/project-graph.js
2025-04-12 07:35:11,958 [75465273] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2025-04-12T05:35:11.957Z - createProjectGraphAndSourceMapsAsync
2025-04-12 07:35:11,961 [75465276] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2025-04-12T05:35:11.961Z - Unable to get project graph
2025-04-12 07:35:11,961 [75465276] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2025-04-12T05:35:11.961Z - Error: LOCK_FILES_CHANGED
at handleMessage (C:\Users\MyPC.LAPTOP-XYZ\Workspace\my-project\node_modules\nx\src\daemon\server\server.js:94:88)
at C:\Users\MyPC.LAPTOP-XYZ\Workspace\my-project\node_modules\nx\src\daemon\server\server.js:74:15
at Socket.<anonymous> (C:\Users\MyPC.LAPTOP-XYZ\Workspace\my-project\node_modules\nx\src\utils\consume-messages-from-socket.js:13:17)
at Socket.emit (node:events:507:28)
at addChunk (node:internal/streams/readable:559:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
at Readable.push (node:internal/streams/readable:390:5)
at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)
2025-04-12 07:35:11,977 [75465292] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2025-04-12T05:35:11.976Z - Unable to get nx workspace configuration: TypeError: allWorkspaceFiles is not iterable
2025-04-12 07:35:12,272 [75465587] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2025-04-12T05:35:12.272Z - Unregistering file watcher
2025-04-12 07:35:12,273 [75465588] WARN - org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint - Unexpected params '[null]' for 'public final void dev.nx.console.nxls.client.NxlsLanguageClient.refreshWorkspace()' is ignored
2025-04-12 07:35:12,273 [75465588] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - Refresh workspace called from nxls
2025-04-12 07:35:12,273 [75465588] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2025-04-12T05:35:12.272Z - reconfiguration failed, trying again in 1 seconds
2025-04-12 07:35:12,273 [75465588] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - Unhandled exception: cannot send event to internal channel: sending into a closed channel
Caused by:
sending into a closed channel
Error: cannot send event to internal channel: sending into a closed channel
Caused by:
sending into a closed channel
2025-04-12 07:35:12,273 [75465588] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2025-04-12T05:35:12.273Z - Using local Nx package at C:/Users/MyPC.LAPTOP-XYZ/Workspace/my-project/node_modules/nx/src/native/index.js
2025-04-12 07:35:13,275 [75466590] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2025-04-12T05:35:13.275Z - Retrieving workspace configuration for nx 20.7.2
2025-04-12 07:35:13,275 [75466590] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2025-04-12T05:35:13.277Z - Using local Nx package at C:/Users/MyPC.LAPTOP-XYZ/Workspace/my-project/node_modules/nx/src/utils/output.js
2025-04-12 07:35:13,278 [75466593] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2025-04-12T05:35:13.278Z - Using local Nx package at C:/Users/MyPC.LAPTOP-XYZ/Workspace/my-project/node_modules/nx/src/project-graph/project-graph.js
2025-04-12 07:35:13,278 [75466593] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2025-04-12T05:35:13.278Z - Using local Nx package at C:/Users/MyPC.LAPTOP-XYZ/Workspace/my-project/node_modules/nx/src/daemon/client/client.js
2025-04-12 07:35:13,278 [75466593] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2025-04-12T05:35:13.278Z - Using local Nx package at C:/Users/MyPC.LAPTOP-XYZ/Workspace/my-project/node_modules/nx/src/project-graph/file-map-utils.js
2025-04-12 07:35:13,282 [75466597] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2025-04-12T05:35:13.282Z - createProjectGraphAndSourceMapsAsync
2025-04-12 07:35:13,304 [75466619] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2025-04-12T05:35:13.304Z - createProjectGraphAndSourceMapsAsync successful
2025-04-12 07:35:13,318 [75466633] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2025-04-12T05:35:13.317Z - Resetting daemon client
2025-04-12 07:35:13,318 [75466633] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2025-04-12T05:35:13.318Z - Retrieved workspace configuration in: 42.91949999984354 ms
2025-04-12 07:35:13,925 [75467240] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2025-04-12T05:35:13.924Z - Unregistering file watcher
2025-04-12 07:35:13,925 [75467240] WARN - org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint - Unexpected params '[null]' for 'public final void dev.nx.console.nxls.client.NxlsLanguageClient.refreshWorkspace()' is ignored
2025-04-12 07:35:13,925 [75467240] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - Refresh workspace called from nxls
2025-04-12 07:35:13,925 [75467240] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - Unhandled exception: cannot send event to internal channel: sending into a closed channel
Caused by:
sending into a closed channel
Error: cannot send event to internal channel: sending into a closed channel
Caused by:
sending into a closed channel
2025-04-12 07:35:13,926 [75467241] INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2025-04-12T05:35:13.926Z - Using local Nx package at C:/Users/MyPC.LAPTOP-XYZ/Workspace/my-project/node_modules/nx/src/native/index.js
2025-04-12 07:35:15,741 [75469056] INFO - #c.i.o.p.DumbServiceImpl - enter dumb mode [my-project]
Hi,
I'm having same problem with plugin, used in WebStorm 2025.1.1. First, error occurs related to project graph, every 10 minutes:
Error No projects found in the workspace.
Nx encountered the following issues while processing the project graph:
Error: Loading "@nx/js/typescript" timed out after 10 minutes. As a last resort, you can set NX_PLUGIN_NO_TIMEOUTS=true to bypass this timeout. at Timeout._onTimeout (C:\src\monorepo\node_modules\nx\src\project-graph\plugins\isolation\plugin-pool.js:51:17) at listOnTimeout (node:internal/timers:573:17) at process.processTimers (node:internal/timers:514:7)
I cannot collect detailed logs, these do not appear in files explorer despite using flag @MaxKless pointed out
I'm seeing the same thing in VS Code on Windows.
The following error is logged in the Nx Language Server - after this point I cannot get Nx Console to finish refreshing the workspace.
[Error - 10:05:13 AM] Unhandled exception: cannot send event to internal channel: sending into a closed channel
The only thing I have found that helps is to reload the window - but the error will occur again pretty much immediately.
For now I'll probably just disable the extension until I need it.
Output from npx nx report:
NX Report complete - copy this into the issue template
Node : 22.18.0
OS : win32-x64
Native Target : x86_64-windows
npm : 10.9.3
nx : 21.4.0
@nx/js : 21.4.0
@nx/jest : 21.4.0
@nx/eslint : 21.4.0
@nx/workspace : 21.4.0
@nx/angular : 21.4.0
@nx/devkit : 21.4.0
@nx/eslint-plugin : 21.4.0
@nx/module-federation : 21.4.0
@nx/playwright : 21.4.0
@nx/plugin : 21.4.0
@nx/rspack : 21.4.0
@nx/vite : 21.4.0
@nx/web : 21.4.0
@nx/webpack : 21.4.0
typescript : 5.8.3
---------------------------------------
Registered Plugins:
@nx/playwright/plugin
@nx/eslint/plugin
---------------------------------------
Community plugins:
@analogjs/vite-plugin-angular : 1.19.4
@analogjs/vitest-angular : 1.19.4
@ngrx/operators : 20.0.0
@ngrx/signals : 20.0.0
@testing-library/angular : 18.0.0
angular-eslint : 20.1.1
---------------------------------------
Local workspace plugins:
@org/recommended
---------------------------------------
Cache Usage: 0.00 B / 94.37 GB
Same for me on VSCode on Windows.
Initial fresh start of VS Code is ok.
Occurs for me after i do an npm start (which is for me "npm run env -s && nx serve --hmr"), then it is stuck.
VS-Code:
NX Language Server Output:
[Error - 12:12:51 PM] Unhandled exception: cannot send event to internal channel: sending into a closed channel
Caused by:
sending into a closed channel
Error: cannot send event to internal channel: sending into a closed channel
Caused by:
sending into a closed channel
report output:
npx nx report
NX Report complete - copy this into the issue template
Node : 22.18.0
OS : win32-x64
Native Target : x86_64-windows
npm : 10.9.3
nx : 21.4.1
@nx/js : 21.4.1
@nx/eslint : 21.4.1
@nx/workspace : 21.4.1
@nx/angular : 21.4.1
@nx/devkit : 21.4.1
@nx/module-federation : 21.4.1
@nx/rspack : 21.4.1
@nx/web : 21.4.1
@nx/webpack : 21.4.1
typescript : 5.8.3
---------------------------------------
Community plugins:
@ngrx/effects : 20.0.0
@ngrx/operators : 20.0.0
@ngrx/router-store : 20.0.0
@ngrx/store : 20.0.0
@ngrx/store-devtools : 20.0.0
ngx-toastr : 19.0.0
---------------------------------------
Cache Usage: 0.00 B / 63.85 GB
Having the same problem as commented above with windows/vs code... My "fix" is to not use latest nx console extension (18.66.x freezes). Using 18.65.1 works fine, the latest before 18.66.0, so this is a new issue @MaxKless introduced in 18.66...
okay, thanks for the reports everyone. I'll look into it on windows and see if I can reproduce it :)
I think an easy way to reproduce is upgrading an npm package in a workspace while running with nx console in vs-code, at least that's how I ran into it... Don't know if it matters, but I'm using pnpm and angular in my project...
I was able to reproduce and fix it with the above PR :)