nrwl / nx-console

Nx Console is the user interface for Nx & Lerna.
https://nx.dev
MIT License
1.31k stars 210 forks source link

IDE Errors in PhpStorm with latest Nx Console (1.19.0) #2041

Closed NorseJedi closed 5 months ago

NorseJedi commented 6 months ago

Current Behavior

Nx Console throws errors in PhpStorm 2023.3.4 every time I save the files in my project. This started after I upgraded the plugin to 1.19.0 and was not present on the previous version I had (1.18.0).

Full text of the error pasted in "Failure logs" window - all errors are identical except for the hex numbers (3def61de and 118d0a97 in the example). image

Expected Behavior

I expect nothing to happen

GitHub Repo

No response

Steps to Reproduce

  1. Open an Nx repo in PhpStorm
  2. Open any file
  3. Hit Ctrl+s to save
  4. Observe lower right corner of IDE window to show an exclamation mark

Nx Report

Node   : 20.11.1
OS     : linux-x64
npm    : 10.5.0

nx (global)        : 18.0.6
nx                 : 18.0.6
@nx/js             : 18.0.6
@nx/jest           : 18.0.6
@nx/linter         : 18.0.6
@nx/eslint         : 18.0.6
@nx/workspace      : 18.0.6
@nx/angular        : 18.0.6
@nx/workspace      : 18.0.6
@nx/angular        : 18.0.6
@nx/cypress        : 18.0.6
@nx/devkit         : 18.0.6
@nx/esbuild        : 18.0.6
@nx/eslint-plugin  : 18.0.6
@nx/nest           : 18.0.6
@nx/node           : 18.0.6
@nrwl/tao          : 18.0.6
@nx/web            : 18.0.6
@nx/webpack        : 18.0.6
typescript         : 5.3.3

Failure Logs

Unhandled exception in [StandaloneCoroutine{Cancelling}@3def61de, Dispatchers.Default]

com.intellij.util.IncorrectOperationException: Sorry but parent: com.intellij.ui.jcef.JBCefClient@118d0a97 (class com.intellij.ui.jcef.JBCefClient) has already been disposed (see the cause for stacktrace) so the child: com.intellij.ui.jcef.JBCefJSQuery@6464381f (class com.intellij.ui.jcef.JBCefJSQuery) will never be disposed
    at com.intellij.openapi.util.ObjectTree.register(ObjectTree.java:43)
    at com.intellij.openapi.util.Disposer.register(Disposer.java:161)
    at com.intellij.ui.jcef.JBCefJSQuery.<init>(JBCefJSQuery.java:38)
    at com.intellij.ui.jcef.JBCefJSQuery.lambda$create$0(JBCefJSQuery.java:56)
    at com.intellij.ui.jcef.JBCefJSQuery.create(JBCefJSQuery.java:59)
    at dev.nx.console.project_details.ProjectDetailsBrowser$registerResetHandler$1.invokeSuspend(ProjectDetailsBrowser.kt:232)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
    Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelled}@3def61de, Dispatchers.Default]

Here is the content of idea.log (just the part that was logged when I triggered the error):

2024-03-03 00:23:52,743 [ 311515] SEVERE - #c.i.o.a.i.CoroutineExceptionHandlerImpl - Unhandled exception in [StandaloneCoroutine{Cancelling}@6200f113, Dispatchers.Default]
com.intellij.util.IncorrectOperationException: Sorry but parent: com.intellij.ui.jcef.JBCefClient@77c033ae (class com.intellij.ui.jcef.JBCefClient) has already been disposed (see the cause for stacktrace) so the child: com.intellij.ui.jcef.JBCefJSQuery@19ff99db (class com.intellij.ui.jcef.JBCefJSQuery) will never be disposed
    at com.intellij.openapi.util.ObjectTree.register(ObjectTree.java:43)
    at com.intellij.openapi.util.Disposer.register(Disposer.java:161)
    at com.intellij.ui.jcef.JBCefJSQuery.<init>(JBCefJSQuery.java:38)
    at com.intellij.ui.jcef.JBCefJSQuery.lambda$create$0(JBCefJSQuery.java:56)
    at com.intellij.ui.jcef.JBCefJSQuery.create(JBCefJSQuery.java:59)
    at dev.nx.console.project_details.ProjectDetailsBrowser$registerResetHandler$1.invokeSuspend(ProjectDetailsBrowser.kt:232)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
