codesandbox / codesandbox-client

An online IDE for rapid web development
https://codesandbox.io
Other
13.13k stars 2.29k forks source link

Codesandbox Projects couldn't open in VS Code #6880

Closed mdtausifiqbal closed 1 year ago

mdtausifiqbal commented 2 years ago

🐛 bug report

Preflight Checklist

Description of the problem

How has this issue affected you? What are you trying to accomplish?

To Reproduce

Link to sandbox: [link]() (optional)

Your Environment

Software Name/Version
Сodesandbox
Browser Chrome
Operating System Windows 10

[19:04:41.182] Log Level: 2 [19:04:41.185] remote-ssh@0.84.0 [19:04:41.186] win32 x64 [19:04:41.245] SSH Resolver called for "ssh-remote+3tmaan.create-react-app-with-absolute-imports.csb-4gi3y9---draft---amazing-flower.csb", attempt 1 [19:04:41.247] "remote.SSH.useLocalServer": false [19:04:41.249] "remote.SSH.showLoginTerminal": false [19:04:41.249] "remote.SSH.remotePlatform": {"mdtausifiqbal.whatsapp-clone.master.csb":"linux","mdtausifiqbal.whatsapp-clone.draft---friendly-satoshi.csb":"linux"} [19:04:41.250] "remote.SSH.path": undefined [19:04:41.250] "remote.SSH.configFile": undefined [19:04:41.251] "remote.SSH.useFlock": true [19:04:41.251] "remote.SSH.lockfilesInTmp": false [19:04:41.252] "remote.SSH.localServerDownload": auto [19:04:41.252] "remote.SSH.remoteServerListenOnSocket": false [19:04:41.253] "remote.SSH.showLoginTerminal": false [19:04:41.253] "remote.SSH.defaultExtensions": [] [19:04:41.254] "remote.SSH.loglevel": 2 [19:04:41.254] "remote.SSH.enableDynamicForwarding": true [19:04:41.255] "remote.SSH.enableRemoteCommand": false [19:04:41.255] "remote.SSH.serverPickPortsFromRange": {} [19:04:41.255] "remote.SSH.serverInstallPath": {} [19:04:41.277] SSH Resolver called for host: 3tmaan.create-react-app-with-absolute-imports.csb-4gi3y9---draft---amazing-flower.csb [19:04:41.278] Setting up SSH remote "3tmaan.create-react-app-with-absolute-imports.csb-4gi3y9---draft---amazing-flower.csb" [19:04:41.301] Using commit id "784b0177c56c607789f9638da7b6bf3230d47a8c" and quality "stable" for server [19:04:41.312] Install and start server if needed [19:04:44.342] Checking ssh with "ssh -V" [19:04:44.468] > OpenSSH_for_Windows_8.1p1, LibreS [19:04:44.469] > SL 3.0.2

[19:04:44.484] Running script with connection command: ssh -T -D 50685 "3tmaan.create-react-app-with-absolute-imports.csb-4gi3y9---draft---amazing-flower.csb" bash [19:04:44.489] Terminal shell path: C:\windows\System32\cmd.exe [19:04:44.900] > ]0;C:\windows\System32\cmd.exe [19:04:44.900] Got some output, clearing connection timeout [19:04:44.947] > ssh: Could not resolve hostname 3tmaan.create-react-app-with-absolute-imports.cs

b-4gi3y9---draft---amazing-flower.csb: No such host is known. [19:04:44.952] > The process tried to write to a nonexistent pipe. [19:04:46.247] "install" terminal command done [19:04:46.249] Install terminal quit with output: b-4gi3y9---draft---amazing-flower.csb: No such host is known. [19:04:46.249] Received install output: b-4gi3y9---draft---amazing-flower.csb: No such host is known. [19:04:46.250] Failed to parse remote port from server output [19:04:46.252] Resolver error: Error: at g.Create (c:\Users\Md Tausif Iqbal.vscode\extensions\ms-vscode-remote.remote-ssh-0.84.0\out\extension.js:1:585222) at t.handleInstallOutput (c:\Users\Md Tausif Iqbal.vscode\extensions\ms-vscode-remote.remote-ssh-0.84.0\out\extension.js:1:583874) at t.tryInstall (c:\Users\Md Tausif Iqbal.vscode\extensions\ms-vscode-remote.remote-ssh-0.84.0\out\extension.js:1:681023) at process.processTicksAndRejections (node:internal/process/task_queues:96:5) at async c:\Users\Md Tausif Iqbal.vscode\extensions\ms-vscode-remote.remote-ssh-0.84.0\out\extension.js:1:643908 at async t.withShowDetailsEvent (c:\Users\Md Tausif Iqbal.vscode\extensions\ms-vscode-remote.remote-ssh-0.84.0\out\extension.js:1:647224) at async t.resolve (c:\Users\Md Tausif Iqbal.vscode\extensions\ms-vscode-remote.remote-ssh-0.84.0\out\extension.js:1:644958) at async c:\Users\Md Tausif Iqbal.vscode\extensions\ms-vscode-remote.remote-ssh-0.84.0\out\extension.js:1:727082 [19:04:46.276] ------

[19:04:46.373] ------

[19:04:46.373] SSH Resolver called for "ssh-remote+3tmaan.create-react-app-with-absolute-imports.csb-4gi3y9---draft---amazing-flower.csb", attempt 2, (Reconnection) [19:04:46.381] SSH Resolver called for host: 3tmaan.create-react-app-with-absolute-imports.csb-4gi3y9---draft---amazing-flower.csb [19:04:46.381] Setting up SSH remote "3tmaan.create-react-app-with-absolute-imports.csb-4gi3y9---draft---amazing-flower.csb" [19:04:46.387] Using commit id "784b0177c56c607789f9638da7b6bf3230d47a8c" and quality "stable" for server [19:04:46.397] Install and start server if needed [19:05:41.590] getPlatformForHost was canceled [19:05:41.591] Resolver error: Error: Connecting was canceled at g.Canceled (c:\Users\Md Tausif Iqbal.vscode\extensions\ms-vscode-remote.remote-ssh-0.84.0\out\extension.js:1:585418) at c:\Users\Md Tausif Iqbal.vscode\extensions\ms-vscode-remote.remote-ssh-0.84.0\out\extension.js:1:643820 at async t.withShowDetailsEvent (c:\Users\Md Tausif Iqbal.vscode\extensions\ms-vscode-remote.remote-ssh-0.84.0\out\extension.js:1:647224) at async t.resolve (c:\Users\Md Tausif Iqbal.vscode\extensions\ms-vscode-remote.remote-ssh-0.84.0\out\extension.js:1:644958) at async c:\Users\Md Tausif Iqbal.vscode\extensions\ms-vscode-remote.remote-ssh-0.84.0\out\extension.js:1:727082 [19:05:41.605] ------

[19:05:41.623] ------

[19:05:41.624] SSH Resolver called for "ssh-remote+3tmaan.create-react-app-with-absolute-imports.csb-4gi3y9---draft---amazing-flower.csb", attempt 3, (Reconnection) [19:05:41.636] SSH Resolver called for host: 3tmaan.create-react-app-with-absolute-imports.csb-4gi3y9---draft---amazing-flower.csb [19:05:41.636] Setting up SSH remote "3tmaan.create-react-app-with-absolute-imports.csb-4gi3y9---draft---amazing-flower.csb" [19:05:41.641] Using commit id "784b0177c56c607789f9638da7b6bf3230d47a8c" and quality "stable" for server [19:05:41.653] Install and start server if needed

CompuIves commented 2 years ago

Interesting, it seems like we didn't update the right SSH config. Could you check whether $HOME\.ssh\config file exists?

mdtausifiqbal commented 2 years ago

Yes it exists with following contents

# CodeSandbox SSH Integration
Include C:\Users\Md Tausif Iqbal\.ssh\csb\config
# End of CodeSandbox SSH Integration
CompuIves commented 2 years ago

Very interesting, I wonder if it's because there are spaces in the path. Will double check.

mdtausifiqbal commented 2 years ago

@CompuIves how to fix that, my username has spaces

what to write in config file?

CompuIves commented 2 years ago

Oh, it automatically closed from the PR I merged. I have committed a potential fix, could you update the VSCode extension of CodeSandbox to 0.2.52 and try again?

mdtausifiqbal commented 2 years ago

Thanks @CompuIves after updating to 0.2.52 fixed my problem, but there is another problem codesandbox icon is not visible in sidebar of vs code, how to fix that.

image

CompuIves commented 2 years ago

Oh, that's very surprising. Could you check what extensions are enabled?

mdtausifiqbal commented 2 years ago

Please see attached screenshot of installed extension that I am using.

image image

CompuIves commented 2 years ago

Very surprising... What do your VSCode settings contain? Maybe the extension is blocked from adding an item. Or the VSCode extension doesn't load, which would be even more surprising.

mdtausifiqbal commented 2 years ago

User Settings json file

{
    "editor.formatOnSave": false,
    "workbench.editorAssociations": {
        "*.ipynb": "jupyter-notebook"
    },
    "explorer.confirmDelete": false,
    "workbench.iconTheme": "material-icon-theme",
    "editor.suggestSelection": "first",
    "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
    "files.exclude": {
        "**/.classpath": true,
        "**/.project": true,
        "**/.settings": true,
        "**/.factorypath": true
    },
    "notebook.cellToolbarLocation": {
        "default": "right",
        "jupyter-notebook": "left"
    },
    "javascript.updateImportsOnFileMove.enabled": "always",
    "thunder-client.codeSnippetLanguage": "curl",
    "editor.minimap.enabled": false,
    "liveSassCompile.settings.excludeList": [

        "**/node_modules/**",
        ".vscode/**"
    ],
    "liveSassCompile.settings.formats": [
        {
            "format": "compressed",
            "extensionName": ".min.css",
            "savePath": "/css"
        }
    ],
    "workbench.colorTheme": "Abyss",
    "[javascript]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "[php]": {
        "editor.defaultFormatter": "bmewburn.vscode-intelephense-client",

    },
    "[json]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "[html]": {
        "editor.defaultFormatter": "vscode.html-language-features"
    },
    "[python]": {
        "editor.defaultFormatter": "ms-python.python"
    },
    "files.associations": {
        "*.html": "html"
    },
    "editor.bracketPairColorization.enabled": true,
    "editor.guides.bracketPairs": "active",
    "prettier.tabWidth": 4,
    "security.workspace.trust.untrustedFiles": "open",
    "emmet.includeLanguages": {
        "javascript": "javascriptreact"
    },
    "remote.SSH.remotePlatform": {
        "mdtausifiqbal.whatsapp-clone.master.csb": "linux",
        "mdtausifiqbal.whatsapp-clone.draft---friendly-satoshi.csb": "linux",
        "mdtausifiqbal.whatsapp-clone.draft---dazzling-carlos.csb": "linux",
        "3tmaan.create-react-app-with-absolute-imports.csb-4gi3y9---draft---amazing-flower.csb": "linux"
    },
    "[css]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    }
}
CompuIves commented 2 years ago

Hmm I can't see anything that would indicate that CodeSandbox extension doesn't activate 🤔 . I will run a test on Windows to be sure, but I'm at a loss why this is happening. If you open the extension view of CodeSandbox, does it say anything? The weird thing is that for the icon to show, we don't have to run any code, it should work automatically and be handled by VSCode when it loads the extension.

mdtausifiqbal commented 2 years ago

@CompuIves I am also surprised that It is working on fine another windows laptop.

kettanaito commented 2 years ago

Does uninstalling and installing the extension again fix the icon issue by any chance?

I'm curious if the extension itself is active despite the invisible icon? You can test that by opening a command palette and typing "CodeSandbox". Are there any commands available once you do?