iguissouma / nx-console-idea-plugin

Apache License 2.0
39 stars 9 forks source link

NX tasks and projects not displayed #91

Closed colinscz closed 1 year ago

colinscz commented 2 years ago

Describe the bug: Since the last upgrade (0.46.3) I face two issues:

  1. The NX View/Tab is not shown anymore by default even though I fixed it to the sidebar (minor)
  2. Upon opening nx.json and doing right-click "Show Nx Tasks", the windows shows no tasks or projects, the console looks like this: grafik

I can still execute the tasks when I go to the top-level package.json in my nx workspace, but not over the plugin anymore.

Steps to reproduce: Just open your IntelliJ workspace and nx.json and do a right-click on the option "Show Nx Tasks"

Expected behavior: Nx Console shows the projects and the tasks as shown here in the plugin image: grafik

Working environment

iguissouma commented 2 years ago

Hello, thank you for reporting this issue. Sorry for the delay I'm on vacation with limited access to internet.

Do you see any error or exceptions? Do you see this behaviour on a new generated nx workspace?

colinscz commented 2 years ago

Hey @iguissouma No worries.

As of now I see no exception. I see this behaviour on an existing nx workspace. I just created a fresh new nx workspace with the preset angular + nest and it seems that I don't have that issue there. I will compare the two apps more in depth and let you know in case I find any difference in terms of the setup.

grafik
iguissouma commented 2 years ago

It may be something missing or invalid in workspace.json or project.json files You can see IDE log idea.log file maybe yo see some plugin exceptions... Help>Show Log... If you see something related to plugin when opening the workspace, you can put it here I will take a look.

colinscz commented 2 years ago

I had a look at the log. The only issue I found that could be related to the plugin is something regarding the image: 2022-07-22 08:38:07,557 [ 812640] WARN - #c.i.o.w.i.ToolWindowImpl - ToolWindow icons should be 13x13. Please fix ToolWindow (ID: Nx ) or icon ImageDataByPathLoader(classLoader=PluginClassLoader(plugin=PluginDescriptor(name=Nx Console Idea, id=com.github.iguissouma.nxconsole, descriptorPath=plugin.xml, path=C:\develop\.IntelliJIdea2022.1\config\plugins\Nx Console Idea, version=0.46.3, package=null, isBundled=false), packagePrefix=null, instanceId=346, state=active), path=icons/nrwl.svg, original=null)

So I compared the project.json and the workspace.json, even compared it with an old version I had working. And unfortunately no luck with both. Seems to be broken for the old as for the new version. I upgraded to the newest plugin version and got the same issue that no nx task is shown. I did the following additional steps to troubleshoot:

colinscz commented 2 years ago

When scanning the workspace for nx.json files (unfortunately I cannot give you the full output here since the project is corporate) it finds the dedicated nx.json but the last info log printed suggests an empty array. Not sure if this is fine: 2022-07-26 15:33:10,492 [ 46000] INFO - #c.g.i.n.b.NxJsbtStartupActivity - Found [] for com.github.iguissouma.nxconsole.buildTools.NxService

These are the logs from around the time when my colleague clicked update and before the IDEA was shutdown to perform the plugin update.

2022-07-26 15:31:45,752 [81675409]   INFO - #o.p.i.e.Classloaders - Creating classloader for [file:/C:/develop/.IntelliJIdea2022.1/config/plugins/plantuml4idea/lib/adapter.jar, file:/C:/develop/.IntelliJIdea2022.1/config/plugins/plantuml4idea/lib/plantuml-1.2022.4.jar]
2022-07-26 15:31:45,783 [81675440]   WARN - #c.i.o.o.e.ConfigurableExtensionPointUtil - ignore deprecated groupId: language for id: preferences.language.Kotlin.scripting
2022-07-26 15:31:46,812 [81676469]   INFO - #c.i.AbstractBundle - Cannot load resource bundle from *.properties file, falling back to slow class loading: messages.AndroidBundle
2022-07-26 15:31:46,814 [81676471]   INFO - #c.i.i.p.PluginManager - Cannot find plugin org.jetbrains.android resource-bundle: messages.AndroidBundle
2022-07-26 15:31:46,815 [81676472]   INFO - #c.i.AbstractBundle - Cannot load resource bundle from *.properties file, falling back to slow class loading: messages.SpaceBundle
2022-07-26 15:31:46,816 [81676473]   INFO - #c.i.i.p.PluginManager - Cannot find plugin com.jetbrains.space resource-bundle: messages.SpaceBundle
2022-07-26 15:32:06,271 [81695928]   INFO - #c.i.i.p.DynamicPlugins - Plugin com.github.iguissouma.nxconsole is not unload-safe because of extension to non-dynamic EP com.intellij.notification.parentGroup
2022-07-26 15:32:06,299 [81695956]   INFO - #c.i.i.p.m.MarketplacePluginDownloadService - File 'C:\develop\.IntelliJIdea2022.1\system\plugins\Nx Console Idea.zip' not found
2022-07-26 15:32:15,613 [81705270]   WARN - #c.i.o.o.e.ConfigurableCardPanel - auto-dispose 'Plugins' id=preferences.pluginManager
2022-07-26 15:32:16,376 [81706033]   WARN - #o.j.i.maven - Maven pulling logger was failed: 44222 times
2022-07-26 15:32:16,377 [81706034]   WARN - #o.j.i.maven - Maven pulling download listener was failed: 26901 times
2022-07-26 15:32:16,577 [81706234]   INFO - #c.i.c.ComponentStoreImpl - Saving Project(name=Project Name, containerState=COMPONENT_CREATED, componentStore=C:\Develop\projectName)RunManager took 24 ms
2022-07-26 15:32:16,744 [81706401]   INFO - #c.i.h.h.r.r.HttpRequestGlobalContext - Global request context for 'Project Name' was disposed.
2022-07-26 15:32:16,902 [81706559]   INFO - #c.j.r.f.FollowMeManager - Unregister user 0:'<User>' with ClientId=ClientId(value=Host)
2022-07-26 15:32:17,053 [81706710]   INFO - j.b.s.i.CancelableXmlRpcTargetImpl - Disposing XML-RPC executor
2022-07-26 15:32:17,054 [81706711]   INFO - j.b.s.i.SessionXmlRpcTargetImpl - Disposing XML-RPC session connections
2022-07-26 15:32:17,054 [81706711]   INFO - j.b.s.i.CancelableXmlRpcTargetImpl - Disposing XML-RPC executor
2022-07-26 15:32:17,600 [81707257]   INFO - #c.i.c.b.CompilerReferenceServiceBase - backward reference index reader is closed (didn't exist)
2022-07-26 15:32:17,602 [81707259]   INFO - #o.j.k.i.s.r.KotlinCompilerReferenceIndexStorage - KCRI storage is closed (didn't exist)
2022-07-26 15:32:17,623 [81707280]   INFO - c.j.r.f.u.RdCoroutineScope - RdCoroutineHost has been reset
2022-07-26 15:32:17,625 [81707282]   INFO - c.j.r.f.u.RdCoroutineScope - RdCoroutineHost disposed
2022-07-26 15:32:19,930 [81709587]   INFO - #o.j.i.BuiltInServer - web server stopped
2022-07-26 15:32:20,055 [81709712]   INFO - #c.i.u.i.FileBasedIndexImpl - START INDEX SHUTDOWN
2022-07-26 15:32:20,425 [81710082]   WARN - #c.i.o.v.i.l.NativeFileWatcherImpl - File watcher is still alive, doing a force quit.
2022-07-26 15:32:20,452 [81710109]   INFO - #c.i.o.v.i.l.NativeFileWatcherImpl - Watcher terminated with exit code -1
2022-07-26 15:32:20,586 [81710243]   INFO - #c.i.p.s.StubIndexImpl - StubIndexExtension-s were unloaded
2022-07-26 15:32:20,586 [81710243]   INFO - #c.i.p.s.SerializationManagerImpl - Start shutting down C:\develop\.IntelliJIdea2022.1\system\index\rep.names
2022-07-26 15:32:20,589 [81710246]   INFO - #c.i.p.s.SerializationManagerImpl - Finished shutting down C:\develop\.IntelliJIdea2022.1\system\index\rep.names
2022-07-26 15:32:22,036 [81711693]   INFO - #c.i.u.i.FileBasedIndexImpl - END INDEX SHUTDOWN
2022-07-26 15:32:22,036 [81711693]   INFO - #c.i.o.v.n.p.PersistentFSImpl - VFS dispose started
2022-07-26 15:32:22,065 [81711722]   INFO - #c.i.o.v.n.p.PersistentFSImpl - VFS dispose completed
2022-07-26 15:32:22,065 [81711722]   INFO - #c.i.o.f.i.FileTypeDetectionService - 653 auto-detected files. Detection took 1061 ms
2022-07-26 15:32:22,086 [81711743]   INFO - #c.i.u.Restarter - run restarter: [C:\Develop\bin\idea\bin\restarter.exe, 22536, 1, C:\develop\bin\idea\bin\idea64.exe]
2022-07-26 15:32:22,613 [81712270]   INFO - #c.i.i.StartupUtil - ------------------------------------------------------ IDE SHUTDOWN ------------------------------------------------------

