Windows-Auto-Night-Mode icon indicating copy to clipboard operation
Windows-Auto-Night-Mode copied to clipboard

Service doesn't work anymore in insider build 25290+ with tray icon disabled

Open lucienimmink opened this issue 2 years ago • 12 comments

Description

Using the latest insider preview ADM doesn't work anymore. Looks like the service is not running

Expected Behavior

ADM should be able to connect to it's service and switch when needed.

Log Data

service.log

config.yaml: AutoThemeSwitchingEnabled: true Governor: NightLight Autostart: Validate: true WindowsThemeMode: Enabled: true DarkThemePath: C:\Users\xxx\AppData\Local\Microsoft\Windows\Themes\SpotDark.theme LightThemePath: C:\Users\xxx\AppData\Local\Microsoft\Windows\Themes\SpotLighter.theme MonitorActiveTheme: false ApplyFlags: [] AppsSwitch: Enabled: true Component: Mode: Switch SystemSwitch: Enabled: true Component: Mode: Switch TaskbarSwitchDelay: 1200 TaskbarColorOnAdaptive: true TaskbarColorWhenNonAdaptive: Light DWMPrevalenceSwitch: false DWMPrevalenceEnableTheme: Light ColorFilterSwitch: Enabled: false Component: {} OfficeSwitch: Enabled: true Component: Mode: Switch LightTheme: 5 DarkTheme: 4 Sunrise: 2023-02-03T07:00:00.0000000 Sunset: 2023-02-03T20:00:00.0000000 Location: PollingCooldownTimeSpan: 1.00:00:00 Enabled: false UseGeolocatorService: true SunsetOffsetMin: 0 SunriseOffsetMin: 0 CustomLat: 0 CustomLon: 0 Tunable: BatterySliderDefaultValue: 25 DisableEnergySaverOnThemeSwitch: false UseLogonTask: false Debug: false Trace: false DebugTimerMessage: false ShowTrayIcon: false UICulture: en GPUMonitoring: Enabled: false Threshold: 30 MonitorTimeSpanMin: 1 Samples: 1 Events: DarkThemeOnBattery: false Win10AllowLockscreenSwitch: true Notifications: OnAutoThemeSwitching: true OnSkipNextSwitch: true AutoSwitchNotify: Enabled: false GracePeriodMinutes: 5 Hotkeys: Enabled: false ForceLight: ForceDark: NoForce: ToggleTheme: TogglePostpone: ToggleAutoThemeSwitch: IdleChecker: Enabled: false Threshold: 5 WallpaperSwitch: Enabled: false Component: TypeLight: Individual TypeDark: Individual Position: Fill GlobalWallpaper: Light: Dark: SolidColors: Light: '#FFFFFF' Dark: '#000000' Monitors: [] Updater: AutoInstall: false Enabled: true Silent: false DaysBetweenUpdateCheck: 7 CheckOnStart: true VersionQueryUrl: DownloadBaseUrl: ZipCustomUrl: HashCustomUrl:

Commit Hash, Version and Windows Build

  • Commit: 212dbb4
  • Service/App: 10.3.0.90
  • Updater: 2.5.2
  • Shell: 1.3.1.0
  • .Net: 6.0.10
  • Windows: 25290.1010

Screenshots / Videos

image

lucienimmink avatar Feb 08 '23 17:02 lucienimmink

I don't have access to insider builds. @Armin2208 please check.

Also according to the logs the service does seem to be running for some time, I can't really tell if it crashes or if there is an issue with named pipes.

Does the service appear in the system tray? If so, does the service disappear from the tray bar if you hover over the icon? If you can click and interact with the service, then it at least didn't crash but appears to be unresponsive for some reason.

Also, when does the error messsage appear? When you start ADM or only afterwards when you try to modify UI elements?

Spiritreader avatar Feb 08 '23 19:02 Spiritreader

Hello!

I've tested Auto Dark Mode on my insider machine. Here is the version information:

  • Commit: 015af38
  • Service/App: 10.3.1.24 (!)
  • Updater: 2.5.2
  • Shell: 1.3.1.0
  • .Net: 7.0.1 (!)
  • Windows: 25295.1000 (!)

Differences: Auto Dark Mode 10.3.1 Beta was tested based on .Net 7. Also I've used the newest Insider build 25295 released today.

The result is: no issues with Auto Dark Mode in combination with the newest Windows 11 insider version.

Armin2208 avatar Feb 09 '23 21:02 Armin2208

Does the service appear in the system tray? If so, does the service disappear from the tray bar if you hover over the icon? If you can click and interact with the service, then it at least didn't crash but appears to be unresponsive for some reason.

It's worth mentioning he disabled tray icon in this config file.

Armin2208 avatar Feb 09 '23 21:02 Armin2208

Does the service appear in the system tray? If so, does the service disappear from the tray bar if you hover over the icon? If you can click and interact with the service, then it at least didn't crash but appears to be unresponsive for some reason.

It's worth mentioning he disabled tray icon in this config file.

That shouldn't affect the stability of the service, but it's probably worth a try re-enabling it.

Since your test machine works it doesn't seem like ADM is generally incompatible with future builds so I'll mark this thread as more info needed for now.

Spiritreader avatar Feb 09 '23 22:02 Spiritreader

@Spiritreader from what I can see the problem is not the one reported... But the autostartup is just broken....

So when the pc is turned on auto night mode is not started. And as you can see trying to enable the service from the ui result in that reported error.

The app works correctly... The problem is in the autostarting feature that is currently broken.

Ansuel avatar Feb 10 '23 13:02 Ansuel

@Spiritreader from what I can see the problem is not the one reported... But the autostartup is just broken....

So when the pc is turned on auto night mode is not started. And as you can see trying to enable the service from the ui result in that reported error.

The app works correctly... The problem is in the autostarting feature that is currently broken.

It reports an auto start error because the service is no longer responding. If it were to fail setting an auto start entry then it would either show an exception or, if there is a bug, it crashes. But the service doesn't log any exception so unless we get more information about how it crashes I would say the report is accurate for now.

If it's only the auto start and nothing else I think it should be fixable pretty quickly. Since @Armin2208 reported no issues tho, even with the auto start im more inclined to lean towards it being a bug depending on either the adm or system configuration. Please keep in mind that insider builds are notoriously unstable in some ways and we don't actually support them. It could depend on the specific build and dotnet version, as noted in Armins response.

We'll continue to monitor incoming replies on this thread for service logs and reproduction steps so we can get to the bottom of this.

Spiritreader avatar Feb 10 '23 13:02 Spiritreader

I've done some more testing and with the tray icon I can report no issues at all. Once that checkbox is checked for hiding the tray icon it just stops and I get the popup that it timed out.

lucienimmink avatar Feb 15 '23 21:02 lucienimmink

Oh so it's related to the tray hide function. Thanks, will take a look!

Spiritreader avatar Feb 15 '23 21:02 Spiritreader

I've also updated to the newest windows build (25300); will check if that makes any difference at all.

lucienimmink avatar Feb 15 '23 21:02 lucienimmink

I looked at the tray hide implementation to see if I missed anything really obvious that could cause ADM to crash. But from my preliminary checks it appears to work fine.

It's quite weird because the only thing we do to hide or show the tray is this:

if (Builder.Config.Tunable.ShowTrayIcon)
{
    NotifyIcon.Visible = true;
}

Apparently MS is making a lot of changes to the taskbar, tray and notification area. So I'm willing to make the assumption that something changed concerning the tray in newer insider builds. However I consider it unlikely that Windows will fix it, but rather expect devs to adapt their tray implementation eventually.

Since I don't have an insider dev machine, I'll have to redirect this to @Armin2208 or at least wait until these builds are pushed to stable.

Sorry for the inconvenience. For now my best recommendation for a workaround is to keep using ADM with tray enabled for a while.

Spiritreader avatar Feb 16 '23 22:02 Spiritreader

I'm on dev 25951 with tray icon enabled and I can't get it to autostart, login or startup task.

aaronliu0130 avatar Sep 16 '23 18:09 aaronliu0130

It worked today.

aaronliu0130 avatar Sep 23 '23 23:09 aaronliu0130