Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working in 2023.1 EAP #65

Closed
maicol07 opened this issue Feb 9, 2023 · 34 comments
Closed

Not working in 2023.1 EAP #65

maicol07 opened this issue Feb 9, 2023 · 34 comments

Comments

@maicol07
Copy link
Contributor

maicol07 commented Feb 9, 2023

Hi,
currently, the plugin is marked as incompatible on JetBrains Marketplace with 2023.1. Can you add support for it?
There is also this exception on 2023.1 with the force-enabled plugin:

java.lang.Throwable: java.lang.IllegalStateException: Monitoring is not supported.
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:202)
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:206)
	at com.intellij.idea.IdeaLogger.error(IdeaLogger.java:120)
	at com.github.weisj.darkmode.platform.PluginLogger.error(PluginLogger.kt:44)
	at com.github.weisj.darkmode.AutoDarkMode.createMonitor(AutoDarkMode.kt:52)
	at com.github.weisj.darkmode.AutoDarkMode.access$createMonitor(AutoDarkMode.kt:43)
	at com.github.weisj.darkmode.AutoDarkMode$monitor$1.invoke(AutoDarkMode.kt:45)
	at com.github.weisj.darkmode.AutoDarkMode$monitor$1.invoke(AutoDarkMode.kt:45)
	at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
	at com.github.weisj.darkmode.platform.settings.UtilKt.letValue(Util.kt:49)
	at com.github.weisj.darkmode.AutoDarkMode.start(AutoDarkMode.kt:57)
	at com.github.weisj.darkmode.AutoDarkModeStartupListener.appFrameCreated(AutoDarkModeStartupListener.kt:33)
	at com.intellij.util.messages.impl.MessageBusImplKt.invokeMethod(MessageBusImpl.kt:680)
	at com.intellij.util.messages.impl.MessageBusImplKt.invokeListener(MessageBusImpl.kt:644)
	at com.intellij.util.messages.impl.MessageBusImplKt.deliverMessage(MessageBusImpl.kt:415)
	at com.intellij.util.messages.impl.MessageBusImplKt.pumpWaiting(MessageBusImpl.kt:394)
	at com.intellij.util.messages.impl.MessageBusImplKt.access$pumpWaiting(MessageBusImpl.kt:1)
	at com.intellij.util.messages.impl.MessagePublisher.invoke(MessageBusImpl.kt:454)
	at jdk.proxy2/jdk.proxy2.$Proxy47.appFrameCreated(Unknown Source)
	at com.intellij.idea.IdeStarter.openProjectIfNeeded$suspendImpl(IdeStarter.kt:91)
	at com.intellij.idea.IdeStarter.openProjectIfNeeded(IdeStarter.kt)
	at com.intellij.idea.IdeStarter$start$2.invokeSuspend(IdeStarter.kt:72)
	at com.intellij.idea.IdeStarter$start$2.invoke(IdeStarter.kt)
	at com.intellij.idea.IdeStarter$start$2.invoke(IdeStarter.kt)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
	at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:264)
	at com.intellij.idea.IdeStarter.start$suspendImpl(IdeStarter.kt:70)
	at com.intellij.idea.IdeStarter.start(IdeStarter.kt)
	at com.intellij.idea.ApplicationLoader.initApplicationImpl(ApplicationLoader.kt:192)
	at com.intellij.idea.ApplicationLoader.access$initApplicationImpl(ApplicationLoader.kt:1)
	at com.intellij.idea.ApplicationLoader$initApplicationImpl$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.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

Thanks

@weisJ
Copy link
Owner

weisJ commented Feb 9, 2023

Your exception log seems to be missing the top part. I’ll try to get support out sometime next week.

@maicol07
Copy link
Contributor Author

maicol07 commented Feb 9, 2023

@weisJ sorry, Github cut the first line. Now it's full!

@lkraav
Copy link

lkraav commented Mar 25, 2023

Thanks for the effort, discovered this from https://youtrack.jetbrains.com/issue/IDEA-251176/Implement-IDE-theme-sync-with-OS-on-Linux

How are we doing here with 2023.1 compatibility?

@weisJ
Copy link
Owner

weisJ commented Mar 25, 2023

A preview version compatible with 2023.1-EAP should be available in the next few days

@weisJ
Copy link
Owner

weisJ commented Mar 27, 2023

The new version has been published. If you experience any issues with it please let me know :)

@lkraav
Copy link

lkraav commented Mar 27, 2023

The new version has been published. If you experience any issues with it please let me know :)

It installs now, but doesn't seem to be having an effect on Gnome 44. I'm in "Dark Style" mode, window titlebar is dark, but nothing in IDE changes. Thoughts? 🤔

image

@maicol07
Copy link
Contributor Author

Same issue as @lkraav in WSL2 with gsettings

@weisJ
Copy link
Owner

weisJ commented Mar 27, 2023

Is this an issue you are also experiencing with older versions of the plugin? Could you provide your log file?

@lkraav
Copy link

lkraav commented Mar 27, 2023

Is this an issue you are also experiencing with older versions of the plugin? Could you provide your log file?

This is my first run with it.

[leho:.fr-59TP21] $ grep dark idea.log 
2023-03-27 20:08:49,752 [  86478]   INFO - #c.i.s.p.SettingsSyncPluginManager - Installed plugin com.github.weisj.darkmode
2023-03-27 20:08:50,136 [  86862]   INFO - #c.i.i.p.DynamicPlugins - Plugin com.github.weisj.darkmode loaded without restart in 379 ms
2023-03-27 20:08:50,239 [  86965]   INFO - #com.github.weisj.darkmode.platform.linux.gtk.GtkLibrary - Loaded auto-dark-mode-linux-gtk at /com/github/weisj/darkmode/auto-dark-mode-linux-gtk/libauto-dark-mode-linux-gtk-x86-64.so.
2023-03-27 20:08:50,298 [  87024]   INFO - #com.github.weisj.darkmode.platform.ThemeMonitorImpl - Started theme monitoring.
2023-03-27 20:10:32,448 [   2230]   INFO - #com.github.weisj.darkmode.IntellijNotificationService - Initializing notification service
2023-03-27 20:10:32,477 [   2259]   INFO - #com.github.weisj.darkmode.platform.linux.gtk.GtkLibrary - Loaded auto-dark-mode-linux-gtk at /com/github/weisj/darkmode/auto-dark-mode-linux-gtk/libauto-dark-mode-linux-gtk-x86-64.so.
2023-03-27 20:10:32,536 [   2318]   INFO - #com.github.weisj.darkmode.platform.ThemeMonitorImpl - Started theme monitoring.
No changes: {DBN=PluginData(enabled=false, category=PLUGINS, dependencies=[com.intellij.modules.platform, com.intellij.modules.lang]), GrepConsole=PluginData(enabled=true, category=PLUGINS, dependencies=[com.intellij.modules.lang]), IdeaVIM=PluginData(enabled=true, category=PLUGINS, dependencies=[com.intellij.modules.platform]), Key Promoter X=PluginData(enabled=false, category=PLUGINS, dependencies=[com.intellij.modules.lang]), Shifter=PluginData(enabled=false, category=PLUGINS, dependencies=[com.intellij.modules.lang]), com.4lex4.intellij.solarized=PluginData(enabled=false, category=UI, dependencies=[com.intellij.modules.lang]), com.chriscarini.jetbrains.jetbrains-auto-power-saver=PluginData(enabled=false, category=PLUGINS, dependencies=[com.intellij.modules.platform]), com.github.gtache.lsp=PluginData(enabled=false, category=PLUGINS, dependencies=[com.intellij.modules.lang]), com.github.weisj.darkmode=PluginData(enabled=true, category=PLUGINS, dependencies=[com.intellij.modules.platform]), com.intellij.ideolog=PluginData(enabled=true, category=PLUGINS, dependencies=[com.intellij.modules.lang]), com.jetbrains.ChooseRuntime=PluginData(enabled=true, category=PLUGINS, dependencies=[com.intellij.modules.lang]), com.kalessil.phpStorm.phpInspectionsEA=PluginData(enabled=true, category=PLUGINS, dependencies=[com.jetbrains.php, com.intellij.modules.platform]), io.wisetime.plugins.window.branch=PluginData(enabled=false, category=PLUGINS, dependencies=[com.intellij.modules.lang]), mobi.hsz.idea.gitignore=PluginData(enabled=true, category=PLUGINS, dependencies=[com.intellij.modules.lang, com.intellij.modules.vcs]), ru.adelf.idea.dotenv=PluginData(enabled=false, category=PLUGINS, dependencies=[com.intellij.modules.platform]), solarized=PluginData(enabled=false, category=UI, dependencies=[com.intellij.modules.lang])}
2023-03-27 20:12:48,725 [ 138507]   INFO - #com.github.weisj.darkmode.platform.ThemeMonitorImpl - Received notification. changed=false, oldState=MonitorState(dark=false, highContrast=false), newState=MonitorState(dark=false, highContrast=false)
2023-03-27 20:13:02,353 [ 152135]   INFO - #com.github.weisj.darkmode.platform.ThemeMonitorImpl - Stopped theme monitoring.
2023-03-27 20:13:33,431 [   2256]   INFO - #com.github.weisj.darkmode.IntellijNotificationService - Initializing notification service
2023-03-27 20:13:33,461 [   2286]   INFO - #com.github.weisj.darkmode.platform.linux.gtk.GtkLibrary - Loaded auto-dark-mode-linux-gtk at /com/github/weisj/darkmode/auto-dark-mode-linux-gtk/libauto-dark-mode-linux-gtk-x86-64.so.
2023-03-27 20:13:33,519 [   2344]   INFO - #com.github.weisj.darkmode.platform.ThemeMonitorImpl - Started theme monitoring.
No changes: {DBN=PluginData(enabled=false, category=PLUGINS, dependencies=[com.intellij.modules.platform, com.intellij.modules.lang]), GrepConsole=PluginData(enabled=true, category=PLUGINS, dependencies=[com.intellij.modules.lang]), IdeaVIM=PluginData(enabled=true, category=PLUGINS, dependencies=[com.intellij.modules.platform]), Key Promoter X=PluginData(enabled=false, category=PLUGINS, dependencies=[com.intellij.modules.lang]), Shifter=PluginData(enabled=false, category=PLUGINS, dependencies=[com.intellij.modules.lang]), com.4lex4.intellij.solarized=PluginData(enabled=false, category=UI, dependencies=[com.intellij.modules.lang]), com.chriscarini.jetbrains.jetbrains-auto-power-saver=PluginData(enabled=false, category=PLUGINS, dependencies=[com.intellij.modules.platform]), com.github.gtache.lsp=PluginData(enabled=false, category=PLUGINS, dependencies=[com.intellij.modules.lang]), com.github.weisj.darkmode=PluginData(enabled=true, category=PLUGINS, dependencies=[com.intellij.modules.platform]), com.intellij.ideolog=PluginData(enabled=true, category=PLUGINS, dependencies=[com.intellij.modules.lang]), com.jetbrains.ChooseRuntime=PluginData(enabled=true, category=PLUGINS, dependencies=[com.intellij.modules.lang]), com.kalessil.phpStorm.phpInspectionsEA=PluginData(enabled=true, category=PLUGINS, dependencies=[com.jetbrains.php, com.intellij.modules.platform]), io.wisetime.plugins.window.branch=PluginData(enabled=false, category=PLUGINS, dependencies=[com.intellij.modules.lang]), mobi.hsz.idea.gitignore=PluginData(enabled=true, category=PLUGINS, dependencies=[com.intellij.modules.lang, com.intellij.modules.vcs]), ru.adelf.idea.dotenv=PluginData(enabled=false, category=PLUGINS, dependencies=[com.intellij.modules.platform]), solarized=PluginData(enabled=false, category=UI, dependencies=[com.intellij.modules.lang])}
2023-03-27 20:14:33,974 [  62799]   INFO - #com.github.weisj.darkmode.platform.ThemeMonitorImpl - Received notification. changed=false, oldState=MonitorState(dark=false, highContrast=false), newState=MonitorState(dark=false, highContrast=false)
2023-03-27 20:27:34,903 [ 843728]   INFO - #com.github.weisj.darkmode.platform.ThemeMonitorImpl - Received notification. changed=false, oldState=MonitorState(dark=false, highContrast=false), newState=MonitorState(dark=false, highContrast=false)
2023-03-27 20:27:38,074 [ 846899]   INFO - #com.github.weisj.darkmode.platform.ThemeMonitorImpl - Received notification. changed=false, oldState=MonitorState(dark=false, highContrast=false), newState=MonitorState(dark=false, highContrast=false)

