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

deactivated functions are activated again after reboot #15450

Closed
1 task done
Matzeeee opened this issue Jan 11, 2022 · 36 comments
Closed
1 task done

deactivated functions are activated again after reboot #15450

Matzeeee opened this issue Jan 11, 2022 · 36 comments
Labels
Area-Runner The PowerToys main executable Hot Fix Items we will product an out-of-band release for Issue-Bug Something isn't working Priority-0 Bugs that we consider release-blocking/recall-class (P0) Product-Settings The standalone PowerToys Settings application Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release.

Comments

@Matzeeee
Copy link

Microsoft PowerToys version

0.53.1

Running as admin

  • Yes

Area(s) with issue?

General

Steps to reproduce

i have deactivated awake, fancyzones and mousetools.
after restart of powertoys they are activated again.

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

Other Software

No response

@Matzeeee Matzeeee added Issue-Bug Something isn't working Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Jan 11, 2022
@Aaron-Junker Aaron-Junker added the Area-Runner The PowerToys main executable label Jan 11, 2022
@crutkas
Copy link
Member

crutkas commented Jan 12, 2022

I tried to repro and didn't fail.

/reportbug to see if we can't see something in the logs.

@ghost ghost added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Jan 12, 2022
@ghost
Copy link

ghost commented Jan 12, 2022

Hi there!

We need a bit more information to really debug this issue. Can you add a "Report Bug" zip file here? You right click on our system tray icon and just go to report bug. Then drag the zipfile from your desktop onto the GitHub comment box in this issue. Thanks!
Report Bug

@crutkas
Copy link
Member

crutkas commented Jan 12, 2022

@adam1book too

@crutkas crutkas added the Product-Settings The standalone PowerToys Settings application label Jan 12, 2022
@adam1book
Copy link

adam1book commented Jan 12, 2022

PowerToysReport_2022-01-12-07-55-58.zip

@crutkas Zip file uploaded. I disabled all tools except for FancyZones, File Explorer add-ons, and Mouse utilities; restarted PowerToys; and created the zip. All disabled tools were re-enabled after the restart.

Maybe this issue is occurring because of a PowerToys upgrade instead of fresh install, or file/folder access issues arising from corporate system usage? Saw this issue on a (mostly) locked-down corporate system, will test on a personal system when possible.

@Matzeeee
Copy link
Author

ok here is my zip file
PowerToysReport_2022-01-12-16-20-55.zip

@ghost ghost added Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams Needs-Team-Response An issue author responded so the team needs to follow up and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Jan 12, 2022
@Matzeeee
Copy link
Author

P.S. on an other system i have the same behavior

@jaimecbernardo
Copy link
Collaborator

Tried replicating by copying in the settings from the bug report to my local settings folder, but PowerToys reacts to it as expected on my machine.

This might have something to do with access, has suggested by @adam1book .

Could we please try something to get more info?
In file explorer, navigate to %LOCALAPPDATA%\Microsoft\PowerToys and check the settings.json file properties, like security to check if you'd have access. Check for weird flags as well, like read-only, hidden, etc...
Also check if after enabling/disabling PowerToys that file gets changed or its date gets modified.

When editing settings for a specific PowerToy, try to see if the *-settings.json file inside each PowerToy folder gets edited as well.

@franky920920
Copy link
Contributor

PowerToysReport_2022-01-12-16-16-52.zip

But I will move conversation into that other thread.

Originally posted by @t-makaro in #15491 (comment)

@t-makaro Please check what @jaimecbernardo requested in the previous comment too.

@t-makaro
Copy link

This occurs still after I did a fresh install of Powertoys. If the computer reboots with powertoys open, and powertoys launches on startup this does not occur. This occurs if I manually exit powertoys from the system tray and reopen it; just to be clear.

The settings.json file is not read-only, and I do have permission to edit it. Yes, that file is changing if I make a setting change in powertoys. When I closed powertoys from the system tray, the settings.json file also changed, but I'm not sure what. When I launch powertoys. I notice that the settings.json file changes to contain:

"enabled":{}

which if I then open the powertoys settings the settings.json file repopulates with all of the toys enabled set to true.

@Matzeeee
Copy link
Author

Tried replicating by copying in the settings from the bug report to my local settings folder, but PowerToys reacts to it as expected on my machine.

This might have something to do with access, has suggested by @adam1book .

Could we please try something to get more info? In file explorer, navigate to %LOCALAPPDATA%\Microsoft\PowerToys and check the settings.json file properties, like security to check if you'd have access. Check for weird flags as well, like read-only, hidden, etc... Also check if after enabling/disabling PowerToys that file gets changed or its date gets modified.

When editing settings for a specific PowerToy, try to see if the *-settings.json file inside each PowerToy folder gets edited as well.

i have full access to these files, they are updated if i change something in powertoys

@jaimecbernardo
Copy link
Collaborator

So, PowerToys is populating the "enabled":{} field when you open it and then reverting it to "enabled":{} when you close it?

Could you please give some more details about what's happening to the "enabled":{} field? That's where the enabled/disabled settings of PowerToys get saved.

@Matzeeee
Copy link
Author

Matzeeee commented Jan 13, 2022

i have more information:

  • when i start powertoys whith its autorun option form task sheduler (at logon) the error does not occur,
    only if i start it from startmenu or from my (autostart-)batchfile.
    the difference is that in task sheduler it starts with max privileges?
  • the error occurs not with te videotools options.

Edit: when i restart from startmenu as admin the error does not occur.

@t-makaro
Copy link

@jaimecbernardo Powertoys is deleting the entries inside "enabled":{} when I start Powertoys from the start menu. The toys that I disabled don't know that they should be disabled, so they must be using some default. When I load the settings UI then the entry inside of settings.json gets repopulated with the defaults.

@Matzeeee is right. If I click "Run as Administrator" on Powertoys in the start menu. Then this does not happen. This only happens if I run powertoys but just hitting "Open" (or an equivalent) even though Powertoys does give a UAC prompt when opening this way.

image

@jaimecbernardo
Copy link
Collaborator

Interesting. I'm not aware of a reason why PowerToys would be unable to read the file properly but then would be able to save it.
It might be something else, like a general load fail where we end up going to a code path that resets that main file. Are settings that are unique to each PowerToy getting reset as well?

Would you mind creating a new bug report and sending it? We might be able to pick up a pattern with the added entries in the logs from repetition.

@Matzeeee
Copy link
Author

powertoys started "normal" (no admin) with error reenable some tools
PowerToysReport_2022-01-14-14-44-19.zip
:

@Matzeeee
Copy link
Author

powertoys started as admin with no error
PowerToysReport_2022-01-14-14-46-02.zip
:

@Matzeeee
Copy link
Author

p.s. the option "run as admin" in powertoys was always enabled

@crutkas crutkas added Priority-0 Bugs that we consider release-blocking/recall-class (P0) and removed Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release. Priority-1 Bug that is high priority labels Feb 1, 2022
@stefansjfw
Copy link
Collaborator

As I can't reproduce this, could someone try this test build and let me know if something has changed?

installer .exe can be found here:
https://github.com/stefansjfw/PowerToys/releases/tag/v0.0.1

@Gieted
Copy link

Gieted commented Feb 1, 2022

I can't reproduce this

This is completely impossible. Are you sure you are testing it on PowerToys v0.55.0 and are following the following instruction:

  1. Make sure your PowerToys don't start in administrator mode on itself, when Always run as administrator is disabled
  2. Ensure Always run as administrator is enabled
  3. Disable Awake module (or any other)
  4. Close PowerToys
  5. Launch it again and make sure it's running in administrator mode.
  6. Enabled modules should be reset to defaults by now

@stefansjfw
Copy link
Collaborator

stefansjfw commented Feb 1, 2022

I can't reproduce this

This is completely impossible. Are you sure you are testing it on PowerToys v0.55.0 and are following the following instruction:

  1. Make sure your PowerToys is not running as administrator.
  2. Tick Always run as administrator
  3. Disable Awake module (or any other)
  4. Close PowerToys
  5. Launch it again and make sure it's now running in administrator mode.
  6. Enabled modules should be reset to defaults by now

1 and 2 is not possible in regular PT usage (see image bellow), only when PT is started by installer after installing/updating (see #15487).

image

So this only happens for you right after installing/updating PT ? Or you can reproduce it somehow when manually starting PT ?

Did you try test build ? Could you try and and reattach /bugreport?

Thanks in advance

@ghost ghost added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Feb 1, 2022
@ghost
Copy link

ghost commented Feb 1, 2022

Hi there!

We need a bit more information to really debug this issue. Can you add a "Report Bug" zip file here? You right click on our system tray icon and just go to report bug. Then drag the zipfile from your desktop onto the GitHub comment box in this issue. Thanks!
Report Bug

@microsoft microsoft deleted a comment Feb 1, 2022
@Gieted
Copy link

Gieted commented Feb 1, 2022

@stefansjfw Sorry, I wasn't aware of this behavior, so I gave you incorrect instructions. I've already corrected them. The issue happens when PowerToys is restarting to open in administrator mode, here the settings are saved before modules() have been initialized.

obraz
obraz

@stefansjfw
Copy link
Collaborator

@stefansjfw Sorry, I wasn't aware of this behavior, so I gave you incorrect instructions. I've already corrected them. The issue happens when PowerToys is restarting to open in administrator mode, here the settings are saved before modules() have been initialized.

obraz obraz

This is exactly what I'm trying to solve :) So, I just need confirmation that test build works. Could you try it please ? :)

https://github.com/stefansjfw/PowerToys/releases/tag/v0.0.1

@crutkas crutkas added Hot Fix Items we will product an out-of-band release for and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Feb 1, 2022
@crutkas crutkas added the Status-In progress This issue or work-item is under development label Feb 2, 2022
@stefansjfw
Copy link
Collaborator

@Gieted Thanks for your help! I believe this is now (properly) solved

@jaimecbernardo jaimecbernardo added Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release. and removed Status-In progress This issue or work-item is under development labels Feb 2, 2022
@t-makaro
Copy link

t-makaro commented Feb 2, 2022

I can confirm. That this appears resolved now.

@franky920920
Copy link
Contributor

Shipped with 0.55.1 release.

@crutkas
Copy link
Member

crutkas commented Mar 3, 2022

This should be fixed with 0.55, we're closing this out with the 0.56 release

@crutkas crutkas closed this as completed Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Runner The PowerToys main executable Hot Fix Items we will product an out-of-band release for Issue-Bug Something isn't working Priority-0 Bugs that we consider release-blocking/recall-class (P0) Product-Settings The standalone PowerToys Settings application Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

No branches or pull requests