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

(nuisance?) System.ComponentModel.Win32Exception in Squirrel.dll #1313

Closed
asfarley opened this issue May 9, 2018 · 15 comments
Closed

(nuisance?) System.ComponentModel.Win32Exception in Squirrel.dll #1313

asfarley opened this issue May 9, 2018 · 15 comments

Comments

@asfarley
Copy link

asfarley commented May 9, 2018

I'm getting a bunch of the following appearing in my Output from Squirrel update manager:
Exception thrown: 'System.ComponentModel.Win32Exception' in Squirrel.dll

I've basically followed the integration guide, except that I recently moved the call to UpdateManager into an async task rather than calling in Program.cs. However, I was getting this exception even before moving it, when I had followed the integration guide exactly.

This is on a Win10 x64 machine. The exception doesn't seem to be causing any problems as far as I can tell; the update process works correctly.

@Thieum
Copy link
Contributor

Thieum commented May 2, 2019

@asfarley is it still an issue with the latest version of Squirrel?

@asfarley
Copy link
Author

asfarley commented May 2, 2019

@Thieum, I am no longer doing software development on the project where I was using Squirrel so I cannot re-test this easily. Thank you for the follow-up anyway; I will close this issue and re-open if I run into this again.

@asfarley asfarley closed this as completed May 2, 2019
@andrew-mi
Copy link

Did anyone solve this? I am getting this error too.
I am using the basic integration route; looks something like this:
new UpdateManager(@"https://myproject.blob.core.windows.net/updates").UpdateApp();
Not yet sure if it is doing anything at all.

@Thieum
Copy link
Contributor

Thieum commented Jul 10, 2019

@andrew-mi do you have a stack for the exception your are encountering? The original issue wasn't specifying where the exception was exactly coming from in Squirrel.

@andrew-mi
Copy link

Right now Visual Studio Output says
Exception thrown: 'System.IO.FileNotFoundException' in mscorlib.dll Twice, followed by hundreds of lines of Exception thrown: 'System.ComponentModel.Win32Exception' in Squirrel.dll
I will try investigate and find one for you. Right now I am using the Nuget package, which I suspect might limit that- but I will try.

@andrew-mi
Copy link

System.ComponentModel.Win32Exception HResult=0x80004005 Message=Access is denied Source=Squirrel StackTrace: at Squirrel.UnsafeUtility.<>c__DisplayClass0_0.<EnumerateProcesses>b__1(Int32 i) in C:\Users\ana\code\Squirrel\Squirrel.Windows\src\Squirrel\Utility.cs:line 794
@Thieum that is the best VS will give me without the source loaded.

@Thieum
Copy link
Contributor

Thieum commented Jul 10, 2019

@andrew-mi looks like a permission issue - we had different reports of that recently due to the controlled folder access option in Windows Defender (see #1485 (comment) ). Is it something that is activated on the system you are trying to install?

@andrew-mi
Copy link

Ahh ok, at least that makes sense. Thanks for investigating.
I have disabled (at least parts) of Windows Defender previously for other issues; and therefore going to that settings spot doesn't display that setting; replaced with the text "Your virus & threat protection is managed by your organisation." But I do know what setting you are talking about, and it could be enabled: though I haven't seen any other evidence of that.

@Thieum
Copy link
Contributor

Thieum commented Jul 10, 2019

@andrew-mi
I think it should be possible to check the value with an elevated PS Script with Get-mppreference.

https://docs.microsoft.com/en-us/powershell/module/defender/get-mppreference?view=win10-ps

Considering it can be enabled / disabled with PS too: https://docs.microsoft.com/en-us/windows/security/threat-protection/windows-defender-exploit-guard/enable-controlled-folders-exploit-guard

@andrew-mi
Copy link

Relevant Lines:
ControlledFolderAccessAllowedApplications : {MsMpEng.exe}
ControlledFolderAccessProtectedFolders :
EnableControlledFolderAccess : 0

@andrew-mi
Copy link

So I suspect that means it is off, but I don't really know.

@andrew-mi
Copy link

I tried to Enable/Disable the Feature from Elevated PS; but got an error similar to https://stackoverflow.com/questions/48960190/powershell-set-mppreference-disablerealtimemonitoring-true-not-working-correct
Which says that "The problem is that the Windows Defender antivirus services seem to be persistently disabled on your machine." This matches what I thought I had done; and presumably therefore this controlled access feature is disabled on my machine.

@Thieum
Copy link
Contributor

Thieum commented Jul 10, 2019

@andrew-mi indeed, must be something else then :/

@andrew-mi
Copy link

I haven't touched my project for a bit; but just tried it and still getting this error consistently. @Thieum could this issue be reopened? or should I create a new issue?

@Thieum
Copy link
Contributor

Thieum commented Aug 15, 2019

@andrew-mi you should open a new one.

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

3 participants