Benjamin-Dobell / IntelliJ-Luanalysis

Type-safe Lua IDE — IntelliJ IDEA plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IntelliJ Error after Plugin Installation and Restart

muescha opened this issue · comments

Environment

Name Version
IDEA version Build #IU-222.3739.24, built on August 4, 2022
Luanalysis version 1.2.2-IDEA203
OS macOS 12.1 (21C52)

Preferences

(Preferences -> Languages & Frameworks > Luanalysis)
no avaialble

Lua

Name Setting
Language level [e.g. Lua 5.3]

Type Safety

Name Setting
Strict nil checks ☑️ / ❎
Unknown type (any) is indexable ☑️ / ❎
Unknown type (any) is callabale ☑️ / ❎

What are the steps to reproduce this issue?

  1. install plugin
  2. say ok to restart IDEA after plugin installed

What happens?

i see error message - and plugin is disabled by IntelliJ

What were you expecting to happen?

working plugin :)

Any logs, error output, etc?

Plugin 'au.com.glassechidna.luanalysis' failed to initialize and will be disabled. Please restart IntelliJ IDEA.

com.intellij.diagnostic.PluginException: Key com.tang.intellij.lua.luacheck.LuaCheckSettings duplicated; 
existingAdapter: ServiceAdapter(
    descriptor=ServiceDescriptor(
        interface='null', 
        serviceImplementation='com.tang.intellij.lua.luacheck.LuaCheckSettings', 
        testServiceImplementation='null', 
        headlessImplementation='null', 
        overrides=false, 
        configurationSchemaKey='null', 
        preload=FALSE, 
        client=null
    ), 
    pluginDescriptor=PluginDescriptor(
        name=EmmyLua, 
        id=com.tang, 
        descriptorPath=plugin.xml, 
        path=~/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-1/222.3739.24/IntelliJ IDEA 2022.2 EAP.app.plugins/EmmyLua, 
        version=1.3.7.2-IDEA222, 
        package=null, 
        isBundled=false)); 
descriptor: com.tang.intellij.lua.luacheck.LuaCheckSettings; 
app: Application  (containerState PRE_INIT) ; 
current plugin: au.com.glassechidna.luanalysis
    at com.intellij.serviceContainer.ComponentManagerImpl.registerServices(ComponentManagerImpl.kt:501)
    at com.intellij.serviceContainer.ComponentManagerImpl.registerComponents(ComponentManagerImpl.kt:250)
    at com.intellij.openapi.client.ClientAwareComponentManager.registerComponents(ClientAwareComponentManager.kt:63)
    at com.intellij.idea.ApplicationLoader$initApplication$block$3.apply(ApplicationLoader.kt:148)
    at com.intellij.idea.ApplicationLoader$initApplication$block$3.apply(ApplicationLoader.kt)
    at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150)
    at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
    at java.base/java.util.concurrent.CompletableFuture.postFire(CompletableFuture.java:614)
    at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1163)
    at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482)
    at com.intellij.idea.ApplicationLoader$initApplication$block$2.execute(ApplicationLoader.kt:142)
    at java.base/java.util.concurrent.CompletableFuture$UniCompletion.claim(CompletableFuture.java:572)
    at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1147)
    at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
    at java.base/java.util.concurrent.CompletableFuture.postFire(CompletableFuture.java:614)
    at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1163)
    at java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)

and

com.intellij.diagnostic.PluginException: Key com.tang.intellij.lua.luacheck.LuaCheckView duplicated; existingAdapter: ServiceAdapter(
    descriptor=ServiceDescriptor(
        interface='null', 
        serviceImplementation='com.tang.intellij.lua.luacheck.LuaCheckView',
        testServiceImplementation='null', 
        headlessImplementation='null', 
        overrides=false, 
        configurationSchemaKey='null', 
        preload=FALSE, 
        client=null), 
    pluginDescriptor=PluginDescriptor(
        name=Luanalysis, 
        id=au.com.glassechidna.luanalysis, 
        descriptorPath=plugin.xml, 
        path=~/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-1/222.3739.24/IntelliJ IDEA 2022.2 EAP.app.plugins/IntelliJ-Luanalysis, 
        version=1.2.2-IDEA203, 
        package=null, 
        isBundled=false)
); 
descriptor: com.tang.intellij.lua.luacheck.LuaCheckView; app: Application  (containerState PRE_INIT)  (WA inProgress allowed) (RA allowed); current plugin: com.tang
	at com.intellij.serviceContainer.ComponentManagerImpl.registerServices(ComponentManagerImpl.kt:501)
	at com.intellij.serviceContainer.ComponentManagerImpl.registerComponents(ComponentManagerImpl.kt:250)
	at com.intellij.serviceContainer.ComponentManagerImpl.registerComponents(ComponentManagerImpl.kt:225)
	at com.intellij.openapi.project.impl.DefaultProjectImpl.init(DefaultProject.java:312)
	at com.intellij.openapi.project.impl.DefaultProject$1.init(DefaultProject.java:52)
	at com.intellij.openapi.project.impl.DefaultProjectTimed.get(DefaultProjectTimed.java:33)
	at com.intellij.openapi.project.impl.DefaultProject.getDelegate(DefaultProject.java:136)
	at com.intellij.openapi.project.impl.DefaultProject.getMessageBus(DefaultProject.java:243)
	at com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerImpl.cancelUpdateProgress(DaemonCodeAnalyzerImpl.java:670)
	at com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerImpl.stopProcess(DaemonCodeAnalyzerImpl.java:645)
	at com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerImpl.lambda$new$0(DaemonCodeAnalyzerImpl.java:141)
	at com.intellij.openapi.util.ObjectTree.runWithTrace(ObjectTree.java:126)
	at com.intellij.openapi.util.ObjectTree.executeAll(ObjectTree.java:158)
	at com.intellij.openapi.util.Disposer.dispose(Disposer.java:217)
	at com.intellij.openapi.util.Disposer.dispose(Disposer.java:205)
	at com.intellij.serviceContainer.ComponentManagerImpl.dispose(ComponentManagerImpl.kt:1121)
	at com.intellij.openapi.util.ObjectTree.runWithTrace(ObjectTree.java:126)
	at com.intellij.openapi.util.ObjectTree.executeAll(ObjectTree.java:158)
	at com.intellij.openapi.util.Disposer.dispose(Disposer.java:217)
	at com.intellij.openapi.util.Disposer.dispose(Disposer.java:205)
	at com.intellij.util.Timed.dispose(Timed.java:38)
	at com.intellij.util.TimedReference.dispose(TimedReference.java:8)
	at com.intellij.openapi.project.impl.DefaultProjectTimed.lambda$dispose$0(DefaultProjectTimed.java:47)
	at com.intellij.openapi.application.WriteAction.lambda$run$1(WriteAction.java:86)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteActionWithClass(ApplicationImpl.java:1011)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1037)
	at com.intellij.openapi.application.WriteAction.run(WriteAction.java:85)
	at com.intellij.openapi.project.impl.DefaultProjectTimed.lambda$dispose$1(DefaultProjectTimed.java:47)
	at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:209)
	at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:21)
	at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:191)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:881)
	at com.intellij.openapi.application.impl.ApplicationImpl$3.run(ApplicationImpl.java:513)
	at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:75)
	at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:118)
	at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:42)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:779)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:730)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:724)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:749)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:918)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:766)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:450)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:791)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:449)
	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105)
	at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:624)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:447)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:881)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:493)
	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)

Any other comments?

