gitkraken symbol over black background

Taking a Krak at Why The GitKraken Taskbar Icon Vanished

Release the Kraken: Replacing the GitKraken Missing Taskbar Icon

For anyone who has spent much time with me, it is no secret that I am a massive fan of GitKraken Client. It is my go-to tool for all things related to git. I use it every day, and as a Windows user, I keep it pinned to my taskbar. I have been running it for quite a while and always install updates as soon as possible. Recently the pretty GitKraken Client logo that I was used to seeing was replaced by an ugly piece of white paper.

GitKraken Missing Icon

Oh no, my favorite Kraken vanished!

Fixing the Missing GitKraken Taskbar Icon Issue

Here is a simple three-step process for those looking for a quick solution to the problem.

  1. Right-click on the taskbar icon, click again on the GitKraken option, and select properties.
    GitKraken properties
  2. On the Properties window, ensure you are on the Shortcut tab. Click the Change Icon button (you will likely get a warning saying that it could not find gitkraken.exe; click OK). In the Change Icon window that pops up, enter “%LOCALAPPDATA%\gitkraken\Update.exe” (without the quotes) into the textbox and press Enter. You should then see the pretty GitKraken Client logo as an option to select and press OK.
    GitKraken shortcut properties
  3. Finally, you likely need to update the Start in the text box. I recommend setting it to “%LOCALAPPDATA%\gitkraken” (without the quotes)—Click Apply and OK on the Properties Window to close it. Your icon is updated, and you should not run into this issue again.
    GitKraken Start In

So Why Did the GitKraken Taskbar Icon Disappear?

First, it is worth noting that I wrote this blog on March 12th, 2021, using GitKraken Client version 8.3.2. Though the following information may be helpful for learning, things often change with time. The outlined steps above demonstrate how to diagnose and solve problems of this nature.

The reason this happens is a bit complicated, but I like to understand what is happening under the covers.

Working with the Taskbar

Let’s start with the taskbar. There are several ways to pin an app to the taskbar, but one of the simplest is to right-click on the icon of a running application and select Pin to taskbar.
Pin application to taskbar

Pinning the icon creates a Window’s shortcut file located in “%APPDATA%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar” (make sure you show Hidden items if you try to navigate there). This file is the shortcut file that we are manipulating when viewing the Properties window in the above section.

If you look at the Target of that shortcut, you see that it points to something similar to “C:\Users\AppData\Local\gitkraken\Update.exe –processStart “gitkraken.exe”. Astute observers will notice that it looks like the structure of an application installed with Squirrel (which I have written about previously). If we check the version of the Update.exe referenced by the shortcut, we can see that it has a file version 1.4.2.0. This version of Squirrel was used to build the installer (which is a bit old).

How Updates Work in Squirrel

Looking at the documented Squirrel update process, the final two steps are:

  • Update Shortcuts – desktop and Windows Start Menu shortcuts are updated to point to the new MyApp version (via the –processStart command line parameter passed to Update.exe).
  • Previous Version Clean-up – on the next startup of MyApp, all but the current and immediately previous versions of your app are deleted as part of clean-up (e.g., after updating to app-1.0.5, app-1.0.4 remains, but app-1.0.3 and earlier are deleted – see issue #589).

First, let’s note that Squirrel cleans up the old version of the application (leaving only a couple on the system for rollback). This process likely explains why the path originally referenced by my shortcut pointed to a directory that no longer exists.

Next, though the docs only call out desktop and start menu shortcuts, the source code of version 1.4.2 shows that it should also attempt to update pinned shortcuts. Very conveniently, we can see that it does log out lots of useful information at various stages in the process. This log file is stored in SquirrelSetup.log in the same directory as the Update.exe. The relevant portions of the log are below:

2022-03-08 18:17:53> ApplyReleasesImpl: Starting fixPinnedExecutables

2022-03-08 18:17:53> ApplyReleasesImpl: Examining Pin: File Explorer.lnk

2022-03-08 18:17:53> ApplyReleasesImpl: Examining Pin: GitKraken.lnk

2022-03-08 18:17:53> ApplyReleasesImpl: Examining Pin: Microsoft Edge.lnk

2022-03-08 18:17:53> ApplyReleasesImpl: Examining Pin: Outlook.lnk

2022-03-08 18:17:53> ApplyReleasesImpl: Examining Pin: Visual Studio 2022 Preview.lnk

2022-03-08 18:17:53> ApplyReleasesImpl: Processing shortcut
'C:\Users\kitok\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\GitKraken.lnk'

2022-03-08 18:17:53> ApplyReleasesImpl: Old shortcut target: 'C:\Users\kitok\AppData\Local\gitkraken\Update.exe'

2022-03-08 18:17:53> ApplyReleasesImpl: New shortcut target: 'C:\Users\kitok\AppData\Local\gitkraken\Update.exe'

2022-03-08 18:17:53> ApplyReleasesImpl: Old iconPath is: 'C:\Users\kitok\AppData\Local\gitkraken\app-8.3.2\gitkraken.exe'

2022-03-08 18:17:53> ApplyReleasesImpl: Setting iconPath to: 'C:\Users\kitok\AppData\Local\gitkraken\app-8.3.2\gitkraken.exe'

2022-03-08 18:17:53> ApplyReleasesImpl: Finished shortcut successfully

From the log, it would appear that Squirrel did its job and updated the icon correctly (at least that is what the logs imply). Looking through the Squirrel source at version 1.4.2, it is not readily apparent where it fails. However, quite a few updates around this area in Squirrel have occurred since version 1.4.2 (this commit, in particular, attempts to address a similar issue). I suspect that updating to a more recent version of Squirrel resolves the issue; however, there is a significant version jump to the latest (currently 2.0.1). Squirrel does follow semantic versioning, so it is possible that updating is not a simple process.

Potential GitKraken Upgrade Issues

I sent this information to the GitKraken team and received the following response:

This is a known issue with our team to address. The start menu shortcut has been moved from C:\Users\USER\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Axosoft, LLC to C:\Users\USER\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\GitKraken. You should be able to delete the C:\Users\USER\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Axosoft, LLC folder, start GitKraken, and then pin it again to resolve this.

Of course, back in December of last year (only about four months ago at the time of writing), the company rebranded itself from Axosoft to GitKraken. Given the string-based matching used by Squirrel to identify shortcuts, it makes sense that as the rebrand makes its way into the products, there may be upgrade issues. In the end, I am happy that it is a known issue, and the GitKraken team is already looking into it.

After looking into those directories, I did find the old Axosoft directory and removed it. I had missed that this was causing duplicate Start Menu shortcuts to appear (with one failing to have the correct icon; for a similar reason as the taskbar shortcut). After removing the old directory, I restarted Windows Explorer (a quick reboot would also work here), and now my Start Menu shortcuts display correctly again.

I hope this has helped better explain how things are working. GitKraken Client is a wonderful product, and the team that works on it gets major kudos from me for producing a tool that makes my life so much easier.

Want More?

Check out my blog on smoothly deploying your app with Squirrel to understand all the features of deploying with it. Please leave any questions in the comments below!

5 thoughts on “Taking a Krak at Why The GitKraken Taskbar Icon Vanished”

  1. This actually happens after every Gitkraken upgrade.
    Not just the pinned icons but also the Start Menu icon goes missing.
    So, there’s something inherently wrong in the Squirrel upgrade process.

Leave a Reply

Your email address will not be published.