AtomMaterialUI / color-highlighter

JetBrains plugin to preview colors directly from within the code.
MIT License
40 stars 23 forks source link

Bug with AppCode #77

Closed RomuloPBenedetti closed 1 year ago

RomuloPBenedetti commented 1 year ago

Describe the bug

it just issue this alert:

Cannot create listener

com.intellij.diagnostic.PluginException: Cannot create listener com.mallowigi.startup.KotlinVisitor [Plugin: com.mallowigi.colorHighlighter]
    at com.intellij.serviceContainer.ComponentManagerImpl.createListener(ComponentManagerImpl.kt:920)
    at com.intellij.util.messages.impl.CompositeMessageBus.subscribeLazyListeners(CompositeMessageBus.java:177)
    at com.intellij.util.messages.impl.CompositeMessageBus.doComputeSubscribers(CompositeMessageBus.java:147)
    at com.intellij.util.messages.impl.MessageBusImpl.computeSubscribers(MessageBusImpl.java:349)
    at com.intellij.util.messages.impl.CompositeMessageBus.computeSubscribers(CompositeMessageBus.java:141)
    at com.intellij.util.messages.impl.CompositeMessageBus$ToDirectChildrenMessagePublisher.lambda$publish$0(CompositeMessageBus.java:103)
    at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1705)
    at com.intellij.util.messages.impl.CompositeMessageBus$ToDirectChildrenMessagePublisher.publish(CompositeMessageBus.java:103)
    at com.intellij.util.messages.impl.MessageBusImpl$MessagePublisher.invoke(MessageBusImpl.java:176)
    at com.sun.proxy.$Proxy37.appFrameCreated(Unknown Source)
    at com.intellij.idea.IdeStarter.openProjectIfNeeded(IdeStarter.kt:98)
    at com.intellij.idea.IdeStarter.main(IdeStarter.kt:79)
    at com.intellij.idea.ApplicationLoader$initApplication$4.accept(ApplicationLoader.kt:176)
    at com.intellij.idea.ApplicationLoader$initApplication$4.accept(ApplicationLoader.kt)
    at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:714)
    at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
    at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1742)
    at java.base/java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1728)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: com.intellij.diagnostic.PluginException: Cannot load class com.mallowigi.startup.KotlinVisitor (
  error: com/mallowigi/startup/KotlinVisitor has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0,
  classLoader=PluginClassLoader(plugin=PluginDescriptor(name=Color Highlighter, id=com.mallowigi.colorHighlighter, descriptorPath=plugin.xml, path=~/Library/Application Support/JetBrains/Toolbox/apps/AppCode/ch-0/221.6008.18/AppCode.app.plugins/Color Highlighter, version=12.0.0, package=null, isBundled=false), packagePrefix=null, instanceId=131, state=active)
)
    at com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(PluginClassLoader.java:412)
    at com.intellij.ide.plugins.cl.PluginClassLoader.tryLoadingClass(PluginClassLoader.java:240)
    at com.intellij.serviceContainer.ComponentManagerImplKt.doLoadClass(ComponentManagerImpl.kt:1469)
    at com.intellij.serviceContainer.ComponentManagerImplKt.access$doLoadClass(ComponentManagerImpl.kt:1)
    at com.intellij.serviceContainer.ComponentManagerImpl.createListener(ComponentManagerImpl.kt:917)
    ... 22 more
Caused by: java.lang.UnsupportedClassVersionError: com/mallowigi/startup/KotlinVisitor has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0
    at java.base/java.lang.ClassLoader.defineClass2(Native Method)
    at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1109)
    at com.intellij.util.lang.UrlClassLoader.consumeClassData(UrlClassLoader.java:263)
    at com.intellij.util.lang.ZipResourceFile.findClass(ZipResourceFile.java:111)
    at com.intellij.util.lang.JarLoader.findClass(JarLoader.java:63)
    at com.intellij.util.lang.ClassPath.findClassInLoader(ClassPath.java:246)
    at com.intellij.util.lang.ClassPath.findClassWithoutCache(ClassPath.java:235)
    at com.intellij.util.lang.ClassPath.findClass(ClassPath.java:202)
    at com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(PluginClassLoader.java:404)
    ... 26 more

To Reproduce

Not sure, happened after configuring AppCode with Color highlighter.

Expected Behavior

No Allert

Environment

AppCode 2022.1.4 Build #OC-221.6008.18, built on July 28, 2022 Licensed to Romulo Pulcinelli Benedetti Subscription is active until August 24, 2022. Runtime version: 11.0.15+10-b2043.56 aarch64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 12.5 GC: G1 Young Generation, G1 Old Generation Memory: 2504M Cores: 8 Registry: ide.experimental.ui=true max.suggested.heap.size=8192 ide.balloon.shadow.size=0 clang.parameter.info=false

Non-Bundled Plugins: com.nasller.CodeGlancePro (1.4.6) com.intellij.ideolog (203.0.30.0) com.intellij.kotlinNative.platformDeps (221.6008.18) org.jetbrains.kotlin (221-1.6.21-release-337-AC6008.18) String Manipulation (9.5.0) NodeJS (221.6008.15) Karma (221.6008.13) com.mallowigi.colorHighlighter (12.0.0) com.jetbrains.appcode.android (221.6008.18) com.intellij.appcode.kmm (221.6008.18) com.github.lppedd.kotlin-additional-highlighting (0.2.2) com.chrisrm.idea.MaterialThemeUI (7.5.4) mobi.hsz.idea.gitignore (4.4.0)

mallowigi commented 1 year ago

Hmmm, it's because the version 12.0 expects the JDK 17, and since you are still on the JDK 11 (2022.1) it doesn't work correctly.

My apologies, I didn't update the minimum version, which should be for 2022.2 onwards.

Please download back the version 11.0 from https://plugins.jetbrains.com/plugin/13309-color-highlighter/versions/stable/186927, or update to 2022.2

JetBrains Marketplace
Color Highlighter - IntelliJ IDEs Plugin | Marketplace
Color Highlighter Highlight Colors in your IDE This plugin highlights colors in editors in order to make them stand out in your code.