etkachev / nx-webstorm

Plugin for Webstorm that strives to function the same as Nx Console for VsCode. UI for Nx
MIT License
35 stars 4 forks source link

stack trace crash on startup within jetbrains IDE #96

Open nhhockeyplayer opened 2 years ago

nhhockeyplayer commented 2 years ago

Current Behavior

stack trace crash on startup within jetbrains IDE

How to Reproduce

just have the extension installed in webstorm and start to use it

Expected Behavior

no crash should be happening

nx report

 >  NX   Report complete - copy this into the issue template

   Node : 16.15.1
   OS   : darwin x64
   yarn : 1.22.18

   nx : 14.3.6
   @nrwl/angular : 14.3.6
   @nrwl/cypress : 14.3.6
   @nrwl/detox : Not Found
   @nrwl/devkit : 14.3.6
   @nrwl/eslint-plugin-nx : 14.3.6
   @nrwl/express : Not Found
   @nrwl/jest : 14.3.6
   @nrwl/js : 14.3.6
   @nrwl/linter : 14.3.6
   @nrwl/nest : 14.3.6
   @nrwl/next : Not Found
   @nrwl/node : 14.3.6
   @nrwl/nx-cloud : 14.1.2
   @nrwl/nx-plugin : Not Found
   @nrwl/react : Not Found
   @nrwl/react-native : Not Found
   @nrwl/schematics : Not Found
   @nrwl/storybook : 14.3.6
   @nrwl/web : 14.3.6
   @nrwl/workspace : 14.3.6
   typescript : 4.7.4
   ---------------------------------------
   Community plugins:
     @ionic/angular: 6.1.10
     @fortawesome/angular-fontawesome: 0.11.1
     @ngrx/component-store: 13.2.0
     @ngrx/effects: 13.2.0
     @ngrx/entity: 13.2.0
     @ngrx/router-store: 13.2.0
     @ngrx/store: 13.2.0
     @nxtend/ionic-angular: 13.1.0
     @storybook/angular: 6.5.9
     @ngrx/schematics: 13.2.0
     @ngrx/store-devtools: 13.2.0
     @nxpm/stack: 4.21.0
     @storybook/angular: 6.5.9
java.lang.Throwable: Assertion failed: Directory index can only be queried after project initialization
    at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:218)
    at com.intellij.openapi.roots.impl.RootIndex.<init>(RootIndex.java:69)
    at com.intellij.openapi.roots.impl.RootIndex.<init>(RootIndex.java:56)
    at com.intellij.openapi.roots.impl.DirectoryIndexImpl.getRootIndex(DirectoryIndexImpl.java:172)
    at com.intellij.openapi.roots.impl.DirectoryIndexImpl.getRootIndex(DirectoryIndexImpl.java:155)
    at com.intellij.openapi.roots.impl.DirectoryIndexImpl.getInfoForFile(DirectoryIndexImpl.java:182)
    at com.intellij.openapi.roots.impl.FileIndexBase.getInfoForFileOrDirectory(FileIndexBase.java:96)
    at com.intellij.openapi.roots.impl.ProjectFileIndexImpl.getInfoForFileOrDirectory(ProjectFileIndexImpl.java:27)
    at com.intellij.openapi.roots.impl.ProjectFileIndexImpl.isUnderIgnored(ProjectFileIndexImpl.java:87)
    at com.intellij.openapi.roots.impl.ProjectFileIndexFacade.isUnderIgnored(ProjectFileIndexFacade.java:60)
    at com.intellij.psi.impl.file.impl.FileManagerImpl.isExcludedOrIgnored(FileManagerImpl.java:425)
    at com.intellij.psi.impl.file.impl.FileManagerImpl.findDirectoryImpl(FileManagerImpl.java:411)
    at com.intellij.psi.impl.file.impl.FileManagerImpl.findDirectory(FileManagerImpl.java:403)
    at com.intellij.psi.impl.PsiManagerImpl.findDirectory(PsiManagerImpl.java:168)
    at com.intellij.psi.AbstractFileViewProvider.shouldCreatePsi(AbstractFileViewProvider.java:90)
    at com.intellij.psi.SingleRootFileViewProvider.createFile(SingleRootFileViewProvider.java:144)
    at com.intellij.psi.SingleRootFileViewProvider.getPsiInner(SingleRootFileViewProvider.java:100)
    at com.intellij.psi.AbstractFileViewProvider.getPsi(AbstractFileViewProvider.java:194)
    at com.intellij.psi.impl.file.impl.FileManagerImpl.findFile(FileManagerImpl.java:363)
    at com.intellij.psi.impl.PsiManagerImpl.findFile(PsiManagerImpl.java:155)
    at com.github.etkachev.nxwebstorm.utils.ComputeReadJsonFile.compute(ReadFileComputables.kt:22)
    at com.github.etkachev.nxwebstorm.utils.ComputeReadJsonFile.compute(ReadFileComputables.kt:13)
    at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:933)
    at com.github.etkachev.nxwebstorm.utils.ReadFile.readJsonFromFileUrl(ReadFile.kt:17)
    at com.github.etkachev.nxwebstorm.services.MyProjectService.readNxJson(MyProjectService.kt:153)
    at com.github.etkachev.nxwebstorm.services.MyProjectService.getNxJson(MyProjectService.kt:25)
    at com.github.etkachev.nxwebstorm.services.MyProjectService.isValidNxProject(MyProjectService.kt:93)
    at com.github.etkachev.nxwebstorm.services.MyProjectService.getNxProjectType(MyProjectService.kt:103)
    at com.github.etkachev.nxwebstorm.ui.GenerateToolWindow.isApplicable(GenerateToolWindow.kt:32)
    at com.intellij.toolWindow.ToolWindowSetInitializerKt.beanToTask(ToolWindowSetInitializer.kt:248)
    at com.intellij.toolWindow.ToolWindowSetInitializerKt.access$beanToTask(ToolWindowSetInitializer.kt:1)
    at com.intellij.toolWindow.ToolWindowSetInitializerKt$computeToolWindowBeans$1.accept(ToolWindowSetInitializer.kt:278)
    at com.intellij.toolWindow.ToolWindowSetInitializerKt$computeToolWindowBeans$1.accept(ToolWindowSetInitializer.kt)
    at com.intellij.openapi.extensions.impl.ExtensionPointImpl.processWithPluginDescriptor(ExtensionPointImpl.java:301)
    at com.intellij.toolWindow.ToolWindowSetInitializerKt.computeToolWindowBeans(ToolWindowSetInitializer.kt:274)
    at com.intellij.toolWindow.ToolWindowSetInitializer$1.get(ToolWindowSetInitializer.kt:101)
    at com.intellij.toolWindow.ToolWindowSetInitializer$1.get(ToolWindowSetInitializer.kt:83)
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
    at java.base/java.lang.Thread.run(Thread.java:829)
justinhandley commented 2 years ago

I also am experiencing this.

etkachev commented 1 year ago

I also wanted to let you know about slowly deprecating this plugin in favor for the official on by Nrwl: https://plugins.jetbrains.com/plugin/21060-nx-console