2024-03-03 00:23:52,744 [ 311516] SEVERE - #c.i.o.a.i.CoroutineExceptionHandlerImpl - PhpStorm 2023.3.4  Build #PS-233.14475.35
2024-03-03 00:23:52,745 [ 311517] SEVERE - #c.i.o.a.i.CoroutineExceptionHandlerImpl - JDK: 17.0.10; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
2024-03-03 00:23:52,745 [ 311517] SEVERE - #c.i.o.a.i.CoroutineExceptionHandlerImpl - OS: Windows 11
2024-03-03 00:23:52,745 [ 311517] SEVERE - #c.i.o.a.i.CoroutineExceptionHandlerImpl - Plugin to blame: Nx Console version: 1.19.0
2024-03-03 00:23:52,745 [ 311517] SEVERE - #c.i.o.a.i.CoroutineExceptionHandlerImpl - Last Action: ShowLog
2024-03-03 00:23:52,746 [ 311518]   INFO - STDERR - Exception in thread "DefaultDispatcher-worker-16" com.intellij.util.IncorrectOperationException: Sorry but parent: com.intellij.ui.jcef.JBCefClient@77c033ae (class com.intellij.ui.jcef.JBCefClient) has already been disposed (see the cause for stacktrace) so the child: com.intellij.ui.jcef.JBCefJSQuery@19ff99db (class com.intellij.ui.jcef.JBCefJSQuery) will never be disposed
2024-03-03 00:23:52,746 [ 311518]   INFO - STDERR -     at com.intellij.openapi.util.ObjectTree.register(ObjectTree.java:43)
2024-03-03 00:23:52,746 [ 311518]   INFO - STDERR -     at com.intellij.openapi.util.Disposer.register(Disposer.java:161)
2024-03-03 00:23:52,746 [ 311518]   INFO - STDERR -     at com.intellij.ui.jcef.JBCefJSQuery.<init>(JBCefJSQuery.java:38)
2024-03-03 00:23:52,746 [ 311518]   INFO - STDERR -     at com.intellij.ui.jcef.JBCefJSQuery.lambda$create$0(JBCefJSQuery.java:56)
2024-03-03 00:23:52,746 [ 311518]   INFO - STDERR -     at com.intellij.ui.jcef.JBCefJSQuery.create(JBCefJSQuery.java:59)
2024-03-03 00:23:52,746 [ 311518]   INFO - STDERR -     at dev.nx.console.project_details.ProjectDetailsBrowser$registerResetHandler$1.invokeSuspend(ProjectDetailsBrowser.kt:232)
2024-03-03 00:23:52,746 [ 311518]   INFO - STDERR -     at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
2024-03-03 00:23:52,746 [ 311518]   INFO - STDERR -     at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
2024-03-03 00:23:52,746 [ 311518]   INFO - STDERR -     at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
2024-03-03 00:23:52,746 [ 311518]   INFO - STDERR -     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
2024-03-03 00:23:52,746 [ 311518]   INFO - STDERR -     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
2024-03-03 00:23:52,746 [ 311518]   INFO - STDERR -     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
2024-03-03 00:23:52,746 [ 311518]   INFO - STDERR -     Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@6200f113, Dispatchers.Default]

Package Manager Version

No response

Operating System

Additional Information

WSL2 Ubuntu under Windows 11 Pro Project located on WSL2 filesystem. PhpStorm is Windows native version acessing the project files through \wsl$\

MaxKless commented 6 months ago

Hey! Thanks a lot for the report. I haven't been able to repro this yet but I'll check it out. Moving this to the Nx Console repo so we can track it there.

deiiviidas commented 6 months ago

im also adding some other error

image

deiiviidas commented 6 months ago

as i remember i had this plugin crash error, in ide, for about 40days in various plugin versions @MaxKless

MaxKless commented 6 months ago

yes I've also seen this, I have a fix already and will push up a PR soon. Are you sure you've seen this error for so long? The feature hasn't existed for 40 days...

deiiviidas commented 6 months ago

oh maybe its sooner but yes

image

deiiviidas commented 6 months ago

"18.0.1" nx version it was as i remember

MaxKless commented 6 months ago

will be fixed in https://github.com/nrwl/nx-console/pull/2045 Once it's released, would be glad to hear confirmation from you on whether it works

MaxKless commented 5 months ago

Hey everyone! Did you upgrade to the latest Nx Console version? Does this bug still happen for you? @deiiviidas @NorseJedi

MaxKless commented 5 months ago

I'm closing this issue since it was fixed in #2045 If this or something similar is still happening for you, please let me know and we can investigate.

MonstraG commented 5 months ago

Used it for like 8 hours, no problems yet in Rider.