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

[Package Issue]: Bitwarden.Bitwarden version 2024.1.0 unable to upgrade with scope machine resulting in duplicated installations with different scopes #135380

Closed
2 tasks done
MaanuelMM opened this issue Jan 18, 2024 · 2 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.
Milestone

Comments

@MaanuelMM
Copy link
Contributor

Please confirm these before moving forward

  • I have searched for my issue and not found a work-in-progress/duplicate/resolved issue.
  • I have not been informed if the issue is resolved in a preview version of the winget client.

Category of the issue

Side-By-Side installation.

Brief description of your issue

When upgrading my current system-wide installation of the Bitwarden client, it results in a completely new installation but only for the current user, resulting in two different installations: the original one with scope machine and out-of-date, and the newer one with scope user and up-to-date.

Steps to reproduce

First of all, you need to install an older version of Bitwarden for all users (if so, you can ignore this command and go to the next one):

winget.exe install Bitwarden.Bitwarden --version '2023.12.1' --scope machine

Then, upgrade the current installation with this command:

winget.exe upgrade Bitwarden.Bitwarden

Then, run the following command to create a new function to check the duplicated installs (extracted from SandboxTest.ps1 under the Tools directory of this repository):

function Get-ARPTable {
  $registry_paths = @('HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*','HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*', 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*', 'HKCU:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*')
  return Get-ItemProperty $registry_paths -ErrorAction SilentlyContinue |
      Where-Object { $_.DisplayName -and (-not $_.SystemComponent -or $_.SystemComponent -ne 1 ) } |
      Select-Object DisplayName, DisplayVersion, Publisher, @{N='ProductCode'; E={$_.PSChildName}}, @{N='Scope'; E={if($_.PSDrive.Name -eq 'HKCU') {'User'} else {'Machine'}}}
}

Then, execute that function:

Get-ARPTable

You can check that the Bitwarden client is installed twice, the newer one up-to-date with scope User and the original one out-of-date with scope Machine:

DisplayName    : Bitwarden
DisplayVersion : 2023.12.1
Publisher      : Bitwarden Inc.
ProductCode    : 173a9bac-6f0d-50c4-8202-4744c69d091a
Scope          : Machine

DisplayName    : Bitwarden
DisplayVersion : 2024.1.0
Publisher      : Bitwarden Inc.
ProductCode    : 173a9bac-6f0d-50c4-8202-4744c69d091a
Scope          : User

Actual behavior

It does not upgrade my current installation but instead install the new version with scope user, resulting in two different installs.

Expected behavior

Upgrade my current installation with scope machine.

Environment

[winget --info]
Windows Package Manager v1.6.3482
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.19045.3930
System Architecture: X86
Package: Microsoft.DesktopAppInstaller v1.21.3482.0

Winget Directories
-------------------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
Portable Links Directory (User)    %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User)       %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root              C:\Program Files\WinGet\Packages
Portable Package Root (x86)        C:\Program Files\WinGet\Packages
Installer Downloads                %USERPROFILE%\Downloads

Links
---------------------------------------------------------------------------
Privacy Statement   https://aka.ms/winget-privacy
License Agreement   https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage            https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

Admin Setting                             State
--------------------------------------------------
LocalManifestFiles                        Enabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Disabled

Screenshots and Logs

2024-01-18 21:55:56.093 [CORE] WinGet, version [1.6.3482], activity [{BE334B6A-D5EC-4AEA-A7B5-93062EC73E12}]
2024-01-18 21:55:56.094 [CORE] OS: Windows.Desktop v10.0.19045.3930
2024-01-18 21:55:56.094 [CORE] Command line Args: "C:\Users\test\AppData\Local\Microsoft\WindowsApps\winget.exe" upgrade Bitwarden.Bitwarden
2024-01-18 21:55:56.094 [CORE] Package: Microsoft.DesktopAppInstaller v1.21.3482.0
2024-01-18 21:55:56.094 [CORE] IsCOMCall:0; Caller: winget-cli
2024-01-18 21:55:56.107 [CLI ] WinGet invoked with arguments: 'upgrade' 'Bitwarden.Bitwarden'
2024-01-18 21:55:56.113 [CLI ] Found subcommand: upgrade
2024-01-18 21:55:56.113 [CLI ] Leaf command to execute: root:upgrade
2024-01-18 21:55:56.119 [CLI ] Executing command: upgrade
2024-01-18 21:55:56.121 [REPO] Default source requested, multiple sources available, adding all to source references.
2024-01-18 21:55:56.121 [REPO] Adding to source references msstore
2024-01-18 21:55:56.121 [REPO] Adding to source references winget
2024-01-18 21:55:56.139 [CORE] Examining extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2024-01-18 21:55:56.139 [CORE] Found matching extension.
2024-01-18 21:55:56.144 [REPO] Multiple sources available, creating aggregated source.
2024-01-18 21:55:56.144 [REPO] Adding to aggregated source: msstore
2024-01-18 21:55:56.145 [REPO] Sending http GET request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/information
2024-01-18 21:55:56.257 [REPO] Response status: 200
2024-01-18 21:55:56.258 [REPO] Sending http GET request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/information
2024-01-18 21:55:56.270 [REPO] Response status: 200
2024-01-18 21:55:56.271 [REPO] Adding to aggregated source: winget
2024-01-18 21:55:56.278 [CORE] Examining extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2024-01-18 21:55:56.278 [CORE] Found matching extension.
2024-01-18 21:55:56.307 [REPO] Opening SQLite Index for ImmutableRead at 'C:\Program Files\WindowsApps\Microsoft.Winget.Source_2024.118.1953.59_neutral__8wekyb3d8bbwe\Public\index.db'
2024-01-18 21:55:56.307 [SQL ] Opening SQLite connection #1: 'C:\Program Files\WindowsApps\Microsoft.Winget.Source_2024.118.1953.59_neutral__8wekyb3d8bbwe\Public\index.db' [1, 40]
2024-01-18 21:55:56.309 [REPO] Opened SQLite Index with version [1.7], last write [2024-01-18 19:52:20.000]
2024-01-18 21:55:56.526 [REPO] Creating new SQLite Index with version [Latest] at ':memory:'
2024-01-18 21:55:56.526 [SQL ] Opening SQLite connection #2: ':memory:' [6, 0]
2024-01-18 21:55:56.533 [REPO] Reading MSI UpgradeCodes
2024-01-18 21:55:56.549 [REPO] Reading MSI UpgradeCodes
2024-01-18 21:55:56.878 [SQL ] Opening SQLite connection #3: ':memory:' [6, 0]
2024-01-18 21:55:56.910 [REPO] Opening SQLite Index for ReadWrite at 'C:\Users\test\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\StoreEdgeFD\installed.db'
2024-01-18 21:55:56.910 [SQL ] Opening SQLite connection #4: 'C:\Users\test\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\StoreEdgeFD\installed.db' [2, 0]
2024-01-18 21:55:56.912 [REPO] Opened SQLite Index with version [1.6], last write [2023-12-21 19:04:40.000]
2024-01-18 21:55:56.918 [REPO] Sending http POST request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/manifestSearch
2024-01-18 21:55:56.932 [REPO] Response status: 200
2024-01-18 21:55:56.942 [REPO] Opening SQLite Index for ReadWrite at 'C:\Users\test\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Microsoft.Winget.Source_8wekyb3d8bbwe\installed.db'
2024-01-18 21:55:56.943 [SQL ] Opening SQLite connection #5: 'C:\Users\test\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Microsoft.Winget.Source_8wekyb3d8bbwe\installed.db' [2, 0]
2024-01-18 21:55:56.947 [REPO] Opened SQLite Index with version [1.6], last write [2024-01-18 20:32:57.000]
2024-01-18 21:55:56.952 [REPO] Finding installed package from tracking package using system reference search: Query:[none] Include:ProductCode='173a9bac-6f0d-50c4-8202-4744c69d091a'[Exact] Include:NormalizedNameAndPublisher='bitwarden'+'bitwarden'[Exact]
2024-01-18 21:55:57.042 [REPO] Opening pinning index
2024-01-18 21:55:57.042 [REPO] Opening existing pinning index
2024-01-18 21:55:57.042 [REPO] Opening SQLite Index for ReadWrite at 'C:\Users\test\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\pinning.db'
2024-01-18 21:55:57.042 [SQL ] Opening SQLite connection #6: 'C:\Users\test\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\pinning.db' [2, 0]
2024-01-18 21:55:57.043 [REPO] Opened Pinning Index with version [1.0], last write [2023-12-21 19:04:41.000]
2024-01-18 21:55:57.047 [CLI ] Found one app. App id: Bitwarden.Bitwarden App name: Bitwarden
2024-01-18 21:55:57.056 [REPO] Downloading manifest
2024-01-18 21:55:57.056 [CORE] WinINet downloading from url: https://cdn.winget.microsoft.com/cache/manifests/b/Bitwarden/Bitwarden/2024.1.0/b0c3
2024-01-18 21:55:57.142 [CORE] Download hash: 089080f699b497fc158c12e2fc6066db3418ce268753b361d9d0e765b593d7e2
2024-01-18 21:55:57.142 [CORE] Download completed.
2024-01-18 21:55:57.152 [CLI ] Manifest fields: Name [Bitwarden], Version [2024.1.0]
2024-01-18 21:55:57.180 [CLI ] Generated temp download path: C:\Users\test\AppData\Local\Temp\WinGet\Bitwarden.Bitwarden.2024.1.0\5464319e265e28304801ea1cc74800b13e8ff7890c2f44a5dc5e75524693ffbc
2024-01-18 21:55:57.181 [CORE] Downloading to path: C:\Users\test\AppData\Local\Temp\WinGet\Bitwarden.Bitwarden.2024.1.0\5464319e265e28304801ea1cc74800b13e8ff7890c2f44a5dc5e75524693ffbc
2024-01-18 21:55:57.181 [CORE] DeliveryOptimization downloading from url: https://github.com/bitwarden/clients/releases/download/desktop-v2024.1.0/Bitwarden-Installer-2024.1.0.exe
2024-01-18 21:55:59.310 [CORE] Download completed.
2024-01-18 21:55:59.673 [CORE] Started applying motw to C:\Users\test\AppData\Local\Temp\WinGet\Bitwarden.Bitwarden.2024.1.0\5464319e265e28304801ea1cc74800b13e8ff7890c2f44a5dc5e75524693ffbc with zone: 3
2024-01-18 21:55:59.678 [CORE] Finished applying motw
2024-01-18 21:55:59.678 [CLI ] Installer hash verified
2024-01-18 21:55:59.679 [CORE] Started applying motw to C:\Users\test\AppData\Local\Temp\WinGet\Bitwarden.Bitwarden.2024.1.0\5464319e265e28304801ea1cc74800b13e8ff7890c2f44a5dc5e75524693ffbc with zone: 2
2024-01-18 21:55:59.682 [CORE] Finished applying motw
2024-01-18 21:55:59.682 [CLI ] Successfully renamed downloaded installer. Path: C:\Users\test\AppData\Local\Temp\WinGet\Bitwarden.Bitwarden.2024.1.0\Bitwarden-Installer-2024.1.0.exe
2024-01-18 21:55:59.683 [REPO] Creating new SQLite Index with version [Latest] at ':memory:'
2024-01-18 21:55:59.683 [SQL ] Opening SQLite connection #7: ':memory:' [6, 0]
2024-01-18 21:55:59.691 [REPO] Reading MSI UpgradeCodes
2024-01-18 21:55:59.709 [REPO] Reading MSI UpgradeCodes
2024-01-18 21:55:59.826 [CLI ] Installer args: /S /currentuser
2024-01-18 21:55:59.828 [CLI ] Starting: 'C:\Users\test\AppData\Local\Temp\WinGet\Bitwarden.Bitwarden.2024.1.0\Bitwarden-Installer-2024.1.0.exe' with arguments '/S /currentuser'
2024-01-18 21:56:22.334 [REPO] Creating new SQLite Index with version [Latest] at ':memory:'
2024-01-18 21:56:22.334 [SQL ] Opening SQLite connection #8: ':memory:' [6, 0]
2024-01-18 21:56:22.341 [REPO] Reading MSI UpgradeCodes
2024-01-18 21:56:22.359 [REPO] Reading MSI UpgradeCodes
2024-01-18 21:56:22.364 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(204)\WindowsPackageManager.dll!52372C20: (caller: 52379122) Exception(1) tid(19d8) 800700B7 Cannot create a file when that file already exists.


2024-01-18 21:56:22.374 [REPO] Ignoring duplicate ARP entry User|X86|173a9bac-6f0d-50c4-8202-4744c69d091a [Bitwarden]
2024-01-18 21:56:22.383 [CLI ] During package install, 0 changes to ARP were observed, 1 matches were found for the package, and 0 packages were in both
2024-01-18 21:56:22.383 [CLI ] The entry determined to be associated with the package is 'Bitwarden', with publisher 'Bitwarden Inc.'
2024-01-18 21:56:22.395 [REPO] Opening SQLite Index for ReadWrite at 'C:\Users\test\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Microsoft.Winget.Source_8wekyb3d8bbwe\installed.db'
2024-01-18 21:56:22.395 [SQL ] Opening SQLite connection #9: 'C:\Users\test\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Microsoft.Winget.Source_8wekyb3d8bbwe\installed.db' [2, 0]
2024-01-18 21:56:22.397 [REPO] Opened SQLite Index with version [1.6], last write [2024-01-18 20:32:57.000]
2024-01-18 21:56:22.411 [CLI ] Removing installer: C:\Users\test\AppData\Local\Temp\WinGet\Bitwarden.Bitwarden.2024.1.0\Bitwarden-Installer-2024.1.0.exe
2024-01-18 21:56:22.412 [CLI ] Leaf command succeeded: root:upgrade
@MaanuelMM MaanuelMM added the Issue-Bug It either shouldn't be doing this or needs an investigation. label Jan 18, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage This work item needs to be triaged by a member of the core team. label Jan 18, 2024
Copy link
Contributor

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@Dragon1573
Copy link
Contributor

@MaanuelMM - Hi friend ❤️

I see you fixed this issue on your own with PR #135382 . The pull requet is successfully merged and published. Could you please try validate if the manifest is correct and close this issue as "Completed"?

@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Triage This work item needs to be triaged by a member of the core team. label Jan 19, 2024
@denelon denelon added this to the 1.7 Packages milestone Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
None yet
Development

No branches or pull requests

3 participants