Error while applying custom icon #8049

Closed
opened 2026-01-31 01:19:28 +00:00 by claunia · 18 comments
Owner

Originally created by @maximousblk on GitHub (May 10, 2020).

Environment

Windows build number: [Version 10.0.18363.815]
Windows Terminal version (if applicable): 0.11.1251.0

Any other software?

Nushell 0.13.0

Steps to reproduce

Install nushell in the folder C:/bin/nu/ as per the instructions on nushell.sh.

Place an icon at C:/bin/nu/nu.ico

Use the following profile:

{
    // Make changes here to the nu profile
    "guid": "{95c5a4fe-f9d7-4e85-a2d7-843317b06ad8}",
    "name": "nu",
    "commandline": "nu.exe",
    "icon": "‪‪C:/bin/nu/nu.ico",
    "hidden": false
},

Expected behavior

The icon shows up beside the name in the "new tab" dropdown. Without error.

Actual behavior

I'm getting the following error:

image

Originally created by @maximousblk on GitHub (May 10, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: [Version 10.0.18363.815] Windows Terminal version (if applicable): 0.11.1251.0 Any other software? Nushell 0.13.0 ``` # Steps to reproduce <!-- A description of how to trigger this bug. --> Install nushell in the folder `C:/bin/nu/` as per the instructions on [nushell.sh](https://www.nushell.sh/). Place an icon at `C:/bin/nu/nu.ico` Use the following profile: ``` { // Make changes here to the nu profile "guid": "{95c5a4fe-f9d7-4e85-a2d7-843317b06ad8}", "name": "nu", "commandline": "nu.exe", "icon": "‪‪C:/bin/nu/nu.ico", "hidden": false }, ``` # Expected behavior <!-- A description of what you're expecting, possibly containing screenshots or reference material. --> The icon shows up beside the name in the "new tab" dropdown. Without error. # Actual behavior <!-- What's actually happening? --> I'm getting the following error: ![image](https://user-images.githubusercontent.com/28438021/81506161-fe654c00-9311-11ea-8e06-9d72b32f4886.png)
Author
Owner

@DHowett-MSFT commented on GitHub (May 10, 2020):

Interesting. What if you use \\ instead of /?

@DHowett-MSFT commented on GitHub (May 10, 2020): Interesting. What if you use `\\` instead of `/`?
Author
Owner

@maximousblk commented on GitHub (May 10, 2020):

{
    // Make changes here to the nu profile
    "guid": "{95c5a4fe-f9d7-4e85-a2d7-843317b06ad8}",
    "name": "nu",
    "commandline": "nu.exe",
    "icon": "‪‪C:\\bin\\nu\\nu.ico",
    "hidden": false
},

no luck. I still get the same error.

@maximousblk commented on GitHub (May 10, 2020): ``` { // Make changes here to the nu profile "guid": "{95c5a4fe-f9d7-4e85-a2d7-843317b06ad8}", "name": "nu", "commandline": "nu.exe", "icon": "‪‪C:\\bin\\nu\\nu.ico", "hidden": false }, ``` no luck. I still get the same error.
Author
Owner

@Fooughhy commented on GitHub (May 10, 2020):

I am using "icon" : "%PROGRAMFILES%\\Git\\mingw64\\share\\git\\git-for-windows.ico" for my Git-Bash profile, and "icon": "C:\\Tools\\PowerShell\\7\\assets\\Powershell_black.ico" for my Powershell7 profile. Both of these work.

@Fooughhy commented on GitHub (May 10, 2020): I am using `"icon" : "%PROGRAMFILES%\\Git\\mingw64\\share\\git\\git-for-windows.ico"` for my Git-Bash profile, and `"icon": "C:\\Tools\\PowerShell\\7\\assets\\Powershell_black.ico"` for my Powershell7 profile. Both of these work.
Author
Owner

@DHowett-MSFT commented on GitHub (May 10, 2020):

Can you attach a copy of c:\bin\nu\nu.ico?

@DHowett-MSFT commented on GitHub (May 10, 2020): Can you attach a copy of `c:\bin\nu\nu.ico`?
Author
Owner

@maximousblk commented on GitHub (May 10, 2020):

you can get the icon file here: http://s000.tinyupload.com/index.php?file_id=19101557016265546260

I made it myself, if that's a concern.

Program used: lunacy

@maximousblk commented on GitHub (May 10, 2020): you can get the icon file here: http://s000.tinyupload.com/index.php?file_id=19101557016265546260 I made it myself, if that's a concern. Program used: [lunacy](https://icons8.com/lunacy)
Author
Owner

@DHowett-MSFT commented on GitHub (May 10, 2020):

image

So, this definitely works for me. Nice icon!

Can you run the following command, from powershell?

Get-FileHash C:\bin\nu\nu.ico

and share the output?

Thanks!

@DHowett-MSFT commented on GitHub (May 10, 2020): ![image](https://user-images.githubusercontent.com/14316954/81507620-6f294b80-92b3-11ea-990e-b535d4f52a43.png) So, this definitely works for me. Nice icon! Can you run the following command, from powershell? ``` Get-FileHash C:\bin\nu\nu.ico ``` and share the output? Thanks!
Author
Owner

@maximousblk commented on GitHub (May 11, 2020):

Here you go:

PS C:\Users\maximousblk> Get-FileHash C:\bin\nu\nu.ico

Algorithm       Hash                                                                   Path
---------       ----                                                                   ----
SHA256          F0758BCC516C0A81A159999DE3F282D89D726DC94BFAEABAEEA9B36CF075A3FC       C:\bin\nu\nu.ico

If it works for you, does it have something to do with my installation?

@maximousblk commented on GitHub (May 11, 2020): Here you go: ``` PS C:\Users\maximousblk> Get-FileHash C:\bin\nu\nu.ico Algorithm Hash Path --------- ---- ---- SHA256 F0758BCC516C0A81A159999DE3F282D89D726DC94BFAEABAEEA9B36CF075A3FC C:\bin\nu\nu.ico ``` If it works for you, does it have something to do with my installation?
Author
Owner

@DHowett-MSFT commented on GitHub (May 12, 2020):

Would you mind sharing the rest of your settings file? Thanks!

@DHowett-MSFT commented on GitHub (May 12, 2020): Would you mind sharing the rest of your settings file? Thanks!
Author
Owner

@maximousblk commented on GitHub (May 12, 2020):

// This file was initially generated by Windows Terminal 0.11.1121.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.

// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
    "$schema": "https://aka.ms/terminal-profiles-schema",

    "defaultProfile": "{9695D2D6-65E7-4DB5-9AE9-C857416E9ABA}",

    "theme": "dark",

    // You can add more global application settings here.
    // To learn more about global settings, visit https://aka.ms/terminal-global-settings

    // If enabled, selections are automatically copied to your clipboard.
    "copyOnSelect": false,

    // If enabled, formatted data is also copied to your clipboard
    "copyFormatting": false,

    // A profile specifies a command to execute paired with information about how it should look and feel.
    // Each one of them will appear in the 'New Tab' dropdown,
    //   and can be invoked from the commandline with `wt.exe -p xxx`
    // To learn more about profiles, visit https://aka.ms/terminal-profile-settings
    "profiles": {
        "defaults": {
            // Put settings here that you want to apply to all profiles.
            "colorScheme": "Dracula",
            "closeOnExit": "graceful",
            "startingDirectory": "%USERPROFILE%",
            "fontFace": "JetBrains Mono",
            "fontSize": 12,
            "padding": "16"
        },
        "list": [
            {
                // Make changes here to the Cmder profile
                "guid": "{9695D2D6-65E7-4DB5-9AE9-C857416E9ABA}",
                "name": "Cmder",
                "commandline": "cmd.exe /k %CMDER_ROOT%\\vendor\\init.bat",
                "icon": "%cmder_root%/icons/cmder.ico",
                "hidden": false
            },
            {
                // Make changes here to the nu profile
                "guid": "{95c5a4fe-f9d7-4e85-a2d7-843317b06ad8}",
                "name": "nu",
                "commandline": "nu.exe",
                "icon": "‪‪C:/bin/nu/nu.ico",
                "hidden": false
            },
            {
                "guid": "{ced5fbe8-313c-4760-9a4b-ed66b4901125}",
                "name" : "Git Bash",
                "commandline" : "C:/Program Files/Git/bin/bash.exe -li",
                "icon" : "C:/Program Files/Git/mingw64/share/git/git-for-windows.ico",
                "startingDirectory" : "%USERPROFILE%"
            },
            {
                // Make changes here to the cmd.exe profile.
                "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
                "name": "Command Prompt",
                "commandline": "cmd.exe",
                "hidden": false
            },
            {
                // Make changes here to the powershell.exe profile.
                "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
                "name": "Windows PowerShell",
                "commandline": "powershell.exe",
                "hidden": false
            },
            {
                "guid": "{2c4de342-38b7-51cf-b940-2309a097f518}",
                "name": "Ubuntu",
                "source": "Windows.Terminal.Wsl",
                "hidden": false
            },
            {
                "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
                "name": "Azure Cloud Shell",
                "source": "Windows.Terminal.Azure",
                "hidden": true
            }
        ]
    },

    // Add custom color schemes to this array.
    // To learn more about color schemes, visit https://aka.ms/terminal-color-schemes
    "schemes": [
        {
            "name": "Dracula",
            "background": "#282A36",
            "black": "#21222C",
            "blue": "#BD93F9",
            "brightBlack": "#6272A4",
            "brightBlue": "#D6ACFF",
            "brightCyan": "#A4FFFF",
            "brightGreen": "#69FF94",
            "brightPurple": "#FF92DF",
            "brightRed": "#FF6E6E",
            "brightWhite": "#FFFFFF",
            "brightYellow": "#FFFFA5",
            "cyan": "#8BE9FD",
            "foreground": "#F8F8F2",
            "green": "#50FA7B",
            "purple": "#FF79C6",
            "red": "#FF5555",
            "white": "#F8F8F2",
            "yellow": "#F1FA8C"
        }
    ],

    // Add custom keybindings to this array.
    // To unbind a key combination from your defaults.json, set the command to "unbound".
    // To learn more about keybindings, visit https://aka.ms/terminal-keybindings
    "keybindings": [
        // Copy and paste are bound to Ctrl+Shift+C and Ctrl+Shift+V in your defaults.json.
        // These two lines additionally bind them to Ctrl+C and Ctrl+V.
        // To learn more about selection, visit https://aka.ms/terminal-selection
        {
            "command": { "action": "copy", "singleLine": false },
            "keys": "ctrl+c"
        },
        { "command": "paste", "keys": "ctrl+v" },

        // Press Ctrl+Shift+F to open the search box
        { "command": "find", "keys": "ctrl+shift+f" },

        // Press Alt+Shift+D to open a new pane.
        // - "split": "auto" makes this pane open in the direction that provides the most surface area.
        // - "splitMode": "duplicate" makes the new pane use the focused pane's profile.
        // To learn more about panes, visit https://aka.ms/terminal-panes
        {
            "command": {
                "action": "splitPane",
                "split": "auto",
                "splitMode": "duplicate"
            },
            "keys": "alt+shift+d"
        }
    ]
}

Here's all of it. I currently have NuShell disabled until this issue is resolved.

@maximousblk commented on GitHub (May 12, 2020): ``` // This file was initially generated by Windows Terminal 0.11.1121.0 // It should still be usable in newer versions, but newer versions might have additional // settings, help text, or changes that you will not see unless you clear this file // and let us generate a new one for you. // To view the default settings, hold "alt" while clicking on the "Settings" button. // For documentation on these settings, see: https://aka.ms/terminal-documentation { "$schema": "https://aka.ms/terminal-profiles-schema", "defaultProfile": "{9695D2D6-65E7-4DB5-9AE9-C857416E9ABA}", "theme": "dark", // You can add more global application settings here. // To learn more about global settings, visit https://aka.ms/terminal-global-settings // If enabled, selections are automatically copied to your clipboard. "copyOnSelect": false, // If enabled, formatted data is also copied to your clipboard "copyFormatting": false, // A profile specifies a command to execute paired with information about how it should look and feel. // Each one of them will appear in the 'New Tab' dropdown, // and can be invoked from the commandline with `wt.exe -p xxx` // To learn more about profiles, visit https://aka.ms/terminal-profile-settings "profiles": { "defaults": { // Put settings here that you want to apply to all profiles. "colorScheme": "Dracula", "closeOnExit": "graceful", "startingDirectory": "%USERPROFILE%", "fontFace": "JetBrains Mono", "fontSize": 12, "padding": "16" }, "list": [ { // Make changes here to the Cmder profile "guid": "{9695D2D6-65E7-4DB5-9AE9-C857416E9ABA}", "name": "Cmder", "commandline": "cmd.exe /k %CMDER_ROOT%\\vendor\\init.bat", "icon": "%cmder_root%/icons/cmder.ico", "hidden": false }, { // Make changes here to the nu profile "guid": "{95c5a4fe-f9d7-4e85-a2d7-843317b06ad8}", "name": "nu", "commandline": "nu.exe", "icon": "‪‪C:/bin/nu/nu.ico", "hidden": false }, { "guid": "{ced5fbe8-313c-4760-9a4b-ed66b4901125}", "name" : "Git Bash", "commandline" : "C:/Program Files/Git/bin/bash.exe -li", "icon" : "C:/Program Files/Git/mingw64/share/git/git-for-windows.ico", "startingDirectory" : "%USERPROFILE%" }, { // Make changes here to the cmd.exe profile. "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", "name": "Command Prompt", "commandline": "cmd.exe", "hidden": false }, { // Make changes here to the powershell.exe profile. "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", "name": "Windows PowerShell", "commandline": "powershell.exe", "hidden": false }, { "guid": "{2c4de342-38b7-51cf-b940-2309a097f518}", "name": "Ubuntu", "source": "Windows.Terminal.Wsl", "hidden": false }, { "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}", "name": "Azure Cloud Shell", "source": "Windows.Terminal.Azure", "hidden": true } ] }, // Add custom color schemes to this array. // To learn more about color schemes, visit https://aka.ms/terminal-color-schemes "schemes": [ { "name": "Dracula", "background": "#282A36", "black": "#21222C", "blue": "#BD93F9", "brightBlack": "#6272A4", "brightBlue": "#D6ACFF", "brightCyan": "#A4FFFF", "brightGreen": "#69FF94", "brightPurple": "#FF92DF", "brightRed": "#FF6E6E", "brightWhite": "#FFFFFF", "brightYellow": "#FFFFA5", "cyan": "#8BE9FD", "foreground": "#F8F8F2", "green": "#50FA7B", "purple": "#FF79C6", "red": "#FF5555", "white": "#F8F8F2", "yellow": "#F1FA8C" } ], // Add custom keybindings to this array. // To unbind a key combination from your defaults.json, set the command to "unbound". // To learn more about keybindings, visit https://aka.ms/terminal-keybindings "keybindings": [ // Copy and paste are bound to Ctrl+Shift+C and Ctrl+Shift+V in your defaults.json. // These two lines additionally bind them to Ctrl+C and Ctrl+V. // To learn more about selection, visit https://aka.ms/terminal-selection { "command": { "action": "copy", "singleLine": false }, "keys": "ctrl+c" }, { "command": "paste", "keys": "ctrl+v" }, // Press Ctrl+Shift+F to open the search box { "command": "find", "keys": "ctrl+shift+f" }, // Press Alt+Shift+D to open a new pane. // - "split": "auto" makes this pane open in the direction that provides the most surface area. // - "splitMode": "duplicate" makes the new pane use the focused pane's profile. // To learn more about panes, visit https://aka.ms/terminal-panes { "command": { "action": "splitPane", "split": "auto", "splitMode": "duplicate" }, "keys": "alt+shift+d" } ] } ``` Here's all of it. I currently have NuShell disabled until this issue is resolved.
Author
Owner

@maximousblk commented on GitHub (May 13, 2020):

I updated to nushell 0.14.0 but that doesn't seem to help. This doesn't happen with any other profile.

@DHowett-MSFT Is there any problem with my settings.json ?

@maximousblk commented on GitHub (May 13, 2020): I updated to `nushell 0.14.0` but that doesn't seem to help. This doesn't happen with any other profile. @DHowett-MSFT Is there any problem with my `settings.json` ?
Author
Owner

@maximousblk commented on GitHub (May 13, 2020):

@DHowett-MSFT I updated windows terminal to v0.11.1333.0 (1.0rc2) but still this doesn't fix it. It's really annoying.

@maximousblk commented on GitHub (May 13, 2020): @DHowett-MSFT I updated windows terminal to `v0.11.1333.0 (1.0rc2)` but still this doesn't fix it. It's really annoying.
Author
Owner

@3dWrecker commented on GitHub (May 20, 2020):

Does it work if you run as administrator? Do the permissions to C:\bin\nu\nu.ico allow unelevated user access? That's all I can think of. I store all my non standard icons (and a backup of my settings) in a Terminal folder in Documents to avoid permission problems.

@3dWrecker commented on GitHub (May 20, 2020): Does it work if you run as administrator? Do the permissions to C:\bin\nu\nu.ico allow unelevated user access? That's all I can think of. I store all my non standard icons (and a backup of my settings) in a Terminal folder in Documents to avoid permission problems.
Author
Owner

@DHowett commented on GitHub (May 20, 2020):

Huh that’s a really good thought! Yeah, I’ve been coming up blank. The best we can do is add more info to the error message, but it would be ugly and full of those windows hex codes everyone hates.

@DHowett commented on GitHub (May 20, 2020): Huh that’s a really good thought! Yeah, I’ve been coming up blank. The best we can do is add more info to the error message, but it would be ugly and full of those windows hex codes everyone hates.
Author
Owner

@maximousblk commented on GitHub (May 20, 2020):

Huh that’s a really good thought! Yeah, I’ve been coming up blank. The best we can do is add more info to the error message, but it would be ugly and full of those windows hex codes everyone hates.

You can add a link to the full error log below the current error messages

@maximousblk commented on GitHub (May 20, 2020): > Huh that’s a really good thought! Yeah, I’ve been coming up blank. The best we can do is add more info to the error message, but it would be ugly and full of those windows hex codes everyone hates. You can add a link to the full error log below the current error messages
Author
Owner

@maximousblk commented on GitHub (May 20, 2020):

Does it work if you run as administrator? Do the permissions to C:\bin\nu\nu.ico allow unelevated user access? That's all I can think of. I store all my non standard icons (and a backup of my settings) in a Terminal folder in Documents to avoid permission problems.

Yes I've tried running it as administrator. I've also tried changing the location of the icon file. But it doesn't seem to help.

@maximousblk commented on GitHub (May 20, 2020): > Does it work if you run as administrator? Do the permissions to C:\bin\nu\nu.ico allow unelevated user access? That's all I can think of. I store all my non standard icons (and a backup of my settings) in a Terminal folder in Documents to avoid permission problems. Yes I've tried running it as administrator. I've also tried changing the location of the icon file. But it doesn't seem to help.
Author
Owner

@maximousblk commented on GitHub (May 22, 2020):

FIXED

This is weird. I started changing and switching back every setting one-by-one and it fixed itself!

I don't know how this happened. I changed NuShell icon to git bash icon and it worked. Then I changed it to Cmder icon. And when I switched back, the logo was set without any error.

Here is the current Nushell profile:

{
    // Make changes here to the nu profile
    "guid": "{95c5a4fe-f9d7-4e85-a2d7-843317b06ad8}",
    "name": "nu",
    "commandline": "nu.exe",
    "icon": "C:/bin/nu/nu.ico",
    "hidden": false
},

And the old profile:

{
    // Make changes here to the nu profile
    "guid": "{95c5a4fe-f9d7-4e85-a2d7-843317b06ad8}",
    "name": "nu",
    "commandline": "nu.exe",
    "icon": "‪‪C:/bin/nu/nu.ico",
    "hidden": false
},

No difference right? I don't get it either.

This is solved for the most part but the mystery still remains, how did it happen in the first place?

@DHowett This can be closed. Thank You.

@maximousblk commented on GitHub (May 22, 2020): # FIXED This is weird. I started changing and switching back every setting one-by-one and it fixed itself! I don't know how this happened. I changed NuShell icon to git bash icon and it worked. Then I changed it to Cmder icon. And when I switched back, the logo was set without any error. Here is the current Nushell profile: ```jsonc { // Make changes here to the nu profile "guid": "{95c5a4fe-f9d7-4e85-a2d7-843317b06ad8}", "name": "nu", "commandline": "nu.exe", "icon": "C:/bin/nu/nu.ico", "hidden": false }, ``` And the old profile: ```jsonc { // Make changes here to the nu profile "guid": "{95c5a4fe-f9d7-4e85-a2d7-843317b06ad8}", "name": "nu", "commandline": "nu.exe", "icon": "‪‪C:/bin/nu/nu.ico", "hidden": false }, ``` No difference right? I don't get it either. This is solved for the most part but the mystery still remains, how did it happen in the first place? @DHowett This can be closed. Thank You.
Author
Owner

@Desmond121 commented on GitHub (May 22, 2020):

I have exact the same issue with yours, and I fixed it by accident, with a same way too. That is so wired. Orz...

@Desmond121 commented on GitHub (May 22, 2020): I have exact the same issue with yours, and I fixed it by accident, with a same way too. That is so wired. Orz...
Author
Owner

@DHowett commented on GitHub (May 22, 2020):

What the heckkkk?
Maybe there was a zero width space in there? Surely that would have been shown by layout editor. Wow.

Thanks for following up. Sorry about the mystery!

@DHowett commented on GitHub (May 22, 2020): What the heckkkk? Maybe there was a zero width space in there? Surely that would have been shown by layout editor. Wow. Thanks for following up. Sorry about the mystery!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#8049