hope that helps, if you need more information just let me know.

System:

Nx workspace details:

iguissouma commented 2 years ago

Hello,

Do you have one module or multimodule in your project?

Maybe it's related to the structure of your project, make sure the structure of your project is similar when opening nx-example, one project with one web module and in the root we have package.json, nx.json, workspace.json. Maybe a screenshot like below will help understand the structure of your repo, blur any sensitive data.

Screenshot 2022-07-28 at 11 46 15
colinscz commented 2 years ago

@iguissouma I just tried out another approach. Uninstalled Nx Console Idea 0.47.2 and reinstalled version 0.44.1 manually from my disk --> all my projects and task are back! 👍🏽 This would support my suspicion that it broke during a plugin upgrade. Although I am not sure with which exact version this seems to happen....

iguissouma commented 2 years ago

@cnschwarz After that release 0.44.1 I supported workspaces without workspace.json file, so yes this feature can affect the loading of nx configuration apps and libs... Keep the dowgraded version as a workaroud I will add more logs to figure what is not working as expected in a custom version or a next release.

szabyg commented 2 years ago

I have the same issue: Earlier the projects were working, now they are not listed anymore. Our workspace has nx.json, angular.json with the project definitions, no workspace.json and no projects.json. We're using @nrwl/workspace@14.1.5.

colinscz commented 2 years ago

Thanks for the clarification @iguissouma ok I will do this as a workaround for now. Your quick feedback is much appreciated! 👍🏽

wolfie82 commented 2 years ago

Came here to say that I just generated a new core workspace using nx 14.8.2, which does not include a workspace.json. Added a react application, and this plugin no longer works. It appears that the project name is coming back as null.

image

java.lang.Throwable: Assertion failed at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:220) at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:229) at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.doFindChildById(VirtualDirectoryImpl.java:558) at com.intellij.openapi.vfs.newvfs.persistent.FSRecords$1ParentFinder.findChild(FSRecords.java:539) at com.intellij.openapi.vfs.newvfs.persistent.FSRecords$1ParentFinder.findDescendantByIdPath(FSRecords.java:531) at com.intellij.openapi.vfs.newvfs.persistent.FSRecords.findFileById(FSRecords.java:551) at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.findFileById(PersistentFSImpl.java:1436) at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.findFileById(PersistentFSImpl.java:58) at com.intellij.util.indexing.FileBasedIndexScanUtil.processFilesContainingAnyKey(FileBasedIndexScanUtil.java:244) at com.intellij.util.indexing.FileBasedIndexImpl.processFilesContainingAnyKey(FileBasedIndexImpl.java:1162) at com.intellij.psi.search.FilenameIndex.getVirtualFilesByNames(FilenameIndex.java:219) at com.intellij.psi.search.FilenameIndex.getVirtualFilesByName(FilenameIndex.java:56) at com.github.iguissouma.nxconsole.cli.config.NxConfigFromGlobs.<init>(NxConfig.kt:65) at com.github.iguissouma.nxconsole.cli.config.NxConfigProvider$Companion.getNxConfig$lambda-1(NxConfigProvider.kt:43) at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:39) at com.intellij.util.CachedValueBase.lambda$getValueWithLock$3(CachedValueBase.java:227) at com.intellij.util.CachedValueBase.computeData(CachedValueBase.java:42) at com.intellij.util.CachedValueBase.lambda$getValueWithLock$4(CachedValueBase.java:227) at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:114) at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:44) at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:68) at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:228) at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:28) at com.intellij.util.CachedValuesManagerImpl.getCachedValue(CachedValuesManagerImpl.java:72) at com.github.iguissouma.nxconsole.cli.config.NxConfigProvider$Companion.getNxConfig(NxConfigProvider.kt:36) at com.github.iguissouma.nxconsole.NxDirectoryIconProvider.getIcon(NxDirectoryIconProvider.kt:21) at com.intellij.ide.projectView.impl.CompoundIconProvider.getIcon(CompoundIconProvider.java:29) at com.intellij.ide.projectView.impl.CompoundIconProvider.findIcon(CompoundIconProvider.java:52) at com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode.setupIcon(PsiDirectoryNode.java:177) at com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode.updateImpl(PsiDirectoryNode.java:123) at com.intellij.ide.projectView.impl.nodes.AbstractPsiBasedNode.lambda$doUpdate$1(AbstractPsiBasedNode.java:195) at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:915) at com.intellij.ide.projectView.impl.nodes.AbstractPsiBasedNode.doUpdate(AbstractPsiBasedNode.java:148) at com.intellij.ide.projectView.impl.nodes.AbstractPsiBasedNode.lambda$update$0(AbstractPsiBasedNode.java:144) at com.intellij.util.AstLoadingFilter.lambda$toComputable$2(AstLoadingFilter.java:172) at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:130) at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:119) at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:109) at com.intellij.ide.projectView.impl.nodes.AbstractPsiBasedNode.update(AbstractPsiBasedNode.java:144) at com.intellij.ide.util.treeView.PresentableNodeDescriptor.getUpdatedPresentation(PresentableNodeDescriptor.java:78) at com.intellij.ide.util.treeView.PresentableNodeDescriptor.update(PresentableNodeDescriptor.java:30) at com.intellij.ui.tree.StructureTreeModel$Node.update(StructureTreeModel.java:458) at com.intellij.ui.tree.StructureTreeModel$Node.<init>(StructureTreeModel.java:439) at com.intellij.ui.tree.StructureTreeModel$Node.<init>(StructureTreeModel.java:432) at com.intellij.ui.tree.StructureTreeModel.getValidChildren(StructureTreeModel.java:390) at com.intellij.ui.tree.StructureTreeModel.validateChildren(StructureTreeModel.java:299) at com.intellij.ui.tree.StructureTreeModel.getNode(StructureTreeModel.java:293) at com.intellij.ui.tree.StructureTreeModel.getChildren(StructureTreeModel.java:313) at com.intellij.ui.tree.AsyncTreeModel$CmdGetChildren.getNode(AsyncTreeModel.java:545) at com.intellij.ui.tree.AsyncTreeModel$Command.get(AsyncTreeModel.java:440) at com.intellij.ui.tree.AsyncTreeModel$Command.get(AsyncTreeModel.java:406) at com.intellij.util.concurrency.Invoker$Task.run(Invoker.java:319) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1154) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:75) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:158) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:115) at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:66) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:188) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:608) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683) at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:175) at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:66) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:112) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:75) at com.intellij.util.concurrency.Invoker.invokeSafely(Invoker.java:205) at com.intellij.util.concurrency.Invoker.lambda$offerSafely$0(Invoker.java:183) at com.intellij.util.concurrency.Invoker$Background.lambda$offer$0(Invoker.java:487) at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:241) at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:31) at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:214) at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:212) at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:203) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699) at java.base/java.lang.Thread.run(Thread.java:833)

iguissouma commented 2 years ago

Hello,

Thank you for reporting this. The plugin is not working without workspace.json and project.json files ... It's reproducible, I will try to fix it.

Screenshot 2022-10-04 at 21 13 00
iguissouma commented 2 years ago

@wolfie82

It should be fixed on the next version 0.50.0

Screenshot 2022-10-05 at 22 23 26
wolfie82 commented 2 years ago

@iguissouma Confirmed working! Thank you for looking into this!!

wolfie82 commented 2 years ago

FYI - there is still an exception being thrown during startup. However, it appears functionality is working just fine :).

022-10-06 12:30:40,445 [ 9430] SEVERE - #c.i.o.v.n.i.VirtualDirectoryImpl - Assertion failed java.lang.Throwable: Assertion failed at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:220) at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:229) at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.doFindChildById(VirtualDirectoryImpl.java:558) at com.intellij.openapi.vfs.newvfs.persistent.FSRecords$1ParentFinder.findChild(FSRecords.java:539) at com.intellij.openapi.vfs.newvfs.persistent.FSRecords$1ParentFinder.findDescendantByIdPath(FSRecords.java:531) at com.intellij.openapi.vfs.newvfs.persistent.FSRecords.findFileById(FSRecords.java:551) at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.findFileById(PersistentFSImpl.java:1436) at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.findFileById(PersistentFSImpl.java:58) at com.intellij.util.indexing.FileBasedIndexScanUtil.processFilesContainingAnyKey(FileBasedIndexScanUtil.java:244) at com.intellij.util.indexing.FileBasedIndexImpl.processFilesContainingAnyKey(FileBasedIndexImpl.java:1162) at com.intellij.psi.search.FilenameIndex.getVirtualFilesByNames(FilenameIndex.java:219) at com.intellij.psi.search.FilenameIndex.getVirtualFilesByName(FilenameIndex.java:56) at com.github.iguissouma.nxconsole.cli.config.NxConfigFromGlobs.<init>(NxConfig.kt:67) at com.github.iguissouma.nxconsole.cli.config.NxConfigProvider$Companion.getNxConfig$lambda-1(NxConfigProvider.kt:43) at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:39) at com.intellij.util.CachedValueBase.lambda$getValueWithLock$3(CachedValueBase.java:227) at com.intellij.util.CachedValueBase.computeData(CachedValueBase.java:42) at com.intellij.util.CachedValueBase.lambda$getValueWithLock$4(CachedValueBase.java:227) at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:114) at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:44) at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:68) at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:228) at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:28) at com.intellij.util.CachedValuesManagerImpl.getCachedValue(CachedValuesManagerImpl.java:72) at com.github.iguissouma.nxconsole.cli.config.NxConfigProvider$Companion.getNxConfig(NxConfigProvider.kt:36) at com.github.iguissouma.nxconsole.NxDirectoryIconProvider.getIcon(NxDirectoryIconProvider.kt:21) at com.intellij.ide.projectView.impl.CompoundIconProvider.getIcon(CompoundIconProvider.java:29) at com.intellij.ide.projectView.impl.CompoundIconProvider.findIcon(CompoundIconProvider.java:52) at com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode.setupIcon(PsiDirectoryNode.java:177) at com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode.updateImpl(PsiDirectoryNode.java:123) at com.intellij.ide.projectView.impl.nodes.AbstractPsiBasedNode.lambda$doUpdate$1(AbstractPsiBasedNode.java:195) at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:915) at com.intellij.ide.projectView.impl.nodes.AbstractPsiBasedNode.doUpdate(AbstractPsiBasedNode.java:148) at com.intellij.ide.projectView.impl.nodes.AbstractPsiBasedNode.lambda$update$0(AbstractPsiBasedNode.java:144) at com.intellij.util.AstLoadingFilter.lambda$toComputable$2(AstLoadingFilter.java:172) at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:130) at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:119) at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:109) at com.intellij.ide.projectView.impl.nodes.AbstractPsiBasedNode.update(AbstractPsiBasedNode.java:144) at com.intellij.ide.util.treeView.PresentableNodeDescriptor.getUpdatedPresentation(PresentableNodeDescriptor.java:78) at com.intellij.ide.util.treeView.PresentableNodeDescriptor.update(PresentableNodeDescriptor.java:30) at com.intellij.ui.tree.StructureTreeModel$Node.update(StructureTreeModel.java:458) at com.intellij.ui.tree.StructureTreeModel$Node.<init>(StructureTreeModel.java:439) at com.intellij.ui.tree.StructureTreeModel$Node.<init>(StructureTreeModel.java:432) at com.intellij.ui.tree.StructureTreeModel.getValidChildren(StructureTreeModel.java:390) at com.intellij.ui.tree.StructureTreeModel.validateChildren(StructureTreeModel.java:299) at com.intellij.ui.tree.StructureTreeModel.getNode(StructureTreeModel.java:293) at com.intellij.ui.tree.StructureTreeModel.getChildren(StructureTreeModel.java:313) at com.intellij.ui.tree.AsyncTreeModel$CmdGetChildren.getNode(AsyncTreeModel.java:545) at com.intellij.ui.tree.AsyncTreeModel$Command.get(AsyncTreeModel.java:440) at com.intellij.ui.tree.AsyncTreeModel$Command.get(AsyncTreeModel.java:406) at com.intellij.util.concurrency.Invoker$Task.run(Invoker.java:319) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1154) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:75) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:158) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:115) at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:66) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:188) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:608) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683) at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:175) at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:66) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:112) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:75) at com.intellij.util.concurrency.Invoker.invokeSafely(Invoker.java:205) at com.intellij.util.concurrency.Invoker.lambda$offerSafely$0(Invoker.java:183) at com.intellij.util.concurrency.Invoker$Background.lambda$offer$0(Invoker.java:487) at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:241) at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:31) at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:214) at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:212) at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:203) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699) at java.base/java.lang.Thread.run(Thread.java:833)

colinscz commented 2 years ago

@iguissouma any updates on the initial issue I raised? Unfortunately I still face the same issue after the latest upgrade...

iguissouma commented 2 years ago

@cnschwarz I will add some log to investigate the issue...

iguissouma commented 2 years ago

Please install this version and provide me log from the idea.log from opening the project until showing the empty panel. You can remove any sensitive info or sent it in private. Hope we can find the issue!

Screenshot 2022-10-13 at 22 47 54

Nx Console Idea-0.50.1.zip

m410 commented 1 year ago

I also have the empty tasks and project in panel. If I disable it and enable it, this is the error I get:

java.lang.ClassCastException: class com.github.iguissouma.nxconsole.buildTools.NxService cannot be cast to class com.github.iguissouma.nxconsole.buildTools.NxService (com.github.iguissouma.nxconsole.buildTools.NxService is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @50b876bd; com.github.iguissouma.nxconsole.buildTools.NxService is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @205fe870) at com.github.iguissouma.nxconsole.buildTools.NxService$NxApplicationService.getProjectService(NxService.kt:195) at com.github.iguissouma.nxconsole.buildTools.NxService$NxApplicationService.getProjectService(NxService.kt:192) at com.intellij.lang.javascript.buildTools.base.actions.JsbtAddBuildfileAction.lambda$actionPerformed$2(JsbtAddBuildfileAction.java:66) at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:297) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699) at java.base/java.lang.Thread.run(Thread.java:833)

Intellij 2022.2.3 ultimate plugin: 0.50.0

iguissouma commented 1 year ago

@m410 Can you share an nx monorepo where the tasks, projects are empty for you?

colinscz commented 1 year ago

@iguissouma sorry took a bit longer to clean out all the company related stuff I am not allowed to share publicly.

here are the requested logs I got after using the plugin version you provided me above. Hope that helps!

IntelliJLogs_NxConsoleIdea.txt

iguissouma commented 1 year ago

@cnschwarz Do you open C:/Develop/myIntelliJWorkspace as a project in your IDE? And have multimodules project(maven maybe) and one of them is nx monorepo(nx-ui-project)

If so the plugin does not play well with this architecture #114

Can you confirm?

colinscz commented 1 year ago

@iguissouma yes this is exactly the case, I open it as a project in IntelliJ!

I need to rely on a heavy maven & java based setup and the nx project is one of those modules.

The workaround you suggested on the other issue is no option for me due to the following reasons:

So I guess the two issues are definitely heavily related if not the same.

iguissouma commented 1 year ago

@cnschwarz I'm aware of this kind of setup and will try to find the best way to support this structure.

colinscz commented 1 year ago

@iguissouma thanks a lot and I appreciate the efforts already taken!

iguissouma commented 1 year ago

@cnschwarz can you please test this version of plugin, I added a rapid workaround...

Screenshot 2022-11-01 at 18 34 11

Nx Console Idea-0.51.0.zip

colinscz commented 1 year ago

@iguissouma I can confirm that it now works with the provided version 0.51.0.

All my tasks for the different nx workspace apps are displayed and I can execute them.

wolfie82 commented 1 year ago

Thanks for these fixes!!

FYI - Functionality appears to be fine on 51.0 and Webstorm 2022.3 BETA (soon to be released). When booting webstorm, however I do see the below trace. Also, my NX Console project view, it now looks like the below. The entries starting with an @ symbol don't do anything.

image

an error occurred while loading NxConfigFromGlobs

java.lang.Throwable: Control-flow exceptions (e.g. this class com.intellij.openapi.progress.ProcessCanceledException) should never be logged. Instead, these should have been rethrown or, if not possible, caught and ignored
    at com.intellij.openapi.diagnostic.Logger.ensureNotControlFlow(Logger.java:298)
    at com.intellij.idea.IdeaLogger.doLogError(IdeaLogger.java:151)
    at com.intellij.idea.IdeaLogger.error(IdeaLogger.java:142)
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:232)
    at com.github.iguissouma.nxconsole.cli.config.NxConfigProvider$Companion.getNxConfig$lambda-3$lambda-2(NxConfigProvider.kt:56)
    at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:39)
    at com.intellij.util.CachedValueBase.lambda$getValueWithLock$3(CachedValueBase.java:231)
    at com.intellij.util.CachedValueBase.computeData(CachedValueBase.java:41)
    at com.intellij.util.CachedValueBase.lambda$getValueWithLock$4(CachedValueBase.java:231)
    at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:112)
    at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:42)
    at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:66)
    at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:232)
    at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:28)
    at com.intellij.util.CachedValuesManagerImpl.getCachedValue(CachedValuesManagerImpl.java:72)
    at com.github.iguissouma.nxconsole.cli.config.NxConfigProvider$Companion.getNxConfig(NxConfigProvider.kt:47)
    at com.github.iguissouma.nxconsole.NxDirectoryIconProvider.getIcon(NxDirectoryIconProvider.kt:21)
    at com.intellij.ide.projectView.impl.CompoundIconProvider.getIcon(CompoundIconProvider.java:29)
    at com.intellij.ide.projectView.impl.CompoundIconProvider.findIcon(CompoundIconProvider.java:52)
    at com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode.setupIcon(PsiDirectoryNode.java:177)
    at com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode.updateImpl(PsiDirectoryNode.java:123)
    at com.intellij.ide.projectView.impl.nodes.AbstractPsiBasedNode.lambda$doUpdate$1(AbstractPsiBasedNode.java:195)
    at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:847)
    at com.intellij.ide.projectView.impl.nodes.AbstractPsiBasedNode.doUpdate(AbstractPsiBasedNode.java:148)
    at com.intellij.ide.projectView.impl.nodes.AbstractPsiBasedNode.lambda$update$0(AbstractPsiBasedNode.java:144)
    at com.intellij.util.AstLoadingFilter.lambda$toComputable$2(AstLoadingFilter.java:172)
    at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:130)
    at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:119)
    at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:109)
    at com.intellij.ide.projectView.impl.nodes.AbstractPsiBasedNode.update(AbstractPsiBasedNode.java:144)
    at com.intellij.ide.util.treeView.PresentableNodeDescriptor.getUpdatedPresentation(PresentableNodeDescriptor.java:78)
    at com.intellij.ide.util.treeView.PresentableNodeDescriptor.update(PresentableNodeDescriptor.java:30)
    at com.intellij.ui.tree.StructureTreeModel$Node.update(StructureTreeModel.java:487)
    at com.intellij.ui.tree.StructureTreeModel$Node.<init>(StructureTreeModel.java:468)
    at com.intellij.ui.tree.StructureTreeModel$Node.<init>(StructureTreeModel.java:461)
    at com.intellij.ui.tree.StructureTreeModel.getValidChildren(StructureTreeModel.java:419)
    at com.intellij.ui.tree.StructureTreeModel.validateChildren(StructureTreeModel.java:330)
    at com.intellij.ui.tree.StructureTreeModel.getNode(StructureTreeModel.java:324)
    at com.intellij.ui.tree.StructureTreeModel.getChildren(StructureTreeModel.java:344)
    at com.intellij.ui.tree.AsyncTreeModel$CmdGetChildren.getNode(AsyncTreeModel.java:548)
    at com.intellij.ui.tree.AsyncTreeModel$Command.get(AsyncTreeModel.java:443)
    at com.intellij.ui.tree.AsyncTreeModel$Command.get(AsyncTreeModel.java:409)
    at com.intellij.util.concurrency.Invoker$Task.run(Invoker.java:305)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1086)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:71)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:63)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:128)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:109)
    at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:68)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:190)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:591)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:666)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:622)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:590)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:177)
    at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:68)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:106)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:71)
    at com.intellij.util.concurrency.Invoker.invokeSafely(Invoker.java:187)
    at com.intellij.util.concurrency.Invoker.lambda$offerSafely$0(Invoker.java:165)
    at com.intellij.util.concurrency.Invoker$Background.lambda$offer$0(Invoker.java:475)
    at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:243)
    at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:29)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.executeFirstTaskAndHelpQueue(BoundedTaskExecutor.java:216)
    at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:212)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:205)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
    at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: com.intellij.openapi.progress.ProcessCanceledException
    at com.intellij.openapi.progress.util.AbstractProgressIndicatorBase.throwIfCanceled(AbstractProgressIndicatorBase.java:157)
    at com.intellij.openapi.progress.util.AbstractProgressIndicatorBase.checkCanceled(AbstractProgressIndicatorBase.java:147)
    at com.intellij.openapi.progress.util.AbstractProgressIndicatorExBase.checkCanceled(AbstractProgressIndicatorExBase.java:103)
    at com.intellij.openapi.progress.impl.CoreProgressManager.doCheckCanceled(CoreProgressManager.java:145)
    at com.intellij.openapi.progress.ProgressManager.checkCanceled(ProgressManager.java:221)
    at com.intellij.openapi.progress.ProgressIndicatorProvider.checkCanceled(ProgressIndicatorProvider.java:23)
    at com.intellij.psi.impl.PsiManagerImpl.findFile(PsiManagerImpl.java:155)
    at com.github.iguissouma.nxconsole.cli.config.NxConfigFromGlobs.<init>(NxConfig.kt:110)
    at com.github.iguissouma.nxconsole.cli.config.NxConfigProvider$Companion.getNxConfig$lambda-3$lambda-2(NxConfigProvider.kt:54)
    ... 69 more
iguissouma commented 1 year ago

@wolfie82

The projects with @ symbol at the beginning comes from libs with package.json with: { "name": "@xxx/name", ... }

It's working fine for nx as root project

Screenshot 2022-11-17 at 07 58 06

Do you have your nx repo as a module(subdirectory of root project folder) ?

wolfie82 commented 1 year ago

I don't. The packages referenced in my image, starting with @, are only scribed in the tsconfig.base.json. These are all NX apps or libs. The only thing I can think of is that somehow the /dist or tsc-out directories are getting scanned somehow as they exist at the top level.

Thanks for your help!

colinscz commented 1 year ago

@iguissouma I confirm the issue is resolved for me. Thanks again for the extra efforts to reproduce the issue. In my opinion this issue can be closed. I leave it up to you. :)

iguissouma commented 1 year ago

@wolfie82 I opened a new issue with your problem. @colinscz you are welcome, happy we resolved the issue.