Closed Agraphie closed 1 year ago
Do you have libgiomm
installed?
It also doesn't work for Intellij Ultimate for me
Is this a separate issue or do you just mean you are using IntelliJ Ultimate?
@IncPlusPlus could it be that the installed libraries simply don’t match the versions we are compiling against? It might be worthwhile to figure out the minimal versions of the libraries we are needing to link against.
As far as I can see libgiomm
is part of libglibmm
which seems to be installed with libglibmm-2.4
.
Concerning intellij ultimate what I meant is that I just installed the plugin in intellij ultimate and get the same exceptions.
Just to be sure could you try to manually install them
sudo apt-get install libsigc++-2.0 libglibmm-2.4 libgtk-3
So I have
sudo apt install libgtkmm-3.0-1v5 libsigc++-2.0-0v5 libglibmm-2.4-1v5
which are all already installed
Could you try to reinstall them? Also do you have the 32bit or 64Bit versions installed?
I reinstalled them but without any difference. They are all the 64bit version.
Do you have any duplicate versions of the libraries installed? Would you be able to try to build the project yourself? If there is anything wrong with the link path of the library there may be more helpful error messages at compile time.
@IncPlusPlus could it be that the installed libraries simply don’t match the versions we are compiling against? It might be worthwhile to figure out the minimal versions of the libraries we are needing to link against.
I agree. @Agraphie, could you provide the version numbers of those three packages given with apt info [package name]
?
I believe I might also be running into this same error. I thought it was because I hadn't updated the plugin yet but I actually have the latest version. I'll give it a look.
Package: libgtkmm-3.0-1v5
Version: 3.24.2-1build1
Package: libsigc++-2.0-0v5
Version: 2.10.2-1build1
Package: libglibmm-2.4-1v5
Version: 2.64.2-1
I was able to build the plugin without any problems via ./gradlew :auto-dark-mode-plugin:buildPlugin
. ./gradlew :auto-dark-mode:buildPlugin
(as stated in the readme) did not work with
Project 'auto-dark-mode' is ambiguous in root project 'auto-dark-mode'. Candidates are: 'auto-dark-mode-base', 'auto-dark-mode-dependencies-bom', 'auto-dark-mode-linux', 'auto-dark-mode-linux-gnome', 'auto-dark-mode-macos', 'auto-dark-mode-plugin', 'auto-dark-mode-windows'.
Ah. Yeah I think buildPlugin
isn't necessary for you to run on your own. My bad on that one. I believe you just need to do build :auto-dark-mode-plugin:runIde
.
Just running :auto-dark-mode-plugin:runIde
I can see the plugin's settings, so I assume it works...
The way I installed the plugin is over the jetbrains repository. Maybe there is something wrong with what's uploaded there? Also when I build the plugin with buildPlugin
and then try to install the .jar or .zip in Android Studio I get "Plugin 'Auto Dark Mode' is incompatible with this installation". But maybe that's expected or I'm building it wrong.
Do you have any duplicate versions of the libraries installed?
Probably not. It's a pretty new Pop!OS installation and I haven't really installed that much.
I believe I might also be running into this same error. I thought it was because I hadn't updated the plugin yet but I actually have the latest version. I'll give it a look.
As it turns out, this actually runs fine for me. I'm running Auto Dark Mode 1.5.0-2020.2.
For Android studio you will need to checkout the 2019.3 branch as AndroidStudio is based on the 2019.3 version of the IntelliJ Platform.
Ah. I missed the fact that the error was from Android Studio. They're going to be a little bit behind on their IntelliJ base version unfortunately.
So the error "Plugin 'Auto Dark Mode' is incompatible with this installation" is from Android Studio when installing manually, yes. But the original stacktrace occurs in Android Studio AND Intellij Ultimate.
I cannot even run Intellij anymore as I get the errors (same as above)
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Gtk-Message: 17:39:46.244: Failed to load module "appmenu-gtk-module"
Gtk-Message: 17:39:46.322: Failed to load module "canberra-gtk-module"
Gtk-Message: 17:39:46.322: Failed to load module "canberra-gtk-module"
2020-08-14 17:39:47,346 [ 1206] WARN - tellij.ide.SystemHealthMonitor - issue detected: vm.options.env.vars
2020-08-14 17:39:47,404 [ 1264] ERROR - tform.linux.gnome.GnomeLibrary - Could not load library libauto-dark-mode-linux-gnome.so.
java.lang.UnsatisfiedLinkError: /home/agraphie/.var/app/com.jetbrains.IntelliJ-IDEA-Community/cache/tmp/nativeutils21008583138977/libauto-dark-mode-linux-gnome.so: libgiomm-2.4.so.1: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2442)
at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2498)
at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2694)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2627)
at java.base/java.lang.Runtime.load0(Runtime.java:768)
at java.base/java.lang.System.load(System.java:1834)
at com.github.weisj.darklaf.platform.NativeUtil.loadLibraryFromJar(NativeUtil.java:104)
at com.github.weisj.darklaf.platform.AbstractLibrary.loadLibrary(AbstractLibrary.java:65)
at com.github.weisj.darklaf.platform.AbstractLibrary.updateLibrary(AbstractLibrary.java:53)
at com.github.weisj.darkmode.platform.linux.gnome.GnomeLibrary.get(GnomeLibrary.java:43)
at com.github.weisj.darkmode.platform.linux.gnome.GnomeSettings.<clinit>(GnomeSettings.kt:61)
at com.github.weisj.darkmode.platform.linux.gnome.GnomeSettingsProvider$1.invoke(GnomeSettings.kt:10)
at com.github.weisj.darkmode.platform.linux.gnome.GnomeSettingsProvider$1.invoke(GnomeSettings.kt:10)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at com.github.weisj.darkmode.platform.settings.SingletonSettingsContainerProvider.getContainer(Settings.kt)
at com.github.weisj.darkmode.platform.settings.SingletonSettingsContainerProvider.create(Settings.kt:16)
at com.github.weisj.darkmode.AutoDarkModeOptions.<init>(AutoDarkModeOptions.kt:28)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at com.intellij.serviceContainer.ConstructorInjectionKt.instantiateUsingPicoContainer(constructorInjection.kt:47)
at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClassWithConstructorInjection(ComponentManagerImpl.kt:662)
at com.intellij.serviceContainer.ServiceComponentAdapter.createAndInitialize(ServiceComponentAdapter.kt:49)
at com.intellij.serviceContainer.ServiceComponentAdapter.doCreateInstance(ServiceComponentAdapter.kt:37)
at com.intellij.serviceContainer.BaseComponentAdapter.getInstanceUncached(BaseComponentAdapter.kt:113)
at com.intellij.serviceContainer.BaseComponentAdapter.getInstance(BaseComponentAdapter.kt:67)
at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:411)
at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:393)
at com.intellij.openapi.components.ServiceManager.getService(ServiceManager.java:20)
at com.github.weisj.darkmode.AutoDarkMode.<clinit>(AutoDarkMode.kt:105)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at com.intellij.serviceContainer.ConstructorInjectionKt.instantiateUsingPicoContainer(constructorInjection.kt:47)
at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClassWithConstructorInjection(ComponentManagerImpl.kt:662)
at com.intellij.serviceContainer.ServiceComponentAdapter.createAndInitialize(ServiceComponentAdapter.kt:49)
at com.intellij.serviceContainer.ServiceComponentAdapter.doCreateInstance(ServiceComponentAdapter.kt:37)
at com.intellij.serviceContainer.BaseComponentAdapter.getInstanceUncached(BaseComponentAdapter.kt:113)
at com.intellij.serviceContainer.BaseComponentAdapter.getInstance(BaseComponentAdapter.kt:67)
at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:411)
at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:393)
at com.intellij.openapi.components.ServiceManager.getService(ServiceManager.java:20)
at com.github.weisj.darkmode.AutoDarkModeStartupListener.appFrameCreated(AutoDarkModeStartupListener.kt:10)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.intellij.util.messages.impl.MessageBusImpl.invokeListener(MessageBusImpl.java:636)
at com.intellij.util.messages.impl.MessageBusImpl.deliverMessage(MessageBusImpl.java:406)
at com.intellij.util.messages.impl.MessageBusImpl.pumpWaitingBuses(MessageBusImpl.java:384)
at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:366)
at com.intellij.util.messages.impl.MessageBusImpl.access$100(MessageBusImpl.java:32)
at com.intellij.util.messages.impl.MessageBusImpl$MessagePublisher.invoke(MessageBusImpl.java:187)
at com.sun.proxy.$Proxy29.appFrameCreated(Unknown Source)
at com.intellij.idea.IdeStarter.main(IdeStarter.kt:105)
at com.intellij.idea.ApplicationLoader$startApp$8.run(ApplicationLoader.kt:231)
at java.base/java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:783)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
at java.base/java.util.concurrent.CompletableFuture.postFire(CompletableFuture.java:610)
at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1085)
at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:478)
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:834)
2020-08-14 17:39:47,406 [ 1266] ERROR - tform.linux.gnome.GnomeLibrary - IntelliJ IDEA 2020.2 Build #IC-202.6397.94
2020-08-14 17:39:47,406 [ 1266] ERROR - tform.linux.gnome.GnomeLibrary - JDK: 11.0.7; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
2020-08-14 17:39:47,407 [ 1267] ERROR - tform.linux.gnome.GnomeLibrary - OS: Linux
2020-08-14 17:39:47,407 [ 1267] ERROR - tform.linux.gnome.GnomeLibrary - Plugin to blame: Auto Dark Mode version: 1.5.0-2020.2
2020-08-14 17:39:47,407 [ 1267] ERROR - tform.linux.gnome.GnomeLibrary - Last Action:
2020-08-14 17:39:47,408 [ 1268] ERROR - llij.ide.plugins.PluginManager - java.lang.ExceptionInInitializerError
java.util.concurrent.CompletionException: java.lang.ExceptionInInitializerError
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)
at java.base/java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:787)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
at java.base/java.util.concurrent.CompletableFuture.postFire(CompletableFuture.java:610)
at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1085)
at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:478)
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:834)
Caused by: java.lang.ExceptionInInitializerError
at com.github.weisj.darkmode.platform.linux.gnome.GnomeSettingsProvider$1.invoke(GnomeSettings.kt:10)
at com.github.weisj.darkmode.platform.linux.gnome.GnomeSettingsProvider$1.invoke(GnomeSettings.kt:10)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at com.github.weisj.darkmode.platform.settings.SingletonSettingsContainerProvider.getContainer(Settings.kt)
at com.github.weisj.darkmode.platform.settings.SingletonSettingsContainerProvider.create(Settings.kt:16)
at com.github.weisj.darkmode.AutoDarkModeOptions.<init>(AutoDarkModeOptions.kt:28)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at com.intellij.serviceContainer.ConstructorInjectionKt.instantiateUsingPicoContainer(constructorInjection.kt:47)
at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClassWithConstructorInjection(ComponentManagerImpl.kt:662)
at com.intellij.serviceContainer.ServiceComponentAdapter.createAndInitialize(ServiceComponentAdapter.kt:49)
at com.intellij.serviceContainer.ServiceComponentAdapter.doCreateInstance(ServiceComponentAdapter.kt:37)
at com.intellij.serviceContainer.BaseComponentAdapter.getInstanceUncached(BaseComponentAdapter.kt:113)
at com.intellij.serviceContainer.BaseComponentAdapter.getInstance(BaseComponentAdapter.kt:67)
at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:411)
at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:393)
at com.intellij.openapi.components.ServiceManager.getService(ServiceManager.java:20)
at com.github.weisj.darkmode.AutoDarkMode.<clinit>(AutoDarkMode.kt:105)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at com.intellij.serviceContainer.ConstructorInjectionKt.instantiateUsingPicoContainer(constructorInjection.kt:47)
at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClassWithConstructorInjection(ComponentManagerImpl.kt:662)
at com.intellij.serviceContainer.ServiceComponentAdapter.createAndInitialize(ServiceComponentAdapter.kt:49)
at com.intellij.serviceContainer.ServiceComponentAdapter.doCreateInstance(ServiceComponentAdapter.kt:37)
at com.intellij.serviceContainer.BaseComponentAdapter.getInstanceUncached(BaseComponentAdapter.kt:113)
at com.intellij.serviceContainer.BaseComponentAdapter.getInstance(BaseComponentAdapter.kt:67)
at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:411)
at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:393)
at com.intellij.openapi.components.ServiceManager.getService(ServiceManager.java:20)
at com.github.weisj.darkmode.AutoDarkModeStartupListener.appFrameCreated(AutoDarkModeStartupListener.kt:10)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.intellij.util.messages.impl.MessageBusImpl.invokeListener(MessageBusImpl.java:636)
at com.intellij.util.messages.impl.MessageBusImpl.deliverMessage(MessageBusImpl.java:406)
at com.intellij.util.messages.impl.MessageBusImpl.pumpWaitingBuses(MessageBusImpl.java:384)
at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:366)
at com.intellij.util.messages.impl.MessageBusImpl.access$100(MessageBusImpl.java:32)
at com.intellij.util.messages.impl.MessageBusImpl$MessagePublisher.invoke(MessageBusImpl.java:187)
at com.sun.proxy.$Proxy29.appFrameCreated(Unknown Source)
at com.intellij.idea.IdeStarter.main(IdeStarter.kt:105)
at com.intellij.idea.ApplicationLoader$startApp$8.run(ApplicationLoader.kt:231)
at java.base/java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:783)
... 11 more
Caused by: java.lang.IllegalStateException: Gnome library not loaded.
at com.github.weisj.darkmode.platform.linux.gnome.GnomeSettings.<clinit>(GnomeSettings.kt:62)
... 59 more
It seems to be an issue with the flatpak installation. I downloaded Intellij Ultimate from the jetbrains website and installed the plugin. That worked. I'm not sure what causes the issue. So I guess this can be kinda closed?
I'm not familiar with how flatpak bundling works but if I had to guess, it could be that the flatpak for IntelliJ that you used doesn't contain some necessary runtime library. If that's the case, I'm curious what this might be. This would mean that this plugin actually has a runtime dependency which we should list in the README.
There might be a difference in what library search paths are registered for the individual JREs. If this is the case we could add the paths manually ourself.
Sandboxing of flatpak might be an issue too.
Edit: Form doing some research the sand boxing of flatpak definitely is an issue. The IntelliJ package is hosted here:
https://github.com/flathub/com.jetbrains.IntelliJ-IDEA-Ultimate/issues
Every flatpak application declares a runtime, which it will be able to access. IntelliJ only declares org.freedesktop.Sdk
, which doesn’t include the Gnome specific libraries (There is a separate Gnome Runtime).
I have spiked an issue to offer provide specialised distributions with the Gnome runtime. This would probably solve this issue.
Awesome, thanks. I subscribed to the issue and will test again if there's a new flatpack distribution or so.
Unfortunately, this still is an issue (IntelliJ 2022.2.4).
flatpak run com.jetbrains.IntelliJ-IDEA-Community CompileCommand: exclude com/intellij/openapi/vfs/impl/FilePartNodeRoot.trieDescend bool exclude = true
(process:2): Gtk-WARNING **: 11:01:18.514: Locale not supported by C library. Using the fallback 'C' locale. Gtk-Message: 11:01:18.536: Failed to load module "canberra-gtk-module" Gtk-Message: 11:01:18.536: Failed to load module "pk-gtk-module" Gtk-Message: 11:01:18.536: Failed to load module "canberra-gtk-module" Gtk-Message: 11:01:18.536: Failed to load module "pk-gtk-module" 2022-11-29 11:01:19,346 [ 897] SEVERE - #c.g.w.d.p.l.g.GtkLibrary - Could not load library auto-dark-mode-linux-gtk. java.lang.UnsatisfiedLinkError: /tmp/com-weisj-darklaf-nativeutils-auto-dark-mode-linux-gtk394052994416636709540601652684458/libauto-dark-mode-linux-gtk-x86-64.so: libgtkmm-3.0.so.1: cannot open shared object file: No such file or directory at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
Edit: to remove the plugin for now, just delete it:
rm -r ~/.var/app/com.jetbrains.IntelliJ-IDEA-Community/data/JetBrains/IdeaIC2022.2/auto-dark-mode-plugin
(replace com.jetbrains.IntelliJ-IDEA-Community and IdeaIC2022.2 with the App-ID and ID of the bundled product in question).
Edit2: as a workaround, I currently use the quick theme switcher.
This isn't something I am able to fix. The flatpak distribution isn't an official one and there doesn't seem to be much interest in fixing it on the distribution side of things. See https://github.com/flathub/com.jetbrains.IntelliJ-IDEA-Ultimate/issues/58
Hi,
I'm trying your plugin on Pop!OS and Gnome with Android Studio, but I get the following exceptions. It also doesn't work for Intellij Ultimate for me. Any ideas?