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

ChocoGUI Crash on Startup -- Windows 10 #458

Closed
drfrpjr opened this issue Jul 18, 2017 · 13 comments
Closed

ChocoGUI Crash on Startup -- Windows 10 #458

drfrpjr opened this issue Jul 18, 2017 · 13 comments
Labels
Bug Issues where something has happened which was not expected or intended
Milestone

Comments

@drfrpjr
Copy link

drfrpjr commented Jul 18, 2017

I have been using Choco and ChocoGUI -- the latest versions -- with Windows 10 on a Surface. Works fine. Powershell version=5.0.10240.17443

However, I just got a new desktop PC and while Choco is fine, ChocoGUI viciously crashes with the error below. This is running as administrator, etc. I think I have tried everything else above as well. Powershell version=5.1.14393.953

I included the Powershell versions because that seems to be the only differences between the two systems in terms of dependencies.

Any advice?

Thanks.

image

@mwallner mwallner added the Bug Issues where something has happened which was not expected or intended label Jul 19, 2017
@LawrenceIRL
Copy link

I'll add that this also occurs over here too.
It seems to only crash when selecting an internal source. My source is running Chocolatey Server.
Issue does not occur in the pre-release version from MyGet.

@wjk
Copy link
Contributor

wjk commented Aug 14, 2017

@drfrpjr @TheVakman This actually isn't what you think it is. The problem (as evidenced in that TLDR error dialog) is that the Choco GUI client is trying to use the MD5 crypto algorithm on a system with Windows' FIPS mode feature enabled. When FIPS mode is enabled, the .NET Framework will refuse to load certain crypto algorithms, instead throwing an exception. This has nothing to do with one's package source, and entirely with an incompatibility between ChocoGUI and the security policies of your organization.

This problem can be corrected by placing the following code in the App.config file for ChocolateyGUI, and then rebuilding the project from source. I got this code from the App.config file for the choco checksum tool. You can see it here (click the "Show" link next to the file called checksum.exe.config).

<configuration>
    <runtime>
        <enforceFIPSPolicy enabled="false"/>
    </runtime>
</configuration>

I am not certain as to ChocolateyGUI's policies regarding FIPS mode compatibility. If anyone wants me to submit a PR with this change, please let me know. Hope this helps!

@drfrpjr
Copy link
Author

drfrpjr commented Aug 14, 2017 via email

@wjk
Copy link
Contributor

wjk commented Aug 15, 2017

@drfrpjr You'll need Visual Studio 2017 (the free Community edition is OK to use here, as this is an open-source project, and the Community edition's license terms specifically allow use for open-source development, but of course a higher edition will do if you have a license).

What you'll want to do is install VS2017 (you'll need to select at least the .NET Desktop Development workflow during the installation process, or else the project won't load). Once that is done, clone the ChocolateyGUI repository and run the build.ps1 script in the repository root. Once that has finished running, you can open Source\ChocolateyGUI.sln and edit away. You will need to add the <enforceFIPSPolicy /> tag from my above post into the Source\ChocolateyGUI\app.config file (try inserting it directly after line 3), and then build the entire solution.

@drfrpjr
Copy link
Author

drfrpjr commented Aug 15, 2017 via email

@wjk
Copy link
Contributor

wjk commented Aug 15, 2017

It should, but I haven't been able to test it. The main reason I recommended VS2017 was because the solution file had a VS2017 header in it. However, a cursory search reveals no VS2017-specific project features. Try it and let me know how it goes. Thanks!

@drfrpjr
Copy link
Author

drfrpjr commented Aug 15, 2017 via email

@LawrenceIRL
Copy link

@wjk Thanks. I'm okay with using the pre-release version as that's the default in that version. I just wanted to note that it didn't happen on the pre-release version and now we know why. I'm very curious when that one will replace the older version.

@RichiCoder1
Copy link
Contributor

RichiCoder1 commented Sep 26, 2017

I took @wjk's suggestion and simply disabled the check in d365ec3. It doesn't make any sense to respect this policy for ChocolateyGUI and even microsoft recommends against it.

@RichiCoder1 RichiCoder1 added this to the 0.15.0 milestone Sep 26, 2017
@drfrpjr
Copy link
Author

drfrpjr commented Sep 26, 2017 via email

@RichiCoder1
Copy link
Contributor

It should be in the latest prerelease.

@hltdev8642
Copy link

@drfrpjr @TheVakman This actually isn't what you think it is. The problem (as evidenced in that TLDR error dialog) is that the Choco GUI client is trying to use the MD5 crypto algorithm on a system with Windows' FIPS mode feature enabled. When FIPS mode is enabled, the .NET Framework will refuse to load certain crypto algorithms, instead throwing an exception. This has nothing to do with one's package source, and entirely with an incompatibility between ChocoGUI and the security policies of your organization.

This problem can be corrected by placing the following code in the App.config file for ChocolateyGUI, and then rebuilding the project from source. I got this code from the App.config file for the choco checksum tool. You can see it here (click the "Show" link next to the file called checksum.exe.config).

<configuration>
    <runtime>
        <enforceFIPSPolicy enabled="false"/>
    </runtime>
</configuration>

I am not certain as to ChocolateyGUI's policies regarding FIPS mode compatibility. If anyone wants me to submit a PR with this change, please let me know. Hope this helps!

Thank you!! this works perfectly. I just edited the ChocolateyGUI.exe.config file and added that and it works now.

@drfrpjr
Copy link
Author

drfrpjr commented Aug 24, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues where something has happened which was not expected or intended
Projects
None yet
Development

No branches or pull requests

6 participants