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

New AUMID does not work #88

Open
craterkamath opened this issue Sep 1, 2023 · 6 comments
Open

New AUMID does not work #88

craterkamath opened this issue Sep 1, 2023 · 6 comments

Comments

@craterkamath
Copy link

craterkamath commented Sep 1, 2023

I'm trying to create a simple python application that sends interactive toasts and minimizes into the system tray.

Whenever I use an existing AUMID from "Clock" or any other application that sends toasts it works without a problem.

When I try to register a new AUMID using the register_hkey_aumid.py or the register_hkey function, the toasts are not being sent. The toasts DO NOT work for the default command prompt AUMID too.

I do not see the new AUMID listed in the "Notifications & actions" as well. But I can see the registered key in the windows registry.

OS: Windows 11 Pro Version 22H2
Python Version: 3.11.5

@DatGuy1
Copy link
Owner

DatGuy1 commented Sep 1, 2023

Have you got a reproducible code snippet? Also, what's the version of your windows-toasts?

@craterkamath
Copy link
Author

Reproducable Code is here: https://github.com/craterkamath/aquaman/blob/master/aquaman/aquaman.py#L72
windows-toasts version: 1.0.0

@DatGuy1
Copy link
Owner

DatGuy1 commented Sep 1, 2023

Odd, the snippet works for me. Sometimes when notifications get spammed, such as when debugging, Windows locks up the platform for an indeterminate amount of time. Have you tried restarting Windows?

You say 'Aquaman' doesn't show up in notifications & actions. Does it show up in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings? If there is an Enabled key try deleting it, or alternatively delete the Aquaman key entirely as well as HKCU\SOFTWARE\Classes\AppUserModelId\Aquaman.

If it still doesn't work try registering a different AUMID, such as Aquaman 2, and let me know if that works.

As an aside looking at your code, since the content of it is always static you should be able to define the toaster and toast outside of the function. At least the InteractableWindowsToaster should, as it makes a call into the Windows Runtime on initialisation. I'll add a note about it to the documentation.

@craterkamath
Copy link
Author

craterkamath commented Sep 3, 2023

Apologies for the delay in responding.

  1. Nope, does not work after restarting windows. I'm not quite sure what is & how the process is blocked from sending notifications but sadly restarting didn't do the trick.

  2. 'Aquaman' doesn't show up in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings as well. No record to edit. I tried deleting HKCU\SOFTWARE\Classes\AppUserModelId\Aquaman and restarting the process, the new key appears but the notification doesn't seem to work.

  3. Changing the key name did not work as well. Tried a couple of variety "AQMAN", "Aqua.man", "Aquaman2" just to see if there is not some undefined format.

  4. Thanks, I am working on optimizing it into a singleton that is shared across threads.

Any other settings/places that I can look at? I am very much surprised that it works on your device. Do I have to enable third-party notifications somewhere?

@craterkamath
Copy link
Author

@DatGuy1 I'm trying to zero-down on the component causing the trouble. Since you were able to make it work on your machine, I just wanted to ask how did you try out the code? Did you run the gui.py directly? or did you do a pip install to run Aquaman?

@DatGuy1
Copy link
Owner

DatGuy1 commented Sep 7, 2023

@DatGuy1 I'm trying to zero-down on the component causing the trouble. Since you were able to make it work on your machine, I just wanted to ask how did you try out the code? Did you run the gui.py directly? or did you do a pip install to run Aquaman?

I copied aquaman.py and removed the threading bits to pretty much call L45-L60 in L81, and it just worked™. I believe this is may be an issue with some hidden setting on your system or such. What about running as administrator?

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

2 participants