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

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

Open
lucienimmink opened this issue Feb 8, 2023 · 12 comments
Labels
bug Something isn't working needs more info In case futher information is require to advance solving the issue.

Comments

@lucienimmink
Copy link

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

@Spiritreader
Copy link
Member

Spiritreader commented Feb 8, 2023

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?

@Armin2208
Copy link
Member

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
Copy link
Member

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.

@Spiritreader
Copy link
Member

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 Spiritreader added needs more info In case futher information is require to advance solving the issue. and removed needs triage labels Feb 9, 2023
@Ansuel
Copy link

Ansuel commented Feb 10, 2023

@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.

@Spiritreader
Copy link
Member

Spiritreader commented Feb 10, 2023

@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.

@lucienimmink
Copy link
Author

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.

@Spiritreader
Copy link
Member

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

@lucienimmink
Copy link
Author

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

@Spiritreader
Copy link
Member

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 Spiritreader added the bug Something isn't working label Feb 16, 2023
@Spiritreader Spiritreader changed the title Service doesn't work anymore in insider build 25290+ Service doesn't work anymore in insider build 25290+ with tray icon disabled Feb 16, 2023
@aaronliu0130
Copy link

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

@aaronliu0130
Copy link

It worked today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs more info In case futher information is require to advance solving the issue.
Projects
None yet
Development

No branches or pull requests

5 participants