Skip to content
This repository has been archived by the owner on Sep 23, 2021. It is now read-only.

"User did not grant permissions" if I click "Yes" too quickly on Windows? #128

Open
ghost opened this issue Jul 14, 2020 · 1 comment
Open

Comments

@ghost
Copy link

ghost commented Jul 14, 2020

I'm running it in a slow Windows 10 VM and I'm getting "User did not grant permissions" if I click "Yes" too quickly. Anyone ever got that? How can I debug what the problem is?

If I wait 5-10 seconds it seems to work most of the time. But if I click right away it never works. I don't have access to a real Windows system to test it for now.

@jorangreef
Copy link
Owner

jorangreef commented Sep 15, 2020

Thanks @dave-dm, I'm sorry for the delayed response.

One way to debug would be to add console log statements to sudo-prompt for each exec() method called within sudo-prompt's source. It may be that you are getting another error back from Windows, e.g. maybe an EPERM because of antivirus locking and scanning a file after it's just created by sudo-prompt (we create several), but then sudo-prompt returns the stock "User did not grant permissions" (it's actually pretty difficult for us to figure out whether the user authorized the prompt).

If it is actually an antivirus issue, you could try disable your antivirus while you test?

If you could record a quick screencast that would also help me track this down.

And please also make sure to use the included test.js file rather than your own project code so we have something simple.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant