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

[BUG] Cannot Access Settings #3085

Open
4 tasks done
realAllonZ opened this issue Dec 18, 2024 · 11 comments
Open
4 tasks done

[BUG] Cannot Access Settings #3085

realAllonZ opened this issue Dec 18, 2024 · 11 comments
Assignees
Labels
bug Something isn't working important ready-to-go
Milestone

Comments

@realAllonZ
Copy link

realAllonZ commented Dec 18, 2024

Please confirm these before moving forward

  • I have searched for my issue and have not found a work-in-progress/duplicate/resolved issue.
  • I have tested that this issue has not been fixed in the latest (beta or stable) release.
  • I have checked the FAQ section for solutions.
  • This issue is about a bug (if it is not, please use the correct template).

UniGetUI Version

3.1.4

Windows version, edition, and architecture

Windows 11 Pro 10.0.22631 x64

Describe your issue

  1. Enabled vkpkg
  2. Changed root
  3. Now locked out of settings

Steps to reproduce the issue

  1. Installed vkpg via npm

  2. Restart UniGetUI

  3. vkpkg not detected as installed via %VKPKG_ROOT%

  4. Change vkpkg root location to C:\Users<user>\node_modules\vkpkg

  5. Restart UniGetUI

  6. Error Message:

    ⊗ Something went wrong An internal error occurred. Please view the log for further details

  7. Click Settings to attempt other root

  8. Stays on current screen

UniGetUI Log

[12/18/2024 3:00:53 PM]    __  __      _ ______     __  __  ______
                          / / / /___  (_) ____/__  / /_/ / / /  _/
                         / / / / __ \/ / / __/ _ \/ __/ / / // /
                        / /_/ / / / / / /_/ /  __/ /_/ /_/ // /
                        \____/_/ /_/_/\____/\___/\__/\____/___/
                            Welcome to UniGetUI Version 3.1.4
[12/18/2024 3:00:53 PM]
[12/18/2024 3:00:53 PM] Build 73
[12/18/2024 3:00:53 PM] Encoding Code Page set to 437
[12/18/2024 3:00:53 PM] Using built-in UniGetUI Elevator
[12/18/2024 3:00:54 PM] Loaded language locale: en
[12/18/2024 3:00:54 PM] An error occurred while initializing the API
[12/18/2024 3:00:54 PM] Nancy.Hosting.Self.AutomaticUrlReservationCreationFailureException: The Nancy self host was unable to start, as no namespace reservation existed for the provided url(s).
                        
                        Please either enable UrlReservations.CreateAutomatically on the HostConfiguration provided to 
                        the NancyHost, or create the reservations manually with the (elevated) command(s):
                        
                        netsh http add urlacl url="http://+:7058/" user="Everyone"
                        
                           at Nancy.Hosting.Self.NancyHost.StartListener()
                           at Nancy.Hosting.Self.NancyHost.Start()
                           at UniGetUI.Interface.BackgroundApiRunner.Start() in C:\SomePrograms\WingetUI-Store\src\UniGetUI.Interface.BackgroundApi\BackgroundApi.cs:line 73
[12/18/2024 3:00:54 PM] Lang files were updated successfully from GitHub
[12/18/2024 3:00:54 PM] Old chocolatey path is a symbolic link, not migrating Chocolatey...
[12/18/2024 3:00:54 PM] Downloaded new icons and screenshots successfully!
[12/18/2024 3:00:55 PM] Command vcpkg was not found on the system
[12/18/2024 3:00:55 PM] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                        █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                        █ Name: vcpkg
                        █ Enabled: True
                        █ Found: False
                        █ THE MANAGER WAS NOT FOUND. PERHAPS IT IS NOT 
                        █ INSTALLED OR IT HAS BEEN MISCONFIGURED 
                        ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[12/18/2024 3:00:55 PM] Command cargo was not found on the system
[12/18/2024 3:00:55 PM] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                        █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                        █ Name: Cargo
                        █ Enabled: True
                        █ Found: False
                        █ THE MANAGER WAS NOT FOUND. PERHAPS IT IS NOT 
                        █ INSTALLED OR IT HAS BEEN MISCONFIGURED 
                        ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[12/18/2024 3:00:55 PM] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                        █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                        █ Name: Pip
                        █ Enabled: True
                        █ Found: False
                        █ THE MANAGER WAS NOT FOUND. PERHAPS IT IS NOT 
                        █ INSTALLED OR IT HAS BEEN MISCONFIGURED 
                        ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[12/18/2024 3:00:56 PM] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                        █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                        █ Name: Winget
                        █ Enabled: True
                        █ Found: True
                        █ Fancy exe name: winget.exe
                        █ Executable path: C:\Users\ADMIN\AppData\Local\Microsoft\WindowsApps\winget.exe
                        █ Call arguments: 
                        █ Version: 
                        █   System WinGet CLI Version: v1.9.25200
                        █   Using Native WinGet helper (COM Api)
                        ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[12/18/2024 3:00:56 PM] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                        █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                        █ Name: .NET Tool
                        █ Enabled: True
                        █ Found: True
                        █ Fancy exe name: dotnet tool
                        █ Executable path: C:\Program Files\dotnet\dotnet.exe
                        █ Call arguments: tool
                        █ Version: 
                        █   9.0.101
                        ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[12/18/2024 3:00:56 PM] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                        █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                        █ Name: Scoop
                        █ Enabled: True
                        █ Found: True
                        █ Fancy exe name: scoop
                        █ Executable path: C:\Windows\system32\windowspowershell\v1.0\powershell.exe
                        █ Call arguments:  -NoProfile -ExecutionPolicy Bypass -Command scoop
                        █ Version: 
                        █   
                        ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[12/18/2024 3:00:56 PM] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                        █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                        █ Name: Npm
                        █ Enabled: False
                        █ THE MANAGER IS DISABLED
                        ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[12/18/2024 3:00:58 PM] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                        █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                        █ Name: Chocolatey
                        █ Enabled: True
                        █ Found: True
                        █ Fancy exe name: choco.exe
                        █ Executable path: C:\Users\ADMIN\AppData\Local\UniGetUI\Chocolatey\choco.exe
                        █ Call arguments: 
                        █ Version: 
                        █   2.2.2
                        ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[12/18/2024 3:00:58 PM] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                        █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                        █ Name: PowerShell7
                        █ Enabled: True
                        █ Found: True
                        █ Fancy exe name: pwsh.exe
                        █ Executable path: C:\Program Files\PowerShell\7\pwsh.exe
                        █ Call arguments:  -NoProfile -Command
                        █ Version: 
                        █   PowerShell 7.4.6
                        ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[12/18/2024 3:00:58 PM] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                        █▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                        █ Name: PowerShell
                        █ Enabled: True
                        █ Found: True
                        █ Fancy exe name: powershell.exe
                        █ Executable path: C:\Windows\system32\windowspowershell\v1.0\powershell.exe
                        █ Call arguments:  -NoProfile -Command
                        █ Version: 
                        █   Name                           Value                                                                                   
                        █   ----                           -----                                                                                   
                        █   PSVersion                      5.1.22621.4391                                                                          
                        █   PSEdition                      Desktop                                                                                 
                        █   PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                 
                        █   BuildVersion                   10.0.22621.4391                                                                         
                        █   CLRVersion                     4.0.30319.42000                                                                         
                        █   WSManStackVersion              3.0                                                                                     
                        █   PSRemotingProtocolVersion      2.3                                                                                     
                        █   SerializationVersion           1.1.0.1
                        ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[12/18/2024 3:00:58 PM] LoadComponentsAsync finished executing. All managers loaded. Proceeding to interface.
[12/18/2024 3:01:00 PM] Dependency Scoop-Search for manager Scoop is present
[12/18/2024 3:01:00 PM] Found 0 installed packages from Scoop
[12/18/2024 3:01:00 PM] Found 0 installed packages from Scoop
[12/18/2024 3:01:00 PM] Dependency Git for manager Scoop is present
[12/18/2024 3:01:00 PM] Found 0 installed packages from PowerShell7
[12/18/2024 3:01:00 PM] Dependency .NET Tools Outdated for manager .NET Tool is present
[12/18/2024 3:01:00 PM] Found 0 available updates from .NET Tool
[12/18/2024 3:01:01 PM] Found 1 installed packages from .NET Tool
[12/18/2024 3:01:01 PM] Found 0 available updates from Scoop
[12/18/2024 3:01:01 PM] Found 0 available updates from PowerShell7
[12/18/2024 3:01:01 PM] Found 5 installed packages from Chocolatey
[12/18/2024 3:01:02 PM] Found 0 available updates from Chocolatey
[12/18/2024 3:01:03 PM] Found 1 installed packages from PowerShell
[12/18/2024 3:01:03 PM] Found 0 available updates from Winget
[12/18/2024 3:01:03 PM] Found 157 installed packages from Winget
[12/18/2024 3:01:03 PM]  -
[12/18/2024 3:01:03 PM]  -
[12/18/2024 3:01:03 PM]   ⚠️⚠️⚠️ START OF UNHANDLED ERROR TRACE ⚠️⚠️⚠️
[12/18/2024 3:01:03 PM] Could not find a part of the path 'C:\Users\<username>\node_modules\vkpkg\triplets'.
[12/18/2024 3:01:03 PM] System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\<username>\node_modules\vkpkg\triplets'.
                           at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
                           at System.IO.Enumeration.FileSystemEnumerator`1.Init()
                           at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized)
                           at System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles(String directory, String expression, EnumerationOptions options)
                           at System.IO.Directory.InternalEnumeratePaths(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
                           at UniGetUI.PackageEngine.Managers.VcpkgManager.Vcpkg.GetSystemTriplets() in C:\SomePrograms\WingetUI-Store\src\UniGetUI.PackageEngine.Managers.Vcpkg\Vcpkg.cs:line 442
                           at UniGetUI.Interface.SettingsPage..ctor() in C:\SomePrograms\WingetUI-Store\src\UniGetUI\Pages\SettingsPage.xaml.cs:line 210
                           at UniGetUI.Interface.MainView.GetPageForType(PageType type) in C:\SomePrograms\WingetUI-Store\src\UniGetUI\Pages\MainView.xaml.cs:line 153
                           at UniGetUI.Interface.MainView.NavigateTo(PageType NewPage_t) in C:\SomePrograms\WingetUI-Store\src\UniGetUI\Pages\MainView.xaml.cs:line 228
                           at UniGetUI.Interface.MainView.SettingsNavButton_Click(Object sender, EventArgs e) in C:\SomePrograms\WingetUI-Store\src\UniGetUI\Pages\MainView.xaml.cs:line 201
                           at UniGetUI.Interface.Widgets.NavButton.ToggleButton_Click(Object sender, RoutedEventArgs e) in C:\SomePrograms\WingetUI-Store\src\UniGetUI\Controls\NavButton.xaml.cs:line 45
                           at WinRT._EventSource_global__Microsoft_UI_Xaml_RoutedEventHandler.EventState.<GetEventInvoke>b__1_0(Object sender, RoutedEventArgs e)
                           at ABI.Microsoft.UI.Xaml.RoutedEventHandler.Do_Abi_Invoke(IntPtr thisPtr, IntPtr sender, IntPtr e)
[12/18/2024 3:01:03 PM]   ⚠️⚠️⚠️  END OF UNHANDLED ERROR TRACE  ⚠️⚠️⚠️

Package Managers Logs

Manager WinGet with version:
System WinGet CLI Version: v1.9.25200
Using Native WinGet helper (COM Api)
——————————————————————————————————————————
Logged native task on manager Winget. Task type is ListSources
Process start time: 12/18/2024 3:00:56 PM
Process end time:   12/18/2024 3:00:56 PM
-- Task information
 ...
The task reported success
——————————————————————————————————————————
Logged native task on manager Winget. Task type is ListInstalledPackages
Process start time: 12/18/2024 3:00:58 PM
Process end time:   12/18/2024 3:01:03 PM
-- Task information
 ...
The task reported success
——————————————————————————————————————————
Logged subprocess-based task on manager Winget. Task type is RefreshIndexes
Subprocess executable: "C:\Users\ADMIN\AppData\Local\Microsoft\WindowsApps\winget.exe"
Command-line arguments: " source update --disable-interactivity"
Process start time: 12/18/2024 3:00:58 PM
Process end time:   12/18/2024 3:01:00 PM
-- Process STDOUT
 ...
Return code: SUCCESS (0)
——————————————————————————————————————————
Logged native task on manager Winget. Task type is OtherTask
Process start time: 12/18/2024 3:00:58 PM
Process end time:   12/18/2024 3:01:02 PM
-- Task information
 ...
The task reported success
——————————————————————————————————————————
Logged native task on manager Winget. Task type is ListUpdates
Process start time: 12/18/2024 3:01:00 PM
Process end time:   12/18/2024 3:01:03 PM
The task reported success
——————————————————————————————————————————
Logged native task on manager Winget. Task type is ListInstalledPackages
Process start time: 12/18/2024 3:01:36 PM
Process end time:   12/18/2024 3:01:39 PM
-- Task information
 ...
The task reported success
——————————————————————————————————————————
Logged native task on manager Winget. Task type is OtherTask
Process start time: 12/18/2024 3:01:36 PM
Process end time:   12/18/2024 3:01:37 PM
-- Task information
 ...
The task reported success
——————————————————————————————————————————

Relevant information

No response

Screenshots and videos

No response

@realAllonZ realAllonZ added the bug Something isn't working label Dec 18, 2024
@marticliment
Copy link
Owner

marticliment commented Dec 18, 2024

Does this folder exist? C:\Users\<username>\node_modules\vkpkg\triplets
Perhaps you meant C:\Users\<username>\node_modules\vcpkg\triplets (note vcpkg instead of vkpkg)

Do you have Ms Defender protected folder access enabled?

Either way, the settings UI shouldn't crash

@realAllonZ
Copy link
Author

  1. The folder path is C:\Users<username>\node_modules\vkpkg and there is no triplets subfolder
  2. Windows Security > Virus & threat protection > Manage ransomware protection > Controlled folder access is disabled and has been

This issue is confirmed on both administrator and standard user profiles

@marticliment
Copy link
Owner

what happens if you create the triplets subfolder?

@realAllonZ
Copy link
Author

Already thought of that and there was no change. Settings are still inaccessible.

@marticliment
Copy link
Owner

For the time being, please try to unset the environment variable so UniGetUI Settings can load. (make sure to fully restart UniGetUI so settings UI can load again)

I will fix this issue

@realAllonZ
Copy link
Author

I have unset the environmental variables for UniGetUI every way I know how (PowerShell, Registry Editor, Command Prompt, Control Panel) and still the same issue.

In Control Panel > System Properties > Environmental Variables I can see environmental variables set for the following:

  • chocolatey
  • scoop
  • dotnet
  • nodejs

No environmental variables listed for unigetui and still unable to view UniGetUI settings.

@mrixner
Copy link
Contributor

mrixner commented Dec 18, 2024

This might be my bad, it seems like the crash is originating from the triplet detector not checking if the triplets folder exists before enumerating over it?

Also @realAllonZ, I suspect the reason it's not locating vcpkg based on %VKPKG_ROOT% is because it's looking for %VCPKG_ROOT%, with a C.

And if you installed the vkpkg npm module and are then trying to use it as the vcpkg package manager it's not going to work because they're two different things. You can't install vcpkg from npm; see vcpkg.io to install the vcpkg (C/C++) package manager.

@mrixner
Copy link
Contributor

mrixner commented Dec 18, 2024

I can confirm, this issue occurs when setting the vcpkg root to a directory not containing a triplets directory. This is why vcpkg source collection fails as well; that's both places Vcpkg.GetSystemTriplets is used, which is the problem method. I will go fix this.

@realAllonZ, a temporary fix is completely exiting UniGetUI (right click the taskbar icon and select "Quit") and deleting the %LOCALAPPDATA%\UniGetUI\CustomVcpkgRoot file. Upon startup, the settings will work again.

@mrixner
Copy link
Contributor

mrixner commented Dec 19, 2024

what happens if you create the triplets subfolder?

Already thought of that and there was no change. Settings are still inaccessible.

The reason that just creating the triplets folder failed was because it was also looking for triplets\community.

@realAllonZ
Copy link
Author

I deleted %LOCALAPPDATA%\UniGetUI\CustomVcpkgRoot and I am now able to access the settings.
I installed vcpkg via Scoop and it is now properly enabled within settings. (typo apparently)
Thanks for the insight @mrixner!

@marticliment
Copy link
Owner

Anyways, I will introduce changes so an exception does not block accessing the Settings UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working important ready-to-go
Projects
None yet
Development

No branches or pull requests

3 participants