getcursor / cursor

The AI Code Editor
https://cursor.com
23.93k stars 1.5k forks source link

Extensions not loading in remote container #1382

Open italocjs opened 6 months ago

italocjs commented 6 months ago

What is happening: cursor is not auto-loading the extensions from the .devconainer file, vscode was also not working, but updating to latest stable (1.86.1) fixed it.

Related issues: https://github.com/microsoft/vscode/issues/176678 https://github.com/microsoft/vscode-remote-release/issues/8097 https://github.com/microsoft/vscode-remote-release/issues/9494

Possible solutions:

My current devcontainer.json


{
    "name": "Existing Dockerfile",
    "build": {
        "context": "..",
        "dockerfile": "../Dockerfile"
    },
    "customizations": {
        "vscode": {
            "extensions": [
                "spencerwmiles.vscode-task-buttons"
            ],
            "dev.containers.defaultExtensions": [
                "spencerwmiles.vscode-task-buttons"
            ],
            "settings": {
                "terminal.integrated.cwd": "/app"
            }
        }
    },
    "mounts": [
        "source=${localWorkspaceFolder}/app,target=/app,type=bind,consistency=cached"
    ],
    "workspaceFolder": "/app"
    // "remoteUser": "devcontainer"
    // The rest of your configuration...
}

Github with all my code if needed further inspection (meant to be a env for developing on esp32) https://github.com/italocjs/esp32_italoenv

zolrath commented 5 months ago

I can confirm the same issue!

tsdaemon commented 1 month ago

Same issue for me. devcontainer config:

    "name": "Python 3",
    "image": "mcr.microsoft.com/devcontainers/python:0-3.11",
    "features": {
        "ghcr.io/devcontainers-contrib/features/poetry:2": {}
    },
    "postCreateCommand": "pip install pre-commit && curl -sSL https://install.python-poetry.org | python3 - && poetry install",
    "customizations": {
        "vscode": {
            "extensions": [
                "ms-python.python",
                "ms-python.vscode-pylance",
                "charliermarsh.ruff",
                "ms-python.poetry"
            ],
        }
    },
}

It installs extensions when used with VSCode, and for Cursor I need to install them manually for every rebuild

italocjs commented 1 month ago

While loading from devcontainer did not work at that time, adding a extensions.json file does. I did not try again with devcontainer

example:

{
    // See http://go.microsoft.com/fwlink/?LinkId=827846
    // for the documentation about the extensions.json format
    "recommendations": [
        "ms-vscode.cpptools-extension-pack",
        "spencerwmiles.vscode-task-buttons",
        "maptz.regionfolder",
        "ms-vscode.cpptools",
        "github.vscode-pull-request-github",
        "jsynowiec.vscode-insertdatestring",
        "ms-python.python",
        "ms-python.vscode-pylance"
    ],
    "unwantedRecommendations": [
    ]
}

Version: 0.39.3 VSCode Version: 1.91.1 Commit: 5c6f02b83b0bbdce7811fb295219e9668f58ac90 Date: 2024-08-09T01:17:07.954Z Electron: 29.4.0 ElectronBuildId: undefined Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Windows_NT x64 10.0.22631

tsdaemon commented 1 month ago

While loading from devcontainer did not work at that time, adding a extensions.json file does. I did not try again with devcontainer

example:

{
    // See http://go.microsoft.com/fwlink/?LinkId=827846
    // for the documentation about the extensions.json format
    "recommendations": [
        "ms-vscode.cpptools-extension-pack",
        "spencerwmiles.vscode-task-buttons",
        "maptz.regionfolder",
        "ms-vscode.cpptools",
        "github.vscode-pull-request-github",
        "jsynowiec.vscode-insertdatestring",
        "ms-python.python",
        "ms-python.vscode-pylance"
    ],
    "unwantedRecommendations": [
    ]
}

Version: 0.39.3 VSCode Version: 1.91.1 Commit: 5c6f02b83b0bbdce7811fb295219e9668f58ac90 Date: 2024-08-09T01:17:07.954Z Electron: 29.4.0 ElectronBuildId: undefined Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Windows_NT x64 10.0.22631

Tried that, extensions for python still not installed automatically. Not sure thought that its an expected result for extensions.json.

I have noticed that some extensions are actually installed: for example I have added a jupyter extension, and it installed in a container just fine. So the problem seems to be specific to python extensions for some reason. What I have found in logs:

[2024-08-18T10:22:57.856Z] [10:22:57] Started downloading extension: ms-python.python 2023.14.0 file:///home/vscode/.cursor-server/extensionsCache/cursor-ms-python.python-2023.14.0-universal
[2024-08-18T10:22:57.857Z] [10:22:57] Started downloading extension: dbaeumer.vscode-eslint 3.0.10 file:///home/vscode/.cursor-server/extensionsCache/cursor-dbaeumer.vscode-eslint-3.0.10-universal
[2024-08-18T10:22:57.857Z] [10:22:57] Started downloading extension: charliermarsh.ruff 2024.42.0 file:///home/vscode/.cursor-server/extensionsCache/cursor-charliermarsh.ruff-2024.42.0-linux-x64
[2024-08-18T10:22:57.859Z] [10:22:57] Started downloading extension: ms-toolsai.jupyter 2024.6.0 file:///home/vscode/.cursor-server/extensionsCache/cursor-ms-toolsai.jupyter-2024.6.0-universal
[2024-08-18T10:22:57.860Z] [10:22:57] Started downloading extension: anysphere.pyright 1.1.327 file:///home/vscode/.cursor-server/extensionsCache/cursor-anysphere.pyright-1.1.327-universal
[2024-08-18T10:22:57.861Z] [10:22:57] Started downloading extension: ms-toolsai.jupyter-renderers 1.0.18 file:///home/vscode/.cursor-server/extensionsCache/cursor-ms-toolsai.jupyter-renderers-1.0.18-universal
[2024-08-18T10:22:57.862Z] [10:22:57] Started downloading extension: ms-toolsai.jupyter-keymap 1.1.2 file:///home/vscode/.cursor-server/extensionsCache/cursor-ms-toolsai.jupyter-keymap-1.1.2-universal
[2024-08-18T10:22:57.863Z] [10:22:57] Started downloading extension: ms-toolsai.vscode-jupyter-cell-tags 0.1.9 file:///home/vscode/.cursor-server/extensionsCache/cursor-ms-toolsai.vscode-jupyter-cell-tags-0.1.9-universal
[2024-08-18T10:22:57.864Z] [10:22:57] Started downloading extension: ms-toolsai.vscode-jupyter-slideshow 0.1.6 file:///home/vscode/.cursor-server/extensionsCache/cursor-ms-toolsai.vscode-jupyter-slideshow-0.1.6-universal
[2024-08-18T10:23:00.752Z] [10:23:00] Extension signature verification is not done: ms-toolsai.jupyter-keymap
[2024-08-18T10:23:00.752Z] [10:23:00] Extension signature verification is not done: dbaeumer.vscode-eslint
[2024-08-18T10:23:00.753Z] [10:23:00] Extension signature verification is not done: ms-toolsai.vscode-jupyter-slideshow
[10:23:00] Extension signature verification is not done: ms-toolsai.vscode-jupyter-cell-tags
[2024-08-18T10:23:00.776Z] [10:23:00] Extracted extension to file:///home/vscode/.cursor-server/extensions/ms-toolsai.jupyter-keymap-1.1.2-universal: ms-toolsai.jupyter-keymap
[2024-08-18T10:23:00.793Z] [10:23:00] Extracted extension to file:///home/vscode/.cursor-server/extensions/dbaeumer.vscode-eslint-3.0.10-universal: dbaeumer.vscode-eslint
[2024-08-18T10:23:00.802Z] [10:23:00] Extracted extension to file:///home/vscode/.cursor-server/extensions/ms-toolsai.vscode-jupyter-slideshow-0.1.6-universal: ms-toolsai.vscode-jupyter-slideshow
[2024-08-18T10:23:00.805Z] [10:23:00] Extracted extension to file:///home/vscode/.cursor-server/extensions/ms-toolsai.vscode-jupyter-cell-tags-0.1.9-universal: ms-toolsai.vscode-jupyter-cell-tags
[2024-08-18T10:23:00.947Z] [10:23:00] Renamed to /home/vscode/.cursor-server/extensions/ms-toolsai.jupyter-keymap-1.1.2-universal
[2024-08-18T10:23:01.069Z] [10:23:01] Renamed to /home/vscode/.cursor-server/extensions/ms-toolsai.vscode-jupyter-slideshow-0.1.6-universal
[10:23:01] Renamed to /home/vscode/.cursor-server/extensions/dbaeumer.vscode-eslint-3.0.10-universal
[2024-08-18T10:23:01.069Z] [10:23:01] Renamed to /home/vscode/.cursor-server/extensions/

So, some extensions just fail signature verification.

cfsnate commented 3 weeks ago

+1 same issue