It was fixed by resetting the app installer. You
Find the app called “App installer”, click on it and select Advanced), then press reset.
This app installer seems to be running in an appcontainer so that would probably explain why it would work for other users on the same machine.
Some user don't have "App Installer". In that case, to resolve that,
- Download the installer package from here https://aka.ms/getwinget
- Since there was no installer to install the installer, Run the PowerShell command to install the installer, like this:
Add-AppxPackage -Path "PathToTheInstaller.msixbundle"