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

Source credential changes outside of Chocolatey GUI cause issues #494

Open
ferventcoder opened this issue Oct 17, 2017 · 7 comments · May be fixed by #955
Open

Source credential changes outside of Chocolatey GUI cause issues #494

ferventcoder opened this issue Oct 17, 2017 · 7 comments · May be fixed by #955
Labels
Bug Issues where something has happened which was not expected or intended Customer Bug reported or feature requested by a licensed customer of Chocolatey

Comments

@ferventcoder
Copy link
Member

If a source is changed to require credentials and the source configuration is not changed prior to opening Chocolatey GUI, it errors on opening as it is attempting to check for updated packages and the source keeps asking for credentials.

@ferventcoder ferventcoder added the Bug Issues where something has happened which was not expected or intended label Oct 17, 2017
@ferventcoder ferventcoder added this to the 0.16.0 milestone Oct 17, 2017
@ferventcoder
Copy link
Member Author

I would hope that Chocolatey GUI recognizes the issue and stops attempting to use that source (and then places a little red background on it in the sources tab). Maybe an alerts section as well to let folks know something is wrong.

@RichiCoder1
Copy link
Contributor

Gui is currently very unreactive to outside changes once started. One of my next things I want to tackle.

@ferventcoder
Copy link
Member Author

ferventcoder commented Oct 18, 2017

Sorry for the confusion. If you change the source to require credentials, and then you open Chocolatey GUI hoping to go update the source with the credentials, you are SOL and must do it from the command line.

@RichiCoder1
Copy link
Contributor

Ah. I'll look into that now

@ferventcoder
Copy link
Member Author

I believe this is likely still an issue unless it opens a dialog when requested.

@ferventcoder ferventcoder modified the milestones: 0.16.0, 0.17.0 Feb 2, 2018
@gep13 gep13 modified the milestones: 0.17.0, 0.18.0 May 30, 2019
@gep13 gep13 modified the milestones: 0.18.0, Future Mar 5, 2021
@ryanrichter94 ryanrichter94 added Customer Bug reported or feature requested by a licensed customer of Chocolatey 0 - _Triaging Issue is accepted, but a milestone has yet to be added for the issue and removed 0 - _Triaging Issue is accepted, but a milestone has yet to be added for the issue labels Jun 24, 2022
@ryanrichter94
Copy link
Member

Can confirm that this is still an issue when using Chocolatey V 1.1.0 and Chocolatey GUI V 1.0.0

When attempting to load Chocolatey GUI while having an authenticated source with no saved authentication in the source config of Chocolatey. Chocolatey GUI will open to the splash screen and then stop with a [Fatal] Unhandled Exception error in the Chocolatey GUI log.

Full relevant info from Chocolatey GUI log output:

2022-06-24 08:08:18.986 -07:00 [Information] Please provide credentials for: https://Testy:8443/repository/ChocolateyInternal/
2022-06-24 08:08:19.007 -07:00 [Fatal] Unhandled Exception

@ryanrichter94
Copy link
Member

Additional error info from Window event viewer

image

Error text itself:

Application: chocolateygui.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.InvalidOperationException
   at System.Console.ReadKey(Boolean)
   at chocolatey.infrastructure.commandline.ReadKeyTimeout.console_read_key()
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Threading.ThreadHelper.ThreadStart()

@pauby pauby modified the milestones: Future, 1.1.0 Aug 2, 2022
@corbob corbob linked a pull request Aug 31, 2022 that will close this issue
9 tasks
corbob added a commit to corbob/ChocolateyGUI that referenced this issue Sep 2, 2022
Sometimes (it looks like maybe when the Chocolatey Licensed Extension is
in play) we don't get the sources currently in the configuration file.
If instead of reusing the configuration settings service we instantiate
a new one each time, then it will ensure the configuration file is read
again. This resolves the issue of settings not applying in GUI if
they're made while GUI is running.
corbob added a commit to corbob/ChocolateyGUI that referenced this issue Sep 2, 2022
When Chocolatey CLI makes changes to the configuration file while
Chocolatey GUI is running, Chocolatey GUI should refresh the sources so
that they're accurate. This adds a FileSystemWatcher to monitor the
configuration file and update the GUI if there's updates to the file.
corbob added a commit to corbob/ChocolateyGUI that referenced this issue Sep 2, 2022
With the FileSystemWatcher, we don't need to manually tell Chocolatey
GUI to update the sources, as they'll be updated by the
FileSystemWatcher. Leaving them in results in duplicated entries that we
don't want.
corbob added a commit to corbob/ChocolateyGUI that referenced this issue Sep 6, 2022
Renamed configuration file variable to indicate it's the path to the
configuration file. Made ConfigFileChanged public and added it to the
interface. Also renamed it to OnConfigFileChanged as that seems to be a
better name to indicate it's the action for when the file changes.
corbob added a commit to corbob/ChocolateyGUI that referenced this issue Sep 6, 2022
@gep13 gep13 modified the milestones: 1.1.0, 1.2.0 Sep 7, 2022
@gep13 gep13 removed this from the 1.2.0 milestone Jan 25, 2023
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 Customer Bug reported or feature requested by a licensed customer of Chocolatey
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants