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

RemoteHub: Continue On from web does not check if git is existing #123492

Closed
Tracked by #160047
aeschli opened this issue May 10, 2021 · 9 comments · Fixed by #159505
Closed
Tracked by #160047

RemoteHub: Continue On from web does not check if git is existing #123492

aeschli opened this issue May 10, 2021 · 9 comments · Fixed by #159505
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug git GIT issues verified Verification succeeded

Comments

@aeschli
Copy link
Contributor

aeschli commented May 10, 2021

I have a brand new Windows install

  • Open a repo using RemoteHub
  • Run Continue On: Clone Repository Locally
  • Nothing happens

Looking in the Dev Tools Console I realize that I don't yet Git installed

-> should show an error message

Or even, deluxe, let me open the Git webpage.

@joyceerhl
Copy link
Contributor

@lszomoru Is this something that would be handled in the git extension since that contributes the clone command?

@lszomoru
Copy link
Member

lszomoru commented Mar 1, 2022

@joyceerhl, yes, that makes sense to me since there is already code that handles the detection of git in the git extension.

@lszomoru lszomoru self-assigned this Mar 1, 2022
@lszomoru lszomoru added the bug Issue identified by VS Code Team member as probable bug label Mar 1, 2022
@lszomoru lszomoru added this to the March 2022 milestone Mar 1, 2022
@lszomoru lszomoru added the git GIT issues label Mar 1, 2022
@lszomoru lszomoru modified the milestones: March 2022, April 2022 Mar 21, 2022
@joaomoreno joaomoreno modified the milestones: April 2022, Backlog Apr 1, 2022
@joyceerhl joyceerhl modified the milestones: Backlog, September 2022 Aug 26, 2022
@joyceerhl
Copy link
Contributor

Today Continue On > clone locally still silently errors out if git is missing. Talked with @digitarald this morning, he mentioned

At minimum I think we could show a dialog with a link to https://aka.ms/vscode-install-git

description: localize('gettingStarted.installGit.description.interpolated', "Install Git to track changes in your projects.\n{0}", Button(localize('installGit', "Install Git"), 'https://aka.ms/vscode-install-git')),

@joyceerhl
Copy link
Contributor

The reason for this happening is that the git uri handler and most git commands are not even registered if git is missing on extension activation

if (!/Git installation not found/.test(err.message || '')) {
throw err;
}

So the window receives focus on the protocol handler invocation but of course nothing is available to handle the uri. I opened a PR to fix this in the git uri handler specifically: #159505

@aeschli
Copy link
Contributor Author

aeschli commented Sep 28, 2022

I still see the problem. Nothing happens after Clone Repository Locally and Open on Desktop
(Remote Repositories v0.21.2022092801)

Dev tools show:

console.ts:137 [Extension Host] Git installation not found. (at console. (/home/aeschli/Downloads/code-insider-x64-1664343998/VSCode-linux-x64/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:90:142292))
console.ts:137 [Extension Host] rejected promise not handled within 1 second: Error: command '_codespaces.setActiveRepository' not found (at console. (/home/aeschli/Downloads/code-insider-x64-1664343998/VSCode-linux-x64/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:90:142292))
console.ts:137 [Extension Host] stack trace: Error: command '_codespaces.setActiveRepository' not found
at S._tryExecuteCommand (vscode-file://vscode-app/home/aeschli/Downloads/code-insider-x64-1664343998…nux-x64/resources/app/out/vs/workbench/workbench.desktop.main.js:1713:3532)
at S.executeCommand (vscode-file://vscode-app/home/aeschli/Downloads/code-insider-x64-1664343998…nux-x64/resources/app/out/vs/workbench/workbench.desktop.main.js:1713:3414) (at console. (/home/aeschli/Downloads/code-insider-x64-1664343998/VSCode-linux-x64/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:90:142292))
log.ts:313 ERR command '_codespaces.setActiveRepository' not found: Error: command '_codespaces.setActiveRepository' not found
at S._tryExecuteCommand (vscode-file://vscode-app/home/aeschli/Downloads/code-insider-x64-1664343998…nux-x64/resources/app/out/vs/workbench/workbench.desktop.main.js:1713:3532)
at S.executeCommand (vscode-file://vscode-app/home/aeschli/Downloads/code-insider-x64-1664343998…nux-x64/resources/app/out/vs/workbench/workbench.desktop.main.js:1713:3414)

@aeschli aeschli reopened this Sep 28, 2022
@aeschli aeschli added the verification-found Issue verification failed label Sep 28, 2022
@joyceerhl
Copy link
Contributor

@aeschli question about your setup, are you connected to a Linux remote in this case?

@joyceerhl
Copy link
Contributor

This works as expected for me on a clean Windows VM with no git installed:

image

@aeschli
Copy link
Contributor Author

aeschli commented Sep 28, 2022

I tested on Linux and to test, I renamed the git symbolic link: sudo mv /usr/bin/git /usr/bin/git2

@joyceerhl joyceerhl changed the title RemoteHub: Continue On does not check if git is existing RemoteHub: Continue On from web does not check if git is existing Sep 28, 2022
@joyceerhl
Copy link
Contributor

Marking this issue (specifically from web to desktop) as verified based on #162235 (comment).

@joyceerhl joyceerhl added verified Verification succeeded and removed verification-found Issue verification failed labels Sep 28, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Nov 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug git GIT issues verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants