Devolutions / Devolutions/UniGetUI

[BUG] Can't add PSGallery as a source PowerShell 5.1 package manager settings

Open
#4,387 16 comments 0 reactions 1 assignee Claimed by @marticliment View on GitHub
bug needs-author-answer
Dominant language
C#
Stars
26.1k
Forks
924
Avg merge
15h 52m
Merged PRs (30d)
52

Description

### Please confirm these before moving forward

- [x] I have searched for my issue and have not found a work-in-progress/duplicate/resolved issue.
- [x] I have tested that this issue has not been fixed in the latest [(beta or stable) release](https://github.com/marticliment/WingetUI/releases/).
- [x] I have checked the [FAQ](https://github.com/marticliment/WingetUI#frequently-asked-questions) section for solutions.
- [x] This issue is about a bug (if it is not, please use the [correct template](https://github.com/marticliment/WingetUI/issues/new/choose)).

### UniGetUI Version

3.3.7

### Windows version, edition, and architecture

Windows 10 Pro (23H2) 19045.6809 x64

### Describe your issue
```
Starting adding source operation for source=PSGallerywith Manager=PowerShell
Starting operation...
Executing process with StartInfo:
- FileName: "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe"
- Arguments: "-NoProfile -Command Register-PSRepository -Default"
Start Time: "04/02/2026 01:52:34"
Register-PSRepository : Adding to repository store failed: The PSResource Repository 'PSGallery' already exists.
At line:1 char:1
+ Register-PSRepository -Default
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (Microsoft.Power...ourceRepository:RegisterPSResourceRepository) [Regis
ter-PSResourceRepository], PSInvalidOperationException
+ FullyQualifiedErrorId : ErrorInPSGalleryParameterSet,Microsoft.PowerShell.PSResourceGet.Cmdlets.RegisterPSResour
ceRepository
End Time: "04/02/2026 01:52:37"
Process return value: "1" (0x1)
Could not add source PSGallery to PowerShell
```

### Steps to reproduce the issue

Click on "Add source" and thne "Add"

### UniGetUI Log

```text
[02/02/2026 23:42:40] Vcpkg root was not found. Please define the %VCPKG_ROOT% environment variable or define it from UniGetUI Settings
[02/02/2026 23:42:40] vcpkg is enabled but was not found on the system!
[02/02/2026 23:45:23] System.Net.Http.HttpRequestException: The requested name is valid, but no data of the requested type was found. (i67.tinypic.com:80)
---> System.Net.Sockets.SocketException (11004): The requested name is valid, but no data of the requested type was found.
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError, CancellationToken)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16)
at System.Net.Sockets.Socket.g__WaitForConnectWithCancellation|285_0(AwaitableSocketAsyncEventArgs, ValueTask, CancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String, Int32, HttpRequestMessage, Boolean, CancellationToken)
--- End of inner exception stack trace ---
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String, Int32, HttpRequestMessage, Boolean, CancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage, Boolean, CancellationToken)
at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage, Boolean, CancellationToken)
at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem)
at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage, Boolean, Boolean, CancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage, Boolean, CancellationToken)
at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage, Boolean, CancellationToken)
at System.Net.Http.HttpClient.g__Core|83_0(HttpRequestMessage, HttpCompletionOption, CancellationTokenSource, Boolean, CancellationTokenSource, CancellationToken)
at UniGetUI.Core.IconEngine.IconCacheEngine.SaveIconToCacheAndGetPath(CacheableIcon icon, String iconLocation) in C:\SomePrograms\WingetUI-Store\src\UniGetUI.Core.IconStore\IconCacheEngine.cs:line 190
[02/02/2026 23:48:43] System.Net.Http.HttpRequestException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. (powershellpipeworks.com:80)
---> System.Net.Sockets.SocketException (10060): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError, CancellationToken)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16)
at System.Net.Sockets.Socket.g__WaitForConnectWithCancellation|285_0(AwaitableSocketAsyncEventArgs, ValueTask, CancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String, Int32, HttpRequestMessage, Boolean, CancellationToken)
--- End of inner exception stack trace ---
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String, Int32, HttpRequestMessage, Boolean, CancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage, Boolean, CancellationToken)
at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage, Boolean, CancellationToken)
at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem)
at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage, Boolean, Boolean, CancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage, Boolean, CancellationToken)
at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage, Boolean, CancellationToken)
at System.Net.Http.HttpClient.g__Core|83_0(HttpRequestMessage, HttpCompletionOption, CancellationTokenSource, Boolean, CancellationTokenSource, CancellationToken)
at UniGetUI.Core.IconEngine.IconCacheEngine.SaveIconToCacheAndGetPath(CacheableIcon icon, String iconLocation) in C:\SomePrograms\WingetUI-Store\src\UniGetUI.Core.IconStore\IconCacheEngine.cs:line 190
[04/02/2026 21:18:53] An error occurred while checking for updates:
[04/02/2026 21:18:54] System.Net.Http.HttpRequestException: An error occurred while sending the request.
---> System.IO.IOException: Unable to write data to the transport connection: An established connection was aborted by the software in your host machine..
---> System.Net.Sockets.SocketException (10053): An established connection was aborted by the software in your host machine.
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.CreateException(SocketError, Boolean )
at System.Net.Sockets.NetworkStream.WriteAsync(ReadOnlyMemory`1, CancellationToken )
at System.Net.Security.SslStream.WriteSingleChunk[TIOAdapter](ReadOnlyMemory`1, CancellationToken)
at System.Net.Security.SslStream.WriteAsyncInternal[TIOAdapter](ReadOnlyMemory`1, CancellationToken)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine&)
at System.Net.Http.HttpConnection.WriteToStreamAsync(ReadOnlyMemory`1, Boolean)
at System.Net.Http.HttpConnection.SendAsync(HttpRequestMessage, Boolean, CancellationToken)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine&)
at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage, Boolean, Boolean, CancellationToken)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext, ContextCallback, Object)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread)
at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox, Boolean)
at System.Threading.Tasks.Task.RunContinuations(Object)
at System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder`1.SetResult(TResult)
at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken)
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread, ExecutionContext, ContextCallback, Object)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
--- End of stack trace from previous location ---

--- End of inner exception stack trace ---
at System.Net.Security.SslStream.g__CompleteWriteAsync|157_1[TIOAdapter](ValueTask, Byte[])
at System.Net.Security.SslStream.WriteAsyncInternal[TIOAdapter](ReadOnlyMemory`1, CancellationToken)
at System.Net.Http.HttpConnection.SendAsync(HttpRequestMessage, Boolean, CancellationToken)
--- End of inner exception stack trace ---
at System.Net.Http.HttpConnection.SendAsync(HttpRequestMessage, Boolean, CancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage, Boolean, Boolean, CancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage, Boolean, CancellationToken)
at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage, Boolean, CancellationToken)
at System.Net.Http.HttpClient.GetStringAsyncCore(HttpRequestMessage, CancellationToken)
at UniGetUI.AutoUpdater.CheckForUpdates(String endpoint) in C:\SomePrograms\WingetUI-Store\src\UniGetUI\AutoUpdater.cs:line 159
at UniGetUI.AutoUpdater.CheckAndInstallUpdates(Window window, InfoBar banner, Boolean Verbose, Boolean AutoLaunch, Boolean ManualCheck) in C:\SomePrograms\WingetUI-Store\src\UniGetUI\AutoUpdater.cs:line 79
```

### Package Managers Logs

```text
Manager WinGet with version:
System WinGet (CLI) Version: v1.12.460
Using Native WinGet helper (COM Api)

——————————————————————————————————————————

Logged native task on manager Winget. Task type is ListSources
Process start time: 02/02/2026 23:42:54
Process end time: 02/02/2026 23:42:54

-- Task information
...

The task reported success

——————————————————————————————————————————

Logged native task on manager Winget. Task type is ListInstalledPackages
Process start time: 02/02/2026 23:43:09
Process end time: 02/02/2026 23:43:40

-- Task information
...

The task reported success

——————————————————————————————————————————

Logged subprocess-based task on manager Winget. Task type is RefreshIndexes
Subprocess executable: "C:\Users\timmo\AppData\Local\Microsoft\WindowsApps\winget.exe"
Command-line arguments: " source update --disable-interactivity "
Process start time: 02/02/2026 23:43:09
Process end time: 02/02/2026 23:43:15

-- Process STDOUT
...

Return code: SUCCESS (0)

——————————————————————————————————————————

Logged native task on manager Winget. Task type is OtherTask
Process start time: 02/02/2026 23:43:09
Process end time: 02/02/2026 23:43:27

-- Task information
...

The task reported success

——————————————————————————————————————————

Logged native task on manager Winget. Task type is ListUpdates
Process start time: 02/02/2026 23:43:15
Process end time: 02/02/2026 23:43:42

-- Task information
...

The task reported success

——————————————————————————————————————————

Logged subprocess-based task on manager Winget. Task type is RefreshIndexes
Subprocess executable: "C:\Users\timmo\AppData\Local\Microsoft\WindowsApps\winget.exe"
Command-line arguments: " source update --disable-interactivity "
Process start time: 03/02/2026 23:43:48
Process end time: 03/02/2026 23:43:57

-- Process STDOUT
...

Return code: SUCCESS (0)

——————————————————————————————————————————

Logged native task on manager Winget. Task type is ListUpdates
Process start time: 03/02/2026 23:43:59
Process end time: 03/02/2026 23:44:19

-- Task information
...

The task reported success

——————————————————————————————————————————

Logged native task on manager Winget. Task type is OtherTask
Process start time: 03/02/2026 23:43:59
Process end time: 03/02/2026 23:44:07

-- Task information
...

The task reported success

——————————————————————————————————————————

Logged native task on manager Winget. Task type is ListInstalledPackages
Process start time: 03/02/2026 23:56:52
Process end time: 03/02/2026 23:57:08

-- Task information
...

The task reported success

——————————————————————————————————————————

Logged native task on manager Winget. Task type is OtherTask
Process start time: 03/02/2026 23:56:55
Process end time: 03/02/2026 23:57:02

-- Task information
...

The task reported success

——————————————————————————————————————————

Logged native task on manager Winget. Task type is ListInstalledPackages
Process start time: 04/02/2026 01:45:39
Process end time: 04/02/2026 01:46:21

-- Task information
...

The task reported success

——————————————————————————————————————————

Logged native task on manager Winget. Task type is OtherTask
Process start time: 04/02/2026 01:45:45
Process end time: 04/02/2026 01:46:10

-- Task information
...

The task reported success

——————————————————————————————————————————

Logged subprocess-based task on manager Winget. Task type is RefreshIndexes
Subprocess executable: "C:\Users\timmo\AppData\Local\Microsoft\WindowsApps\winget.exe"
Command-line arguments: " source update --disable-interactivity "
Process start time: 04/02/2026 01:45:49
Process end time: 04/02/2026 01:45:59

-- Process STDOUT
...

Return code: SUCCESS (0)

——————————————————————————————————————————

Logged native task on manager Winget. Task type is ListUpdates
Process start time: 04/02/2026 01:46:06
Process end time: 04/02/2026 01:46:26

-- Task information
...

The task reported success

——————————————————————————————————————————

Logged native task on manager Winget. Task type is LoadPackageVersions
Process start time: 04/02/2026 01:46:53
Process end time: 04/02/2026 01:46:53

-- Task information
...

The task reported success

——————————————————————————————————————————

Logged native task on manager Winget. Task type is LoadPackageDetails
Process start time: 04/02/2026 01:46:53
Process end time: 04/02/2026 01:46:57

-- Task information
...

The task reported success

——————————————————————————————————————————

Logged native task on manager Winget. Task type is ListSources
Process start time: 04/02/2026 01:51:04
Process end time: 04/02/2026 01:51:04

-- Task information
...

The task reported success

——————————————————————————————————————————

Logged native task on manager Winget. Task type is ListInstalledPackages
Process start time: 04/02/2026 02:27:46
Process end time: 04/02/2026 02:28:11

-- Task information
...

The task reported success

——————————————————————————————————————————

Logged native task on manager Winget. Task type is OtherTask
Process start time: 04/02/2026 02:27:49
Process end time: 04/02/2026 02:27:58

-- Task information
...

The task reported success

——————————————————————————————————————————

Logged subprocess-based task on manager Winget. Task type is RefreshIndexes
Subprocess executable: "C:\Users\timmo\AppData\Local\Microsoft\WindowsApps\winget.exe"
Command-line arguments: " source update --disable-interactivity "
Process start time: 04/02/2026 02:27:54
Process end time: 04/02/2026 02:27:55

-- Process STDOUT
...

Return code: SUCCESS (0)

——————————————————————————————————————————

Logged native task on manager Winget. Task type is ListUpdates
Process start time: 04/02/2026 02:27:57
Process end time: 04/02/2026 02:28:12

-- Task information
...

The task reported success

——————————————————————————————————————————

Logged native task on manager Winget. Task type is ListInstalledPackages
Process start time: 04/02/2026 23:06:39
Process end time: 04/02/2026 23:07:09

-- Task information
...

The task reported success

——————————————————————————————————————————

Logged native task on manager Winget. Task type is OtherTask
Process start time: 04/02/2026 23:06:43
Process end time: 04/02/2026 23:07:03

-- Task information
...

The task reported success

——————————————————————————————————————————
```

### Relevant information

[UniGetUI Log.txt](https://github.com/user-attachments/files/25083601/UniGetUI.Log.txt)

### Screenshots and videos

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.