@weisJ
Copy link
Owner

weisJ commented Mar 28, 2023

I think this has to do with the change introduced by #54. Do you have xsettings available on your system? I'm currently working on a workaround for this.

@maicol07
Copy link
Contributor Author

maicol07 commented Mar 28, 2023

@weisJ here is my log with gsettings: idea.log

@weisJ
Copy link
Owner

weisJ commented Mar 29, 2023

@lkraav Please try whether the following version works for you: auto-dark-mode-plugin-1.7.2.1-EAP-2023.1.zip

@maicol07 You are experiencing a slightly different issue. The plugin doesn't recognize your desktop environment as one being supported. If you are sure it should work you can forcefully enable the functionality in the settings (please also use the version above).

@maicol07
Copy link
Contributor Author

@weisJ installing the version above I get this window:

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

java.lang.RuntimeException: Cannot invoke (class=AutoDarkModeStartupListener, method=appFrameCreated, topic=AppLifecycleListener)
    at com.intellij.util.messages.impl.MessageBusImplKt.invokeListener(MessageBusImpl.kt:657)
    at com.intellij.util.messages.impl.MessageBusImplKt.deliverMessage(MessageBusImpl.kt:415)
    at com.intellij.util.messages.impl.MessageBusImplKt.pumpWaiting(MessageBusImpl.kt:394)
    at com.intellij.util.messages.impl.MessageBusImplKt.access$pumpWaiting(MessageBusImpl.kt:1)
    at com.intellij.util.messages.impl.MessagePublisher.invoke(MessageBusImpl.kt:454)
    at jdk.proxy2/jdk.proxy2.$Proxy49.appFrameCreated(Unknown Source)
    at com.intellij.idea.IdeStarter.openProjectIfNeeded$suspendImpl(IdeStarter.kt:89)
    at com.intellij.idea.IdeStarter.openProjectIfNeeded(IdeStarter.kt)
    at com.intellij.idea.IdeStarter$start$2.invokeSuspend(IdeStarter.kt:70)
    at com.intellij.idea.IdeStarter$start$2.invoke(IdeStarter.kt)
    at com.intellij.idea.IdeStarter$start$2.invoke(IdeStarter.kt)
    at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
    at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:264)
    at com.intellij.idea.IdeStarter.start$suspendImpl(IdeStarter.kt:67)
    at com.intellij.idea.IdeStarter.start(IdeStarter.kt)
    at com.intellij.idea.ApplicationLoader.initApplicationImpl(ApplicationLoader.kt:191)
    at com.intellij.idea.ApplicationLoader.access$initApplicationImpl(ApplicationLoader.kt:1)
    at com.intellij.idea.ApplicationLoader$initApplicationImpl$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.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
Caused by: java.lang.ExceptionInInitializerError
    at com.github.weisj.darkmode.platform.linux.gtk.GtkSettingsProvider$1.invoke(GtkSettings.kt:34)
    at com.github.weisj.darkmode.platform.linux.gtk.GtkSettingsProvider$1.invoke(GtkSettings.kt:34)
    at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
    at com.github.weisj.darkmode.platform.settings.SingletonSettingsContainerProvider.getContainer(Settings.kt:46)
    at com.github.weisj.darkmode.platform.settings.SingletonSettingsContainerProvider.create(Settings.kt:48)
    at com.github.weisj.darkmode.AutoDarkModeOptions$initContainers$2.invoke(AutoDarkModeOptions.kt:77)
    at com.github.weisj.darkmode.AutoDarkModeOptions$initContainers$2.invoke(AutoDarkModeOptions.kt:77)
    at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:210)
    at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:210)
    at kotlin.sequences.SequencesKt___SequencesKt.toCollection(_Sequences.kt:787)
    at kotlin.sequences.SequencesKt___SequencesKt.toMutableList(_Sequences.kt:817)
    at kotlin.sequences.SequencesKt___SequencesKt.toList(_Sequences.kt:808)
    at com.github.weisj.darkmode.AutoDarkModeOptions.initContainers(AutoDarkModeOptions.kt:79)
    at com.github.weisj.darkmode.AutoDarkModeOptions.loadState(AutoDarkModeOptions.kt:130)
    at com.github.weisj.darkmode.AutoDarkModeOptions.loadState(AutoDarkModeOptions.kt:39)
    at com.intellij.configurationStore.ComponentStoreImpl.doInitComponent(ComponentStoreImpl.kt:435)
    at com.intellij.configurationStore.ComponentStoreImpl.initComponent(ComponentStoreImpl.kt:368)
    at com.intellij.configurationStore.ComponentStoreImpl.initComponent(ComponentStoreImpl.kt:119)
    at com.intellij.configurationStore.ComponentStoreWithExtraComponents.initComponent(ComponentStoreWithExtraComponents.kt:46)
    at com.intellij.serviceContainer.ComponentManagerImpl.initializeComponent$intellij_platform_serviceContainer(ComponentManagerImpl.kt:622)
    at com.intellij.serviceContainer.ServiceComponentAdapter.createAndInitialize(ServiceComponentAdapter.kt:47)
    at com.intellij.serviceContainer.ServiceComponentAdapter.doCreateInstance(ServiceComponentAdapter.kt:39)
    at com.intellij.serviceContainer.BaseComponentAdapter.doCreateInstance(BaseComponentAdapter.kt:154)
    at com.intellij.serviceContainer.BaseComponentAdapter.createInstance$lambda$1(BaseComponentAdapter.kt:133)
    at com.intellij.openapi.progress.Cancellation.computeInNonCancelableSection(Cancellation.java:95)
    at com.intellij.serviceContainer.BaseComponentAdapter.createInstance(BaseComponentAdapter.kt:132)
    at com.intellij.serviceContainer.BaseComponentAdapter.getInstance(BaseComponentAdapter.kt:92)
    at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:714)
    at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:670)
    at com.github.weisj.darkmode.AutoDarkMode.<clinit>(AutoDarkMode.kt:129)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
    at com.intellij.serviceContainer.ConstructorInjectionKt.instantiateUsingPicoContainer(constructorInjection.kt:54)
    at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClassWithConstructorInjection(ComponentManagerImpl.kt:1041)
    at com.intellij.serviceContainer.ServiceComponentAdapter.createAndInitialize(ServiceComponentAdapter.kt:43)
    at com.intellij.serviceContainer.ServiceComponentAdapter.doCreateInstance(ServiceComponentAdapter.kt:39)
    at com.intellij.serviceContainer.BaseComponentAdapter.doCreateInstance(BaseComponentAdapter.kt:154)
    at com.intellij.serviceContainer.BaseComponentAdapter.createInstance$lambda$1(BaseComponentAdapter.kt:133)
    at com.intellij.openapi.progress.Cancellation.computeInNonCancelableSection(Cancellation.java:99)
    at com.intellij.serviceContainer.BaseComponentAdapter.createInstance(BaseComponentAdapter.kt:132)
    at com.intellij.serviceContainer.BaseComponentAdapter.getInstance(BaseComponentAdapter.kt:92)
    at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:714)
    at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:670)
    at com.github.weisj.darkmode.AutoDarkModeStartupListener.appFrameCreated(AutoDarkModeStartupListener.kt:33)
    at com.intellij.util.messages.impl.MessageBusImplKt.invokeMethod(MessageBusImpl.kt:680)
    at com.intellij.util.messages.impl.MessageBusImplKt.invokeListener(MessageBusImpl.kt:644)
    ... 23 more