enabling plugin without restart results in different error:

  1. i installed the plugin and it is deactivated ( #134
    see IntelliJ Error after Plugin Installation and Restart
  2. i enabled the plugin
  3. after a while i see the error:
The plugin au.com.glassechidna.luanalysis failed to save settings and has been disabled. Please restart IntelliJ IDEA

i see that I installed also the EmmyLua plugin - disabling EmmyLua fixed the problem. there should be somewhere in the plugin info that both plugins not working together.

otherwise the Luanalysis plugin is disabeld at restart...

Summary

after a long time i see its a similar error again - i think somehow the settings are biting each other with the LuaCheck

Problem

today i get the error below at startup - but today I was not able to start the IDEA :( it closed silently

Workaround

i found the location of the plugins in the toolbox app in the settings per app, then in VM-Options as option -Didea.plugins.path=

-Xmx2048m
-Dide.no.platform.update=true
-Dtoolbox.notification.token=oyDF9LbzL-Os3LxdBBmxFroj_eOcqPnVZhvFk6srIgY=
-Dtoolbox.notification.portFile=/Users/muescha/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-1/223.8214.27/IntelliJ IDEA 2022.3 EAP.app.vmoptions.port
-Didea.plugins.path=/Users/muescha/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-1/223.8214.27/IntelliJ IDEA 2022.3 EAP.app.plugins

then i deleted the EmmyLua plugin directory.

StackTrace

Internal error. Please refer to https://jb.gg/ide/critical-startup-errors

com.intellij.diagnostic.PluginException: Key com.tang.intellij.lua.luacheck.LuaCheckSettings duplicated; existingAdapter: ServiceAdapter(descriptor=ServiceDescriptor(interface='null', serviceImplementation='com.tang.intellij.lua.luacheck.LuaCheckSettings', testServiceImplementation='null', headlessImplementation='null', overrides=false, configurationSchemaKey='null', preload=FALSE, client=null), pluginDescriptor=PluginDescriptor(name=EmmyLua, id=com.tang, descriptorPath=plugin.xml, path=~/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-1/223.8214.27/IntelliJ IDEA 2022.3 EAP.app.plugins/EmmyLua, version=1.3.8-IDEA223, package=null, isBundled=false)); descriptor: com.tang.intellij.lua.luacheck.LuaCheckSettings; app: Application  (containerState PRE_INIT) ; current plugin: au.com.glassechidna.luanalysis
    at com.intellij.serviceContainer.ComponentManagerImpl.registerServices(ComponentManagerImpl.kt:547)
    at com.intellij.serviceContainer.ComponentManagerImpl.registerComponents(ComponentManagerImpl.kt:259)
    at com.intellij.openapi.client.ClientAwareComponentManager.registerComponents(ClientAwareComponentManager.kt:46)
    at com.intellij.idea.ApplicationLoader.doInitApplication(ApplicationLoader.kt:78)
    at com.intellij.idea.ApplicationLoader.access$doInitApplication(ApplicationLoader.kt:1)
    at com.intellij.idea.ApplicationLoader$doInitApplication$1.invokeSuspend(ApplicationLoader.kt)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:284)
    at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
    at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
    at com.intellij.idea.ApplicationLoader.initApplication(ApplicationLoader.kt:61)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at com.intellij.idea.Q.C(Q.java:69)
    at com.intellij.ide.Q.q.y.C(y.java:135)
    at com.intellij.ide.Q.q.QN.Q(QN.java:191)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at com.intellij.idea.MainImpl.start(MainImpl.kt:60)
    at com.intellij.idea.StartupUtil$startApplication$7.invokeSuspend(StartupUtil.kt:294)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:284)
    at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
    at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
    at com.intellij.idea.Main.main(Main.kt:36)

-----
Your JRE: 17.0.5+1-b653.23 aarch64 (JetBrains s.r.o.)
/Users/muescha/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-1/223.8214.27/IntelliJ IDEA 2022.3 EAP.app/Contents/jbr/Contents/Home

but for future problems:

the settings should be renamed to other names so that they can exists side by side

@State(name = "LuaCheckSettings", storages = [Storage("emmy.xml")])

https://github.com/EmmyLua/IntelliJ-EmmyLua/blob/72e5fd324c3d31da99469ed08a48ae9656793f78/src/main/java/com/tang/intellij/lua/luacheck/LuaCheckSettings.kt#L26