Devolutions / Devolutions/UniGetUI
[BUG] Scoop updates can fail when parallel operations enabled
- 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.5
### Windows version, edition, and architecture
Windows 11 Insider Enterprise 26120.5790 x64
### Describe your issue
When updating multiple scoop packages in parallel, if `scoop update` hasn't been run in the past 3 hours, all updates will fail with:
```
Updating Scoop...
fatal: Cannot fast-forward to multiple branches.
Update failed.
```
This can also happen if you're in the same state (update hasn't run in 3 hours) and try to refresh immediately after starting a package install.
#### Reason
`scoop update ` will always attempt to run the equivalent of `scoop update` if its last update date was more than 3 hours ago.
### Steps to reproduce the issue
1. Under **Settings** > **Package update preferences** > **Update checking**, either _disable_ **Check for package updates periodically** OR _set_ **Check for updates every:** to `4 hours` or more. (easier to repro using the former)
2. Under **Settings** > **Package operation preferences** > **Concurrency and execution** > **Choose how many operations should be performed in parallel** to more than `1`.
3. In the **Software Updates** panel, periodically _refresh_ or _wait for it to automatically refresh_, until more than one Scoop package update is available for update, and _wait for 3 hours_.
4. After 3 hours, _ensure those packages are selected_ and _press_ **Update selection**.
5. In the package queue at the bottom, you will see that your updates failed with an error like:
```plaintext
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Package update operation for Package=vscode-insiders with Manager=Scoop
Installation options:
Overriden options:
Version: 1.105.0-1757595153414 -> 1.105.0-be15710
Starting operation...
Executing process with StartInfo:
- FileName: "C:\Users\EricLoveland\scoop\shims\pwsh.exe"
- Arguments: "-NoProfile -ExecutionPolicy Bypass -Command "C:\Users\EricLoveland\scoop\shims\scoop.ps1" update versions/vscode-insiders"
Start Time: "10/3/2025 8:38:30 AM"
Updating Scoop...
fatal: Cannot fast-forward to multiple branches.
Update failed.
End Time: "10/3/2025 8:38:36 AM"
Process return value: "1" (0x1)
Vscode Insiders could not be updated
-----------------------
```
### UniGetUI Log
[UniGetUI Log.txt](https://github.com/user-attachments/files/22683975/UniGetUI.Log.txt)
### Package Managers Logs
[UniGetUI Scoop Log.txt](https://github.com/user-attachments/files/22683976/UniGetUI.Scoop.Log.txt)
### Relevant information
#### Log Context
- I have my refresh interval set to 2 hours but I tried to install updates right after my machine woke from sleep.
- You can see in the logs that I manually refreshed after this happened.
#### Fix thoughts
I started working on a PR for this and it highlighted one of the features of Scoop that causes this sort of complication:
- while it can _technically_ be used to install an older version of an app using weird tricks (that also make it so that software is very hard to ever update again), it's _really_ designed to always install the latest version.
This got me thinking:
1. Should UniGetUI adopt the same behavior? i.e. should UniGetUI have a feature where it does its own check of `scoop config last_update` and if it's almost/over 3 hours, runs `scoop update` before any updates are run?
1. If so, should there be an option to opt out of this being "automatic" and block Scoop-based updates unless the user refreshes, in case they want to be 100% sure that the version in the UI matches the version that will be installed?
2. There is a workaround for this that feels pretty hacky: run `scoop config last_update ` and possibly reset it once all updates are done.
I'm definitely leaning toward _1_, with maybe _1.i_ depending on your feedback. Happy to open a PR!
#### Screenshots and videos
```
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Package update operation for Package=firefox-developer with Manager=Scoop
Installation options:
Overriden options:
Version: 144.0b8 -> 144.0b9
Starting operation...
Executing process with StartInfo:
- FileName: "C:\Users\EricLoveland\scoop\shims\pwsh.exe"
- Arguments: "-NoProfile -ExecutionPolicy Bypass -Command "C:\Users\EricLoveland\scoop\shims\scoop.ps1" update versions/firefox-developer"
Start Time: "10/4/2025 1:13:30 AM"
Updating Scoop...
fatal: Cannot fast-forward to multiple branches.
Update failed.
End Time: "10/4/2025 1:13:37 AM"
Process return value: "1" (0x1)
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Package update operation for Package=mise with Manager=Scoop
Installation options:
Overriden options:
Version: 2025.10.0 -> 2025.10.1
Starting operation...
Executing process with StartInfo:
- FileName: "C:\Users\EricLoveland\scoop\shims\pwsh.exe"
- Arguments: "-NoProfile -ExecutionPolicy Bypass -Command "C:\Users\EricLoveland\scoop\shims\scoop.ps1" update main/mise"
Start Time: "10/4/2025 1:13:30 AM"
Updating Scoop...
fatal: Cannot fast-forward to multiple branches.
Update failed.
End Time: "10/4/2025 1:13:37 AM"
Process return value: "1" (0x1)
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Package update operation for Package=jetbrains-toolbox with Manager=Scoop
Installation options:
Overriden options:
Version: 2.9.0.56191 -> 2.9.1.58121
Running PreOperation (1/1)...
Starting operation...
Attempting to close all processes with name jetbrains-toolbox.exe...
Done!
PreOperation 1 out of 1 finished with result Succeeded
--------------------------------
Starting operation...
Executing process with StartInfo:
- FileName: "C:\Users\EricLoveland\scoop\shims\pwsh.exe"
- Arguments: "-NoProfile -ExecutionPolicy Bypass -Command "C:\Users\EricLoveland\scoop\shims\scoop.ps1" update extras/jetbrains-toolbox"
Start Time: "10/4/2025 1:13:31 AM"
Updating Scoop...
fatal: Cannot fast-forward to multiple branches.
Update failed.
End Time: "10/4/2025 1:13:37 AM"
Process return value: "1" (0x1)
```
Contributor guide
Assessment
This issue has not been assessed yet.