Caused by: java.lang.IllegalStateException: Gtk library not loaded.
    at com.github.weisj.darkmode.platform.linux.gtk.GtkSettings.<clinit>(GtkSettings.kt:97)
    ... 72 more

-----
Your JRE: 17.0.6+10-b829.5 amd64 (JetBrains s.r.o.)
/snap/phpstorm/328/jbr

Full log: idea.log

@weisJ
Copy link
Owner

weisJ commented Mar 30, 2023

Please try this new version:
auto-dark-mode-plugin-1.8.0-2023.1.zip

@maicol07
Copy link
Contributor Author

Please try this new version: auto-dark-mode-plugin-1.8.0-2023.1.zip

Now IDE starts, but I get this exception in the IDE Internal Errors window:

Could not load library auto-dark-mode-linux-gtk.

java.lang.UnsatisfiedLinkError: /tmp/com-weisj-darklaf-nativeutils-auto-dark-mode-linux-gtk957773029199868812176357664360/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)
	at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:388)
	at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:232)
	at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:174)
	at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2389)
	at java.base/java.lang.Runtime.load0(Runtime.java:755)
	at java.base/java.lang.System.load(System.java:1953)
	at com.github.weisj.darklaf.nativeutil.NativeUtil.doLoadLibraryFromJar(NativeUtil.java:171)
	at com.github.weisj.darklaf.nativeutil.NativeUtil.loadLibraryFromJar(NativeUtil.java:149)
	at com.github.weisj.darklaf.nativeutil.AbstractLibrary.loadLibrary(AbstractLibrary.java:66)
	at com.github.weisj.darklaf.nativeutil.AbstractLibrary.updateLibrary(AbstractLibrary.java:48)
	at com.github.weisj.darkmode.platform.linux.gtk.GtkLibrary.get(GtkLibrary.java:46)
	at com.github.weisj.darkmode.platform.linux.gtk.GtkSettings.initSettings(GtkSettings.kt:102)
	at com.github.weisj.darkmode.platform.linux.gtk.GtkSettings.<clinit>(GtkSettings.kt:97)
	at com.github.weisj.darkmode.platform.linux.gtk.GtkSettingsProvider$1.invoke(GtkSettings.kt:35)
	at com.github.weisj.darkmode.platform.linux.gtk.GtkSettingsProvider$1.invoke(GtkSettings.kt:35)
	at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
	at com.github.weisj.darkmode.platform.settings.SingletonSettingsContainerProvider.getContainer(Settings.kt:46)
	at com.github.weisj.darkmode.platform.settings.SingletonSettingsContainerProvider.create(Settings.kt:48)
	at com.github.weisj.darkmode.AutoDarkModeOptions$initContainers$2.invoke(AutoDarkModeOptions.kt:77)
	at com.github.weisj.darkmode.AutoDarkModeOptions$initContainers$2.invoke(AutoDarkModeOptions.kt:77)
	at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:210)
	at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:210)
	at kotlin.sequences.SequencesKt___SequencesKt.toCollection(_Sequences.kt:786)
	at kotlin.sequences.SequencesKt___SequencesKt.toMutableList(_Sequences.kt:816)
	at kotlin.sequences.SequencesKt___SequencesKt.toList(_Sequences.kt:807)
	at com.github.weisj.darkmode.AutoDarkModeOptions.initContainers(AutoDarkModeOptions.kt:79)
	at com.github.weisj.darkmode.AutoDarkModeOptions.loadState(AutoDarkModeOptions.kt:130)
	at com.github.weisj.darkmode.AutoDarkModeOptions.loadState(AutoDarkModeOptions.kt:39)
	at com.intellij.configurationStore.ComponentStoreImpl.doInitComponent(ComponentStoreImpl.kt:435)
	at com.intellij.configurationStore.ComponentStoreImpl.initComponent(ComponentStoreImpl.kt:368)
	at com.intellij.configurationStore.ComponentStoreImpl.initComponent(ComponentStoreImpl.kt:119)
	at com.intellij.configurationStore.ComponentStoreWithExtraComponents.initComponent(ComponentStoreWithExtraComponents.kt:46)
	at com.intellij.serviceContainer.ComponentManagerImpl.initializeComponent$intellij_platform_serviceContainer(ComponentManagerImpl.kt:622)
	at com.intellij.serviceContainer.ServiceComponentAdapter.createAndInitialize(ServiceComponentAdapter.kt:47)
	at com.intellij.serviceContainer.ServiceComponentAdapter.doCreateInstance(ServiceComponentAdapter.kt:39)
	at com.intellij.serviceContainer.BaseComponentAdapter.doCreateInstance(BaseComponentAdapter.kt:154)
	at com.intellij.serviceContainer.BaseComponentAdapter.createInstance$lambda$1(BaseComponentAdapter.kt:133)
	at com.intellij.openapi.progress.Cancellation.computeInNonCancelableSection(Cancellation.java:95)
	at com.intellij.serviceContainer.BaseComponentAdapter.createInstance(BaseComponentAdapter.kt:132)
	at com.intellij.serviceContainer.BaseComponentAdapter.getInstance(BaseComponentAdapter.kt:92)
	at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:714)
	at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:670)
	at com.github.weisj.darkmode.AutoDarkMode.<clinit>(AutoDarkMode.kt:129)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
	at com.intellij.serviceContainer.ConstructorInjectionKt.instantiateUsingPicoContainer(constructorInjection.kt:54)
	at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClassWithConstructorInjection(ComponentManagerImpl.kt:1041)
	at com.intellij.serviceContainer.ServiceComponentAdapter.createAndInitialize(ServiceComponentAdapter.kt:43)
	at com.intellij.serviceContainer.ServiceComponentAdapter.doCreateInstance(ServiceComponentAdapter.kt:39)
	at com.intellij.serviceContainer.BaseComponentAdapter.doCreateInstance(BaseComponentAdapter.kt:154)
	at com.intellij.serviceContainer.BaseComponentAdapter.createInstance$lambda$1(BaseComponentAdapter.kt:133)
	at com.intellij.openapi.progress.Cancellation.computeInNonCancelableSection(Cancellation.java:99)
	at com.intellij.serviceContainer.BaseComponentAdapter.createInstance(BaseComponentAdapter.kt:132)
	at com.intellij.serviceContainer.BaseComponentAdapter.getInstance(BaseComponentAdapter.kt:92)
	at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:714)
	at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:670)
	at com.github.weisj.darkmode.AutoDarkModeStartupListener.appFrameCreated(AutoDarkModeStartupListener.kt:33)
	at com.intellij.util.messages.impl.MessageBusImplKt.invokeMethod(MessageBusImpl.kt:680)
	at com.intellij.util.messages.impl.MessageBusImplKt.invokeListener(MessageBusImpl.kt:644)
	at com.intellij.util.messages.impl.MessageBusImplKt.deliverMessage(MessageBusImpl.kt:415)
	at com.intellij.util.messages.impl.MessageBusImplKt.pumpWaiting(MessageBusImpl.kt:394)
	at com.intellij.util.messages.impl.MessageBusImplKt.access$pumpWaiting(MessageBusImpl.kt:1)
	at com.intellij.util.messages.impl.MessagePublisher.invoke(MessageBusImpl.kt:454)
	at jdk.proxy2/jdk.proxy2.$Proxy50.appFrameCreated(Unknown Source)
	at com.intellij.idea.IdeStarter.openProjectIfNeeded$suspendImpl(IdeStarter.kt:89)
	at com.intellij.idea.IdeStarter.openProjectIfNeeded(IdeStarter.kt)
	at com.intellij.idea.IdeStarter$start$2.invokeSuspend(IdeStarter.kt:70)
	at com.intellij.idea.IdeStarter$start$2.invoke(IdeStarter.kt)
	at com.intellij.idea.IdeStarter$start$2.invoke(IdeStarter.kt)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
	at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:264)
	at com.intellij.idea.IdeStarter.start$suspendImpl(IdeStarter.kt:67)
	at com.intellij.idea.IdeStarter.start(IdeStarter.kt)
	at com.intellij.idea.ApplicationLoader.initApplicationImpl(ApplicationLoader.kt:191)
	at com.intellij.idea.ApplicationLoader.access$initApplicationImpl(ApplicationLoader.kt:1)
	at com.intellij.idea.ApplicationLoader$initApplicationImpl$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.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

Full log: idea.log

Also it seems theme isn't detected

@weisJ
Copy link
Owner

weisJ commented Mar 31, 2023

The library libgtkmm-3.0.so.1 is missing. Do you have gtk-3 installed?

Also it seems theme isn't detected

That is because the library couldn't be loaded.

2023-03-30 16:24:11,080 [   2049] SEVERE - #com.github.weisj.darkmode.AutoDarkMode - java.lang.IllegalStateException: Monitoring is not supported.

@maicol07
Copy link
Contributor Author

Thank you! That was indeed missing and prevented a part of the settings to show up. Now the only thing I don't understand is why theme doesn't switch. It seems no errors are thrown.

Log: idea.log

@weisJ
Copy link
Owner

weisJ commented Mar 31, 2023

What mechanism are you using to change your theme? gsettings, xsettings etc.? If you didn't have libgtkmm-3.0.so.1 your setup simply might not be compatible with the default setup. What desktop environment are you using?

You could try to enable the Xdg-Desktop implementation in the settings.

@maicol07
Copy link
Contributor Author

I'm currently using gsettings or gnome-tweaks (GUI). I've installed the library via apt. I'm not using a full desktop environment since it's WSL and I mainly use it via terminal and vcsxsrv.

I'm using these gsettings commands to change my theme:

if test $light -eq "0x0"
    # Switch to dark theme
    gsettings set org.gnome.desktop.interface gtk-theme 'Fluent-dark'
    gsettings set org.gnome.desktop.wm.preferences theme 'Fluent-dark'
    gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
else
    # Switch to light theme
    gsettings set org.gnome.desktop.interface gtk-theme 'Fluent'
    gsettings set org.gnome.desktop.wm.preferences theme 'Fluent'
    gsettings set org.gnome.desktop.interface color-scheme 'prefer-light'
end

@lkraav
Copy link

lkraav commented Mar 31, 2023

Please try this new version: auto-dark-mode-plugin-1.8.0-2023.1.zip

No errors, but also editor still doesn't change in any way.

19465:2023-03-31 12:22:41,799 [54922152]   INFO - #c.i.s.p.SettingsSyncPluginManager - Installed plugin com.github.weisj.darkmode
19469:2023-03-31 12:22:48,552 [54928905]   INFO - #com.github.weisj.darkmode.platform.ThemeMonitorImpl - Stopped theme monitoring.
19532:2023-03-31 12:22:52,081 [    230]   INFO - #c.i.i.p.PluginManager - Loaded custom plugins: Choose Runtime (1.2), Php Inspections (EA Extended) (4.0.7.1), Grep Console (12.16.211.6693.0), Ideolog (203.0.30.0), Auto Dark Mode (1.8.0-2023.1), Automatic Power Saver (3.0.0), IdeaVim (2.1.0), .ignore (4.5.0)
19558:2023-03-31 12:22:54,972 [   3121]   INFO - #com.github.weisj.darkmode.IntellijNotificationService - Initializing notification service
19559:2023-03-31 12:22:55,097 [   3246]   INFO - #com.github.weisj.darkmode.platform.linux.gtk.GtkLibrary - Loaded auto-dark-mode-linux-gtk at /com/github/weisj/darkmode/auto-dark-mode-linux-gtk/libauto-dark-mode-linux-gtk-x86-64.so.
19562:2023-03-31 12:22:55,158 [   3307]   INFO - #com.github.weisj.darkmode.platform.linux.gtk.GtkThemeMonitorService - Checking whether dark mode is enabled. The current theme is 'Adwaita'
19563:2023-03-31 12:22:55,164 [   3313]   INFO - #com.github.weisj.darkmode.platform.ThemeMonitorImpl - Started theme monitoring.
19577:No changes: {DBN=PluginData(enabled=false, category=PLUGINS, dependencies=[com.intellij.modules.platform, com.intellij.modules.lang]), GrepConsole=PluginData(enabled=true, category=PLUGINS, dependencies=[com.intellij.modules.lang]), IdeaVIM=PluginData(enabled=true, category=PLUGINS, dependencies=[com.intellij.modules.platform]), Key Promoter X=PluginData(enabled=false, category=PLUGINS, dependencies=[com.intellij.modules.lang]), Shifter=PluginData(enabled=false, category=PLUGINS, dependencies=[com.intellij.modules.lang]), com.4lex4.intellij.solarized=PluginData(enabled=false, category=UI, dependencies=[com.intellij.modules.lang]), com.chriscarini.jetbrains.jetbrains-auto-power-saver=PluginData(enabled=true, category=PLUGINS, dependencies=[com.intellij.modules.platform]), com.github.gtache.lsp=PluginData(enabled=false, category=PLUGINS, dependencies=[com.intellij.modules.lang]), com.github.weisj.darkmode=PluginData(enabled=true, category=PLUGINS, dependencies=[com.intellij.modules.platform]), com.intellij.ideolog=PluginData(enabled=true, category=PLUGINS, dependencies=[com.intellij.modules.lang]), com.jetbrains.ChooseRuntime=PluginData(enabled=true, category=PLUGINS, dependencies=[com.intellij.modules.lang]), com.kalessil.phpStorm.phpInspectionsEA=PluginData(enabled=true, category=PLUGINS, dependencies=[com.jetbrains.php, com.intellij.modules.platform]), io.wisetime.plugins.window.branch=PluginData(enabled=false, category=PLUGINS, dependencies=[com.intellij.modules.lang]), mobi.hsz.idea.gitignore=PluginData(enabled=true, category=PLUGINS, dependencies=[com.intellij.modules.lang, com.intellij.modules.vcs]), ru.adelf.idea.dotenv=PluginData(enabled=false, category=PLUGINS, dependencies=[com.intellij.modules.platform]), solarized=PluginData(enabled=false, category=UI, dependencies=[com.intellij.modules.lang])}

This is my starting point IDE configuration 🤔
image

I don't have New UI enabled for now. Is that somehow relevant here?

@weisJ
Copy link
Owner

weisJ commented Mar 31, 2023

Why is the Theme combobox greyed out? The new UI shouldn't affect anything. Can you also provide the log for the new version?

@lkraav
Copy link

lkraav commented Mar 31, 2023

Why is the Theme combobox greyed out? The new UI shouldn't affect anything. Can you also provide the log for the new version?

My grep is with the newest zip.

But "greyed out" - looking into https://intellij-support.jetbrains.com/hc/en-us/community/posts/4414805173266-After-recent-update-Theme-dropdown-is-disabled-not-clickable been wondering about that myself.

@weisJ
Copy link
Owner

weisJ commented Mar 31, 2023

My grep is with the newest zip.

The version I uploaded above? It has to be installed manually

@lkraav
Copy link

lkraav commented Mar 31, 2023

The version I uploaded above? It has to be installed manually

That's what I did. Version string is visible in grep, should match the zip.

@weisJ
Copy link
Owner

weisJ commented Mar 31, 2023

Sorry I overlooked the second grep output. In this case same question as above: What mechanism do you use to change the theme? What DE do you use?

You can also try to enable the Xdg-Desktop implementation

@lkraav
Copy link

lkraav commented Mar 31, 2023

Sorry I overlooked the second grep output. In this case same question as above: What mechanism do you use to change the theme? What DE do you use?

#65 (comment) (Gnome 44)

https://blogs.gnome.org/alexm/2021/10/04/dark-style-preference/ this is for initial Gnome 42, but I think implementation has not changed.

@weisJ
Copy link
Owner

weisJ commented Mar 31, 2023

See #61 (comment) for limitations with Gnome >=43. Please try to enable the Xdg-Desktop implementation in the settings. I’ll try to update compatibility for newer Gnome versions soon.

@lkraav
Copy link

lkraav commented Mar 31, 2023

See #61 (comment) for limitations with Gnome >=43. Please try to enable the Xdg-Desktop implementation in the settings. I’ll try to update compatibility for newer Gnome versions soon.

Yes, XDG works! If I can buy you the best gourmet coffee with some link, post it :)

@weisJ
Copy link
Owner

weisJ commented Apr 1, 2023

Wonderful! Great that it work :). You can support me through PayPal: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=44DYEVYYW5MR4&source=url

@maicol07
Copy link
Contributor Author

maicol07 commented Apr 1, 2023

@weisJ I confirm that xdg works fine!

Command for reference:

gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'

@weisJ
Copy link
Owner

weisJ commented Apr 2, 2023

I have submitted a new version (should be up in the next few days). The settings have changed slightly, so you might have to reconfigure when upgrading.

I'll wait a few days to see whether people seem to have any issues. After that the changes will be backported to earlier versions (up to 2022.1 as that is the newest stable version of IDEA that Android Studio uses).

@binarynoise
Copy link

Do you have a current working version for Android Studio?
The online versions don't work, so I decided to build them myself to test. IntelliJ works great but Android Studio hangs up at the splash screen (I used the master branch and reset the versions in gradle.properties back to 2o22.1)

@weisJ
Copy link
Owner

weisJ commented Apr 2, 2023

No I currently don’t have one. Backporting the changes takes some time (I hope to have one up by the end of next week)

If you want to build it yourself for older version you should probably start from the 2023.1 branch.

@maicol07
Copy link
Contributor Author

Closing since 2023.1 version has been out for some time. Issue about 2023.2: 2023.2 compatibility · Issue #70 · weisJ/auto-dark-mode (github.com)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants