microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
23.37k stars 1.45k forks source link

Upgrading/Updating Packages Deleted "Taskbar Search Icons" for Native Windows Apps #2219

Open KerickHowlett opened 2 years ago

KerickHowlett commented 2 years ago

Brief description of your issue

I've filed an issue for this in the past #1005, but I thought it had something to do with how my OneDrive was synching the fact that the icon files were deleted.

While that may have been true—can no longer say if that's definitively true or not—but this morning I decided to run winget upgrade --all on my machine, because it had been a long while since I've booted up my personal computer (since I work from home, I tend to use my work MacBook Pro for everything).

After executing the command, recalling my concerns when I filed the original ticket last time, I double-checked to see the icons were still there, and, sure enough, they were gone!

To better explain what the actual "symptoms" are:

In the Taskbar Search Field (or if you have it hidden like I do, you hit the Window key to reveal the Start menu and then just start typing), I'll type in the name of an app that was either pre-installed as a part of the Windows 10 OS natively (i.e., Calculator, Settings, etc.) or had been installed through the Microsoft Store (i.e., Twitter, Ubuntu 20.04, Audible).

When those apps would appear in the app search results, their icons are broken. All the other icons that don't fit in the two categories I described, such as Docker Desktop, appear as they should without problem.

Now, I had checked the icons earlier when I ran my Windows Updates, because I often use the Taskbar search as sorta "Windows Spotlight or less impressive Alfred", so I know for a fact that the icons were present and worked prior to the updates.

I am open-minded to other possibilities, because anything is possible, but the timing of everything leads me to believe that the deletion of the icons has to be tied into Winget somehow.

Steps to reproduce

Environment: This was completed on a custom-built machine running Windows 10 Pro with all drivers and the OS 100% up-to-date. Winget Version: v1.2.10941.

  1. Open Windows PowerShell with Admin Privileges.
  2. Enter winget upgrade --all then press Enter.
  3. Press the Window Key to have the Start Menu appear.
  4. With the Start Menu in focus, enter the name of an application that would either be pre-installed natively on Windows (i.e., Calculator or Settings) or any app acquired through the Microsoft Store, such as the MS version of Twitter or WSL2 Ubuntu 20.04.
  5. When the entered apps appear in the search results, the default "broken icon" image will appear in place of the proper icons that are supposed to appear instead.

Expected behavior

The app icons for the native Windows and MS Store apps found in the Taskbar Search results should not break either after or during the Winget upgrade/update process.

Actual behavior

The app icons for the native Windows and MS Store apps found in the Taskbar Search results are broken and are instead showing the default "broken icon link" image.

Environment

Windows Package Manager v1.2.10941
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.19044.1741
Package: Microsoft.DesktopAppInstaller v1.17.10941.0

Logs: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir

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

Let me know if y'all need additional OS, software, or hardware information.
ItzLevvie commented 2 years ago

This is caused by an application upgrade as all WinGet does is download the installer and run it with silent switches so any modifications done to your machine is done purely by the installer instead of WinGet.

It's very likely that one of them ended up corrupting your icon cache when doing an application upgrade. Do you know what applications do you have installed on that machine so that the issue can be traced down? Reproducibility is also subject to your machine settings, apps settings, base image of the OS, etc.

Maybe once the issue is traced down then it can probably be added as part of InstallationNotes in a future WinGet update as a warning to other people.

ghost commented 2 years ago

@KerickHowlett this issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment.

KerickHowlett commented 2 years ago

Apologies for the late response. Things have been crazy on my end. lol

I have numerous applications installed on my machine. What I could do is list all the apps I have installed on my machine via Scoop & Chocolatey along with the ones listed through Winget.

Scoop

hadolint 2.10.0

Chocolatey

autohotkey.portable 1.1.34.03
chocolatey 1.1.0
chocolatey-compatibility.extension 1.0.0
chocolatey-core.extension 1.4.0
chocolatey-font-helpers.extension 0.0.4
chocolatey-windowsupdate.extension 1.0.4
discord 1.0.9004
discord.install 1.0.9004
DotNet4.5.2 4.5.2.20140902
expressvpn 12.24.0.60
FiraCode 6.2
Firefox 101.0
gh 2.11.3
git 2.36.0
git.install 2.36.0
GoogleChrome 102.0.5005.63
KB2919355 1.0.20160915
KB2919442 1.0.20160915
KB2999226 1.0.20181019
KB3033929 1.0.5
KB3035131 1.0.3
kubernetes-cli 1.24.1
kubernetes-helm 3.8.2
Minikube 1.25.2
msiafterburner 4.6.4.20211212
notepadplusplus 8.4.2
notepadplusplus.install 8.4.2
nvm 1.1.9
nvm.install 1.1.9
postgresql 14.3.1
postgresql14 14.3.1
vcredist140 14.32.31326
vlc 3.0.17.4
vlc.install 3.0.17.4
vscode 1.67.2
vscode.install 1.67.2

Winget/Windows

winget (I had to take a screenshot since I couldn't copy & paste the formatting cleanly.)

denelon commented 2 years ago

@KerickHowlett Thanks for sharing!

I've found I can copy paste the text and use the three backticks on a line above and below the terminal output to improve formatting.

KerickHowlett commented 2 years ago

@KerickHowlett Thanks for sharing!

I've found I can copy paste the text and use the three backticks on a line above and below the terminal output to improve formatting.

I had tried that originally, but the alignment of everything had still came out funky.

But do you need me to send that to you in copyable text instead of a screenshot?

denelon commented 2 years ago

No, I'm just trying to narrow down which installer is messing with icons.

KerickHowlett commented 2 years ago

Oh! Well, it happened after running the winget update, so are you asking me which app I installed through winget, explicitly? Or any of the apps winget manages in general?

denelon commented 2 years ago

If you have the logs for the winget upgrade --all it might help narrow down which upgrade had some kind of interaction. This is one of those super tricky to isolate scenarios. I'm suspecting that either an upgrade did something strange, or like you theorized, One Drive might have been doing something at the same time as well. I've seen reports of a few of the "Windows Cleaner" types of products messing with icons and associated paths, but this looks a bit different.

KerickHowlett commented 2 years ago

How do I find the logs for past executed winget commands?

denelon commented 2 years ago

@KerickHowlett

winget --info displays the log path for the Windows Package Manager.

KerickHowlett commented 2 years ago

Sorry for the very long time for me to write up a response; I've been terribly busy, which kept getting me sidetracked away from this.

Nevertheless, I ran the winget --info command to get the path of the logs like you suggested, @denelon, but by the time I looked at it, the earliest logs still stored are for 7/27/2022.

I don't know if running another update would be at all beneficial to recreate the necessary logs, but I can do it if you think it'd help.

I even promise to respond more promptly this time. 😅

denelon commented 2 years ago

No worries. It's going to take some time to narrow down which packages might be messing with the icons. The best-case scenario is if we can get a log showing which individual package was installed or upgraded when this happens. I'm suspicious of some of the performance improvement types of packages that remove what they perceive as registry keys that are no longer used. My guess is that it's a false positive type of scenario.

KerickHowlett commented 2 years ago

Yeah, that makes sense. If I was more familiar with Powershell, I'd take a look at it myself. lol

I'd just be happy if there was a way to fix the issue whenever it does occur.

It looks like I may have to re-install Windows AGAIN! Although, I think I may install Windows 11 this time, assuming they got all the major kinks out of it by now. (I'd like to use WSLg for some apps. lol)