mbolotov / intellij-playwright

1 stars 0 forks source link

Plugin breaks Playwright file linting, refactoring, etc. #11

Closed bryantebeek closed 1 year ago

bryantebeek commented 2 years ago

Heey @mbolotov!

When working with Playwright files, I keep getting an IDE error which seems to break a lot of functionalities for the files (linting, refactoring, etc.). Below stacktrace is what the IDE provides.

Love your plugin so far, but this makes it really unusable sadly 😢 any idea what it might be?


Details

Plugin version 1.1.2

PhpStorm 2022.1.4 Build #PS-221.6008.16, built on July 20, 2022 Runtime version: 11.0.15+10-b2043.56 aarch64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 12.4

Stacktrace

java.lang.NoClassDefFoundError: org/intellij/plugins/intelliLang/inject/InjectorUtils
    at com.github.mbolotov.playwright.selector.inject.SelectorInjectorKt$isLangFromComment$1.invoke(selectorInjector.kt:156)
    at com.github.mbolotov.playwright.selector.inject.SelectorInjectorKt$isLangFromComment$1.invoke(selectorInjector.kt:156)
    at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:210)
    at kotlin.sequences.FilteringSequence$iterator$1.calcNext(Sequences.kt:170)
    at kotlin.sequences.FilteringSequence$iterator$1.hasNext(Sequences.kt:194)
    at com.github.mbolotov.playwright.selector.inject.SelectorInjectorKt.isLangFromComment(selectorInjector.kt:215)
    at com.github.mbolotov.playwright.selector.inject.SelectorInjectorKt.isPlaywrightJsSelector(selectorInjector.kt:146)
    at com.github.mbolotov.playwright.selector.inject.PlaywrightJsSelectorInjector.getLanguagesToInject(selectorInjector.kt:34)
    at com.intellij.psi.impl.source.tree.injected.InjectedLanguageManagerImpl.processInPlaceInjectorsFor(InjectedLanguageManagerImpl.java:442)
    at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtilBase.probeElementsUp(InjectedLanguageUtilBase.java:246)
    at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtilBase.enumerate(InjectedLanguageUtilBase.java:176)
    at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtilBase.enumerate(InjectedLanguageUtilBase.java:146)
    at com.intellij.psi.impl.source.tree.injected.InjectedLanguageManagerImpl.enumerate(InjectedLanguageManagerImpl.java:318)
    at com.intellij.lang.jsgraphql.ide.notifications.GraphQLScopeEditorNotificationProvider$1.visitElement(GraphQLScopeEditorNotificationProvider.java:93)
    at com.intellij.lang.javascript.psi.impl.JSLiteralExpressionImpl.accept(JSLiteralExpressionImpl.java:133)
    at com.intellij.psi.impl.source.tree.CompositePsiElement.acceptChildren(CompositePsiElement.java:65)
    at com.intellij.psi.PsiRecursiveElementVisitor.visitElement(PsiRecursiveElementVisitor.java:41)
    at com.intellij.lang.jsgraphql.ide.notifications.GraphQLScopeEditorNotificationProvider$1.visitElement(GraphQLScopeEditorNotificationProvider.java:99)
    at com.intellij.lang.javascript.psi.impl.JSArgumentListImpl.accept(JSArgumentListImpl.java:58)
    at com.intellij.psi.impl.PsiElementBase.acceptChildren(PsiElementBase.java:58)
    at com.intellij.psi.PsiRecursiveElementVisitor.visitElement(PsiRecursiveElementVisitor.java:41)
    at com.intellij.lang.jsgraphql.ide.notifications.GraphQLScopeEditorNotificationProvider$1.visitElement(GraphQLScopeEditorNotificationProvider.java:99)
    at com.intellij.lang.javascript.psi.impl.JSCallExpressionImpl.accept(JSCallExpressionImpl.java:94)
    at com.intellij.psi.impl.source.tree.CompositePsiElement.acceptChildren(CompositePsiElement.java:65)
    at com.intellij.psi.PsiRecursiveElementVisitor.visitElement(PsiRecursiveElementVisitor.java:41)
    at com.intellij.lang.jsgraphql.ide.notifications.GraphQLScopeEditorNotificationProvider$1.visitElement(GraphQLScopeEditorNotificationProvider.java:99)
    at com.intellij.lang.javascript.psi.impl.JSExpressionStatementImpl.accept(JSExpressionStatementImpl.java:50)
    at com.intellij.psi.impl.source.tree.SharedImplUtil.acceptChildren(SharedImplUtil.java:185)
    at com.intellij.psi.impl.source.PsiFileImpl.acceptChildren(PsiFileImpl.java:754)
    at com.intellij.psi.PsiRecursiveElementVisitor.visitElement(PsiRecursiveElementVisitor.java:41)
    at com.intellij.lang.jsgraphql.ide.notifications.GraphQLScopeEditorNotificationProvider$1.visitElement(GraphQLScopeEditorNotificationProvider.java:99)
    at com.intellij.psi.PsiElementVisitor.visitFile(PsiElementVisitor.java:35)
    at com.intellij.psi.PsiRecursiveElementVisitor.visitFile(PsiRecursiveElementVisitor.java:60)
    at com.intellij.extapi.psi.PsiFileBase.accept(PsiFileBase.java:60)
    at com.intellij.lang.javascript.psi.impl.JSFileImpl.accept(JSFileImpl.java:92)
    at com.intellij.lang.jsgraphql.ide.notifications.GraphQLScopeEditorNotificationProvider.showNotification(GraphQLScopeEditorNotificationProvider.java:86)
    at com.intellij.lang.jsgraphql.ide.notifications.GraphQLScopeEditorNotificationProvider.createNotificationPanel(GraphQLScopeEditorNotificationProvider.java:49)
    at com.intellij.lang.jsgraphql.ide.notifications.GraphQLScopeEditorNotificationProvider.createNotificationPanel(GraphQLScopeEditorNotificationProvider.java:36)
    at com.intellij.ui.EditorNotifications$Provider.lambda$collectNotificationData$0(EditorNotifications.java:66)
    at com.intellij.ui.EditorNotificationsImpl.lambda$updateEditor$6(EditorNotificationsImpl.java:171)
    at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$safeTransferToEdt$6(NonBlockingReadActionImpl.java:596)
    at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:200)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:873)
    at com.intellij.openapi.application.impl.ApplicationImpl$3.run(ApplicationImpl.java:511)
    at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:69)
    at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:112)
    at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:42)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:898)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:746)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:439)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:803)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:438)
    at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106)
    at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:604)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:436)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:873)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:484)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)
Caused by: java.lang.ClassNotFoundException: org.intellij.plugins.intelliLang.inject.InjectorUtils PluginClassLoader(plugin=PluginDescriptor(name=Maestro, id=com.github.mbolotov.playwrightintellij, descriptorPath=plugin.xml, path=~/Library/Application Support/JetBrains/Toolbox/apps/PhpStorm/ch-0/221.6008.16/PhpStorm.app.plugins/Maestro, version=1.1.2, package=null, isBundled=false), packagePrefix=null, instanceId=89, state=active)
    at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:215)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
    ... 70 more
mbolotov commented 2 years ago

Hi Bryan! Could you check if you have intelliLang plugin enabled in the setings? image

ryan2559375 commented 1 year ago

I am evaluating the plugin on WebStorm and I had the same issue and enabling the IntelliLang fixed the problem. I think the plugin config needs to be updated that the IntelliLang plugin is required to turn on as well.

mbolotov commented 1 year ago

You are right, I found Maestro plugin descriptor had an incorrect id for the intelliLang plugin. This is the reason why IDE does not enable intelliLang automatically. it will be fixed in the next version.

mbolotov commented 1 year ago

should be fixed in 1.3.1