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

Chocolatey GUI fails to start in certain circumstances when running as a non-administrator user #829

Closed
gep13 opened this issue Mar 18, 2021 · 2 comments
Assignees
Labels
Bug Issues where something has happened which was not expected or intended
Milestone

Comments

@gep13
Copy link
Member

gep13 commented Mar 18, 2021

Once installed and run once by an administrator user, the global configuration database (data.db) is created and placed into the c:\programdata\Chocolatey GUI\Config folder. However, if Chocolatey GUI is installed, and then immediately run as a non-administrator user, then this global configuration database is never created, and as a result, causes Chocolatey GUI to crash.

The application should be able to handle the situation that this file hasn't been created, and in the absence of the file, the default configuration settings should be applied, unless overridden by the local user configuration, if they are allowed to change it.

@gep13 gep13 added the Bug Issues where something has happened which was not expected or intended label Mar 18, 2021
@gep13 gep13 added this to the 0.18.1 milestone Mar 18, 2021
@gep13 gep13 self-assigned this Mar 18, 2021
@gep13
Copy link
Member Author

gep13 commented Mar 19, 2021

In order for this to work when running alongside the Chocolatey GUI Licensed Extension, there is a related change required there:

chocolatey/chocolatey-licensed-issues#210

gep13 added a commit that referenced this issue Mar 19, 2021
There is a situation when the global configuration database doesn't
exist, for example, when Chocolatey GUI is installed by administrator
but never executed by that user. When running as a non-administrrator
user, the application would then crash.  This changes makes it possible
for the application to simply ignore the fact that the global database
doesn't exist, and instead, simply use the default settings, with no
attempt to then write any values back to the database.

In order to work correctly, there is an update required in the Chocolatey
GUI Licensed extension to make things work there as well.
@gep13 gep13 closed this as completed Mar 24, 2021
@gep13 gep13 changed the title Chocolatey GUI fails to start as a non-administrator user Chocolatey GUI fails to start in certain circumstances when running as a non-administrator user Mar 29, 2021
gep13 added a commit that referenced this issue Mar 29, 2021
* hotfix/0.18.1:
  (#831) Add missing backtick in nuspec
  (#832) Ensure to correctly dispose of database
  (#829) Ensure application starts without global db
  (#830) Send correct settings to event
gep13 added a commit that referenced this issue Mar 29, 2021
There is a situation when the global configuration database doesn't
exist, for example, when Chocolatey GUI is installed by administrator
but never executed by that user. When running as a non-administrrator
user, the application would then crash.  This changes makes it possible
for the application to simply ignore the fact that the global database
doesn't exist, and instead, simply use the default settings, with no
attempt to then write any values back to the database.

In order to work correctly, there is an update required in the Chocolatey
GUI Licensed extension to make things work there as well.
gep13 added a commit that referenced this issue Mar 29, 2021
* hotfix/0.18.1:
  (#831) Add missing backtick in nuspec
  (#832) Ensure to correctly dispose of database
  (#829) Ensure application starts without global db
  (#830) Send correct settings to event
@choco-bot
Copy link

🎉 This issue has been resolved in version 0.18.1 🎉

The release is available on:

Your GitReleaseManager bot 📦🚀

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

2 participants