WassimBenzarti / colab-ssh

Connect to Google Colab using SSH
https://pypi.org/project/colab-ssh/
MIT License
993 stars 127 forks source link

VS Code Integration Broken #86

Closed l-oneil closed 3 years ago

l-oneil commented 3 years ago

Describe the bug The July 27th Release appears to have broken my interaction with VS Code + colab_ssh..

I'm not sure whether this release was required to fix something that had changed on VS Code / Colab side? I have set up my repo exactly as described in your instructions - I have used this colab script 100's of times and it's always worked - it broke on 27th.

To Reproduce Steps to reproduce the behavior: From Colab click either "open in vs code" or Copy-Paste the https address into VS Code "Open Remote Host"

Expected behavior I'd expect it to connect to colab via SSH

Screenshots Here's the view from VS Code: image Screenshot 2021-07-28 at 13 33 55

SSH Log before it times out:

[13:43:37.238] SSH Resolver called for "ssh-remote+https://conversion-city-tones-sewing.trycloudflare.com", attempt 1
[13:43:37.239] "remote.SSH.useLocalServer": true
[13:43:37.239] "remote.SSH.path": undefined
[13:43:37.239] "remote.SSH.configFile": undefined
[13:43:37.239] "remote.SSH.useFlock": true
[13:43:37.239] "remote.SSH.lockfilesInTmp": false
[13:43:37.239] "remote.SSH.localServerDownload": auto
[13:43:37.240] "remote.SSH.remoteServerListenOnSocket": false
[13:43:37.240] "remote.SSH.showLoginTerminal": false
[13:43:37.240] "remote.SSH.defaultExtensions": []
[13:43:37.240] "remote.SSH.loglevel": 2
[13:43:37.240] SSH Resolver called for host: https://conversion-city-tones-sewing.trycloudflare.com
[13:43:37.240] Setting up SSH remote "https://conversion-city-tones-sewing.trycloudflare.com"
[13:43:37.243] Acquiring local install lock: /var/folders/m7/y15hbqns7v5gbmb9ycqrkf7w0000gn/T/vscode-remote-ssh-https:/conversion-city-tones-sewing.trycloudflare.com-install.lock
[13:43:38.745] Starting to look for password prompt from another window

I realise this is likely more an issue on VS Code side, it looks like it's struggling to aquire the lock required to download the .vscode-server package on the remote.

Any suggestions would be much appreciated.

Best, Liam

l-oneil commented 3 years ago

Ok, to follow up this answer has helped me: https://github.com/microsoft/vscode-remote-release/issues/4138#issuecomment-738956513

It seems that the lock that VS Code is trying to aquire here:

[13:43:37.243] Acquiring local install lock: /var/folders/m7/y15hbqns7v5gbmb9ycqrkf7w0000gn/T/vscode-remote-ssh-https:/conversion-city-tones-sewing.trycloudflare.com-install.lock

Is struggling to find the correct path, as it is assuming vscode-remote-ssh-https: is a separate directory due to the / separator.

I have managed to fix the problem by copying in the link without the https:/ into "Connect to Host" e.g. changing this:

https://wright-month-msie-projector.trycloudflare.com

to this, fixed my problem:

wright-month-msie-projector.trycloudflare.com

I think the addition of https in the path to ssh is a new addition added into the July 27th (0.3.17) release? Is this a bug?

WassimBenzarti commented 3 years ago

Hello @l-oneil, Welcome the colab-ssh community!

Thank you for submitting this issue, I will take a look at this in the upcoming days. If anyone can look into this problem I would be happy to accept pull requests.

Have a great day!

WassimBenzarti commented 3 years ago

Currently working on a fix, should be ready in few minutes