microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
110.52k stars 6.5k forks source link

Awake tray icon missing in 0.85 #35250

Open edjia opened 1 week ago

edjia commented 1 week ago

Microsoft PowerToys version

0.85

Installation method

PowerToys auto-update

Running as admin

Yes

Area(s) with issue?

Awake

Steps to reproduce

tray icon missing after pc reboot. awake.zip

✔️ Expected Behavior

There's an icon of Awake in the taskbar notification area.

❌ Actual Behavior

I can not find the icon and I have to open PowerToys settings just to change my settings twice, which is very inconvenient.

Other Software

OS: win11 pro for workstations 24H2 26100.1882 with Windows Feature Experience Pack 1000.26100.23.0

@dend

similar-issues-ai[bot] commented 1 week ago

We've found some similar issues:

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.

o-l-a-v commented 1 week ago

Same here on Windows 11 24H2. Even did a uninstall and deleted %LOCALAPPDATA%\PowerToys before installing v0.85.0.

Click to view logs ```log [08:28:14.8723787] [Info] Program::Main Launching Awake... [08:28:14.8871318] [Info] Program::Main 0.85.0.0 [08:28:14.8873664] [Info] Program::Main Build: PROMETHEAN_09082024 [08:28:14.8887250] [Info] Program::Main OS: Microsoft Windows NT 10.0.26100.0 [08:28:14.9095781] [Info] Program::Main OS Build: Windows 10 Enterprise 24H2 26100.1.amd64fre.ge_release.240331-1435 [08:28:14.9916145] [Info] Program::Main {} [08:28:14.9918647] [Info] Program::Main Parsing parameters... [08:28:15.0815375] [Info] Program::HandleCommandLineArguments Starting with PID binding. [08:28:15.0834137] [Info] Program::HandleCommandLineArguments The value for --use-pt-config is: True [08:28:15.0836618] [Info] Program::HandleCommandLineArguments The value for --display-on is: True [08:28:15.0838107] [Info] Program::HandleCommandLineArguments The value for --time-limit is: 0 [08:28:15.0839497] [Info] Program::HandleCommandLineArguments The value for --pid is: 14052 [08:28:15.0840787] [Info] Program::HandleCommandLineArguments The value for --expire-at is: [08:28:15.0842342] [Info] Program::HandleCommandLineArguments The value for --use-parent-pid is: False [08:28:15.0921302] [Info] <>c__DisplayClass17_0::b__0 Thread execution is on: 5 [08:28:15.0987790] [Info] Program::HandleCommandLineArguments Reading configuration file: C:\Users\olav.birkeland\AppData\Local\Microsoft\PowerToys\Awake\settings.json [08:28:15.1057015] [Info] <>c__DisplayClass13_0::b__1 Created HWND for the window: 131684 [08:28:15.1149926] [Info] TrayHelper::SetShellIcon Could not set the shell icon. Action: Add and error code: -2147467259. HIcon handle is 131721 and HWnd is 131684 [08:28:15.1178852] [Info] <>c__DisplayClass17_0::b__0 Thread execution is on: 5 [08:28:15.2223537] [Info] Program::ProcessSettings Identified custom time shortcuts for the tray: 0 [08:28:15.2834950] [Info] TrayHelper::SetShellIcon Could not set the shell icon. Action: Update and error code: -2147467259. HIcon handle is 66189 and HWnd is 131684 [08:28:15.2839963] [Error] Program::ProcessSettings There was a problem reading the configuration file. Error: System.ComponentModel.Win32Exception Failed to change tray icon. Action: Update and error code: -2147467259 [08:28:15.2842521] [Info] Program::HandleCommandLineArguments Bound to target process while also using PowerToys settings: 14052 ```
archipepe commented 1 week ago

Hello, I'm also having this issue with latest v0.85.0

I have to manually disable Awake, wait a few minutes and then reenable it after every restart to load it (Fast startup off).

OS: Windows 11 Pro 24H2 26100.1882 with Windows Feature Experience Pack 1000.26100.23.0

Log_2024-10-03.txt

This is what I found in Event Viewer:

Application: PowerToys.Awake.exe CoreCLR Version: 8.0.824.36612 .NET Version: 8.0.8 Description: The process was terminated due to an unhandled exception. Exception Info: System.ComponentModel.Win32Exception (0x80004005): Failed to change tray icon. Action: Update and error code: -2147467259 at Awake.Core.TrayHelper.SetShellIcon(IntPtr hWnd, String text, Icon icon, TrayIconAction action) at Awake.Core.Manager.SetPassiveKeepAwake(Boolean updateSettings) at Awake.Core.Manager.CompleteExit(Int32 exitCode) at Awake.Program.Exit(String message, Int32 exitCode) at Awake.Program.<>c__DisplayClass20_0.b__0()

dend commented 1 week ago

Something that I am implementing here that will hopefully help in future releases is retry logic for setting the icon. Right now, once it fails once, it fails, but maybe it's worth trying a few more times before giving up. Stay tuned.

bootlegseahorse commented 1 week ago

Thank you. I figure that it disappears every time I restart Explorer.exe.

technobulb commented 1 week ago

I am having the same issue. Windows 11 Home

bootlegseahorse commented 1 week ago

Anybody tried 0.85.1?

obarannikov commented 1 week ago

Same on 0.85.1

manuel-garnier commented 23 hours ago

Was having same problem with 0.85. Just upgraded to 0.85.1 and it works for now. (Win 11 23H2 22631.4317)