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

[Terminal Chat Setup] App link like ms-terminal-can://... doesn't launch Terminal #18158

Open
dmealo opened this issue Nov 6, 2024 · 18 comments
Assignees
Labels
Area-Chat All things LLM or "AI" Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal.

Comments

@dmealo
Copy link

dmealo commented Nov 6, 2024

Windows Terminal version

1.23.3091.0, 1.23.3101.0

Windows build number

10.0.22631.0

Other Software

No response

Steps to reproduce

  1. Launch Settings
  2. Navigate to Terminal Chat (Experimental)
  3. Expand GitHub Copilot under Service Providers
  4. Click Authenticate via GitHub
  5. Authenticate and approve access to GitHub account in browser
  6. Click "Open Terminal Canary" in resulting browser modal dialog

Expected Behavior

Windows Terminal Canary should launch and receive the auth token from GitHub to complete GitHub Copilot setup for Terminal Chat.

Actual Behavior

Windows Terminal Canary does not launch. This does not work from the default browser (Chrome) nor from Edge.

@dmealo dmealo added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Nov 6, 2024
@dmealo dmealo changed the title App link like ms-terminal-can://... doesn't launch Terminal [Terminal Chat Setup] App link like ms-terminal-can://... doesn't launch Terminal Nov 6, 2024
@radrad
Copy link

radrad commented Nov 9, 2024

The same for me. It looks like Windows Terminal Canary is not registered to handle ms-terminal-can://...

I am on windows 10

@carlos-zamora
Copy link
Member

Thanks for filing! Could you share what's in the OS's Settings app under "Apps" > "Default apps" > "Choose defaults by link type" /?
It may be different on windows 10, but it should exist though.

We're expecting it to look something like this:
Image

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Nov 13, 2024
@tino-github
Copy link

I have the settings just like it shows in the screenshot:
Image

However, the terminal does not get launched.

@Zheke32174
Copy link

Zheke32174 commented Nov 15, 2024

I am having the same issue. I can not find any solution online. I am on windows 11 24h2. I find this especially confusing because GH auth redirects back to the terminal from the browser but copilot does not.

@jvcosmo
Copy link

jvcosmo commented Nov 18, 2024

I'm unable to login to use Github Copilot because of that problem. Even registered, the browser doesn't redirect to terminal canary.

@microsoft-github-policy-service microsoft-github-policy-service bot added the No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. label Nov 22, 2024
@dmealo
Copy link
Author

dmealo commented Nov 22, 2024

My settings are as @tino-github ’s, please do not close.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. labels Nov 22, 2024
@lly-c232733
Copy link

same issue for me. cannot use copilot cli because of this

@carlos-zamora
Copy link
Member

We're struggling to get a repro. Can one of you with a repro provide a screenshot of the resulting error /?

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. and removed Needs-Attention The core contributors need to come back around and look at this ASAP. labels Dec 4, 2024
@tino-github
Copy link

A bit unexpected, this question as there is no error. The issue is that a link such a shown below does not trigger MS Terminal Canary to open.

ms-terminal-can://github-auth?code=123456789&state=abcdef

@microsoft-github-policy-service microsoft-github-policy-service bot removed the No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. label Dec 9, 2024
@DHowett DHowett removed the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Dec 9, 2024
@lly-c232733
Copy link

tino describes the exact same problem as I am having.

I try to follow the following instructions: https://devblogs.microsoft.com/commandline/github-copilot-in-windows-terminal/

I am able to complete steps 1-3 of the setup. but after logging it github and authorizing windows terminal access I am shown this webpage:
Image

I am not automatically re-directed so I try clicking the hyperlink called 'this setup page' which is a url like this: ms-terminal-can://github-auth?code=xxxxxxxxxxxxxxxxxxxxx&state=xxxxxxxxxxxxxxxxxxxxxxx

clicking the link does nothing.

I check in windows the default app to open this link, and it seems correct, but will not work.
Image

Is the windows registry incomplete?
Image

Shouldn't there be subfolders '/shell/open/command' with a path to executable plus arguments ???

@PankajBhojwani
Copy link
Contributor

For everyone facing this issue - are you launching Windows Terminal Canary elevated/as administrator? If so we have a temporary fix - launch Canary unelevated, complete the whole Github Copilot auth flow, and then switch back to elevated - your credentials will already be stored and you will be able to use Terminal Chat.

If anyone is experiencing this issue while not running elevated/as administrator, please let us know!

@lly-c232733
Copy link

I am not running it as admin

@dmealo
Copy link
Author

dmealo commented Dec 11, 2024

@PankajBhojwani, that worked for me at least! Thanks!

@tino-github
Copy link

@PankajBhojwani, thanks for the workaround! It worked for me.

@carlos-zamora
Copy link
Member

I am not running it as admin

@lly-c232733 Hmm... A few questions from the team:

  • Do you have UAC on?
  • Can you share a copy of your settings.json file?

@carlos-zamora carlos-zamora added this to the Terminal v1.23 milestone Dec 11, 2024
@lly-c232733
Copy link

UAC:
Image

Settings:

{
    "$help": "https://aka.ms/terminal-documentation",
    "$schema": "https://raw.githubusercontent.com/microsoft/terminal/main/doc/cascadia/profiles.schema.json",
    "actions": [],
    "copyFormatting": "none",
    "copyOnSelect": false,
    "defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
    "keybindings": 
    [
        {
            "id": "Terminal.CopyToClipboard",
            "keys": "ctrl+c"
        },
        {
            "id": "Terminal.PasteFromClipboard",
            "keys": "ctrl+v"
        },
        {
            "id": "Terminal.DuplicatePaneAuto",
            "keys": "alt+shift+d"
        }
    ],
    "newTabMenu": 
    [
        {
            "type": "remainingProfiles"
        }
    ],
    "profiles": 
    {
        "defaults": {},
        "list": 
        [
            {
                "commandline": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
                "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
                "hidden": false,
                "name": "Windows PowerShell"
            },
            {
                "commandline": "%SystemRoot%\\System32\\cmd.exe",
                "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
                "hidden": false,
                "name": "Command Prompt"
            },
            {
                "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
                "hidden": false,
                "name": "PowerShell",
                "source": "Windows.Terminal.PowershellCore"
            },
            {
                "guid": "{2c4de342-38b7-51cf-b940-2309a097f518}",
                "hidden": true,
                "name": "Ubuntu",
                "source": "Windows.Terminal.Wsl"
            },
            {
                "guid": "{17bf3de4-5353-5709-bcf9-835bd952a95e}",
                "hidden": true,
                "name": "Ubuntu-22.04",
                "source": "Windows.Terminal.Wsl"
            },
            {
                "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
                "hidden": false,
                "name": "Azure Cloud Shell",
                "source": "Windows.Terminal.Azure"
            },
            {
                "guid": "{3195db66-1ccf-51f1-a7d7-903b120e7e80}",
                "hidden": false,
                "name": "Developer Command Prompt for VS 2022",
                "source": "Windows.Terminal.VisualStudio"
            },
            {
                "guid": "{bb0022f9-b333-5771-a0a8-d6c450edc62b}",
                "hidden": false,
                "name": "Developer PowerShell for VS 2022",
                "source": "Windows.Terminal.VisualStudio"
            },
            {
                "guid": "{01c82842-7506-59a8-8f62-f21b72def779}",
                "hidden": true,
                "name": "Developer Command Prompt for VS 2019",
                "source": "Windows.Terminal.VisualStudio"
            },
            {
                "guid": "{d6893382-09c1-5805-a942-efd20da6fcf3}",
                "hidden": true,
                "name": "Developer PowerShell for VS 2019",
                "source": "Windows.Terminal.VisualStudio"
            },
            {
                "guid": "{16208362-94fc-5b1f-a491-5b2624d5ab56}",
                "hidden": true,
                "name": "Visual Studio Debug Console",
                "source": "VSDebugConsole"
            },
            {
                "guid": "{51855cb2-8cce-5362-8f54-464b92b32386}",
                "hidden": false,
                "name": "Ubuntu",
                "source": "CanonicalGroupLimited.Ubuntu_79rhkp1fndgsc"
            },
            {
                "guid": "{4ff56d04-d9cf-57ea-bae2-ad396374e7e3}",
                "hidden": false,
                "name": "Ubuntu 22.04.5 LTS",
                "source": "CanonicalGroupLimited.Ubuntu22.04LTS_79rhkp1fndgsc"
            }
        ]
    },
    "schemes": [],
    "themes": []
}

@carlos-zamora carlos-zamora added Product-Terminal The new Windows Terminal. Area-Chat All things LLM or "AI" and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Dec 18, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Tag-Fix Doesn't match tag requirements label Dec 18, 2024
@lly-c232733
Copy link

Any update?

@lly-c232733
Copy link

I just tried today and it worked. I'm not sure what changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Chat All things LLM or "AI" Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

9 participants