Support for VS Code Remote Development

Issue #112 resolved
Jorge Arevalo created an issue

Getting this error message after attaching to a running container (using VSCode remote)

Cannot activate the 'Atlassian for VSCode (Official)' extension because it depends on the 'Git' extension, which is not loaded. Would you like to reload the window to load the extension?

Each time I reload the window, it happens again

Using VSCode insiders. Software versions:

Version: 1.34.0-insider
Commit: 473af338e1bd9ad4d9853933da1cd9d5d9e07dc9
Date: 2019-05-01T05:15:04.403Z
Electron: 3.1.8
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Linux x64 4.15.0-47-generic

Comments (31)

  1. Jorge Arevalo reporter
    • edited description

    Getting this error message attaching to a running container

    Cannot activate the 'Atlassian for VSCode (Official)' extension because it depends on the 'Git' extension, which is not loaded. Would you like to reload the window to load the extension?

    Each time I reload the window, it happens again

    Using VSCode insiders. Software versions:

    Version: 1.34.0-insider
    Commit: 473af338e1bd9ad4d9853933da1cd9d5d9e07dc9
    Date: 2019-05-01T05:15:04.403Z
    Electron: 3.1.8
    Chrome: 66.0.3359.181
    Node.js: 10.2.0
    V8: 6.6.346.32
    OS: Linux x64 4.15.0-47-generic

  2. Pramod Busam Account Deactivated

    @jorgearevalo_reclamador The extension has a dependency on the git extension which is shipped by default with VSCode. Can you try enabling the git extension manually. You can view them by running Extensions: Show Built-in Extensions from the command palette.

    Also can you try running any other git command from the command palette and let us know if that is working correctly?

  3. Jorge Arevalo reporter

    Hi @pbusam thanks for your response.

    Git extension is enabled, and cannot be disabled. But git commands are not working. For example, git log opens a new tab with no output, and git fetch / git pull don’t show output at all.

    I can properly attach to a running container, but extension is not loaded.

    Updated VSCode to the last version. No changes.

    Version: 1.34.20-insider
    Commit: 57b550c559b945eb9d871dbf2b2e4cb9e31e2551

  4. Former user Account Deleted

    @{557058:a30b5736-f3cf-41d7-aad0-99c9ffac78ce} what @Jorge Arevalo is trying to do is running on the VSCode insiders and using the new Remote Development feature. In his case is using Remote Development with containers. What is happening is that VSCode is partially executing on a remote server.

    This what I think is going on, git is running on the remote container and no locally and the Git extension can’t handle that remote connection. So VSCode disables that and “Atlassian for VSCode” will not load

    Here’s some Tips and Tricks

    https://code.visualstudio.com/docs/remote/troubleshooting

    Developing Remote Extensions

    https://code.visualstudio.com/api/advanced-topics/remote-extensions

  5. Jonathan Wingate

    I’m getting this same message, using regular VS Code with the Remote Development. I do not see any helpful output in any debugging or output views.

  6. Jorge Arevalo reporter

    Still happening. I think @{557058:a037002c-3cbb-490f-a7e4-8987b77a7b9d} is right about what’s happening. But can’t confirm it.

  7. Toby Bisco

    I can confirm that I am also getting this same error when trying to use with the “Remote - SSH” VS Code remote development. I’m on a stable build of VS Code:

    Version: 1.35.1 (system setup)
    Commit: c7d83e57cd18f18026a8162d042843bda1bcf21f
    Date: 2019-06-12T14:30:02.622Z
    Electron: 3.1.8
    Chrome: 66.0.3359.181
    Node.js: 10.2.0
    V8: 6.6.346.32
    OS: Windows_NT x64 10.0.18362

  8. Toby Bisco

    @Arturo Linares - Could you please elaborate on “tweaking the Jira login host when prompted”.

    I tried adding the given code block to my settings.json, but this makes no difference. Note that the code-block you’ve pasted is the example from the VSCode remote development article, and hav nothing to do with this Atlassian extension!!

    I have also tried adding "atlassian.atlascode": "ui",` to the remote.extensionKind block, but that makes no difference either.

    Thanks

  9. Toby Bisco

    I may have made some progress…

    1. Add "atlassian.atlascode": "workspace",` to the remote.extensionKind block in settings.json (you’ll need to add the block first if it doesn’t exist)
    2. Install the extension to your remote (SSH) workspace
    3. Close VS Code
    4. Open a new (or existing) local project in VS Code
    5. Add the extension to that project too (which will add it to your host system)
    6. Re-open your remote SSH workspace
    7. You should be prompted to authenticate to Atlassian automatically. If not, click the little “jira” link in the status bar (left-hand-side”
    8. The “Authenticate” button should now work - if you didn’t do the additional step of adding the extension to your host as well, then you’ll find that your browser opens to 127.0.0.1:34145 and then does nothing!

    After the above steps, I thin all is working as expected - but time will tell!

    Otherwise the Jira extension port may need opening between the remote and host.

    UPDATE:

    A better option for steps 3 -5 above is to forward the port to your remote SSH. E.g, BEFORE STEP 1:

    Add a port forward rule to your ssh config. E.g,

    Host localhost
        User root
        HostName 127.0.0.1
        IdentityFile ~/.ssh/id_rsa
        LocalForward 127.0.0.1:31415 127.0.0.1:31415
    

    You should then be able to continue as follows:

    1. Install the extension to your remote (SSH) workspace
    2. Re-load your remote SSH workspace
    3. You should be prompted to authenticate to Atlassian automatically. If not, click the little “jira” link in the status bar (left-hand-side”
    4. Clicking the authenticate button should now work (you’ll get redirected to Atlassian to authenticate)
  10. Nick Mai

    @Toby Bisco Adding "remote.extensionKind": { "atlassian.atlascode": "workspace" } to settings.json and installing the extension again worked great for me- I’d been struggling to get this to work with the WSL Remote extension. Thx!

  11. Jorge Arevalo reporter

    I guess the solution proposed by @Toby Bisco works for SSH connection but not for attaching to a running container (I tried adding "atlassian.atlascode": "workspace",` to the remote.extensionKind block in settings.json but didn’t work)

    Thx anyway!

  12. Vitor Pereira

    This seems to be an easy fix, the package.json just needs a another variable with “extensionKind”: "workspace"

  13. Pramod Busam Account Deactivated

    @Jorge Arevalo Could you try the following steps and let us know if it works?

    • After you attach to a running container, run Preferences: Open settings (JSON) and add the following:
      "remote.extensionKind": {
        "atlassian.atlascode": "workspace"
      },
    
    • Run Remote-Containers: Open Container Configuration File... and add the following to forward the port:
        "appPort": [
            31415
        ]
    
  14. Jorge Arevalo reporter

    @{557058:a30b5736-f3cf-41d7-aad0-99c9ffac78ce} it works!

    I had to restart VSCode after following the steps, but the error message dissapeared. Just a couple of details:

    1. The Jira and Bitbucket (Official) extension (former Atlassian for VSCode extension) wasn’t installed inside the container, but I could install it using the Install in attached container button
    2. After installing the extension, the container configuration file looks like this

    {
        "appPort": [
            31415
        ],
        "workspaceFolder": "MY_WORKSPACE_FOLDER",
        "extensions": [
            "atlassian.atlascode",
            "MORE_EXTENSIONS_HERE",
        ]
    }
    

    Many thanks!

  15. Pramod Busam Account Deactivated

    @Jorge Arevalo Thanks for trying it out. Glad that worked 🙂

    (The port is only used during the authentication flow. So feel free to remove the appPort configuration and add it if you want to authenticate again)

  16. Jorge Arevalo reporter

    @{557058:a30b5736-f3cf-41d7-aad0-99c9ffac78ce} thanks for the tip 🙂

    So, can this ticket be closed as solved?

  17. Pramod Busam Account Deactivated

    @Jorge Arevalo I agree with @Bogdan Calapod. We'll keep this issue open to track the VS Code remote developement support in general.

  18. Pramod Busam Account Deactivated

    We have released version 2.1.2 of the extension which makes it run as a workspace extension by default. The authentication screen also detects if a remote workspace is open and prompts to do authentication in a non-remote workspace. This works because the secrets/passwords are persisted in local OS rather than remote environment https://code.visualstudio.com/api/advanced-topics/remote-extensions#persisting-secrets.

    We are closing this issue. Please report any new issues by creating a new Bitbucket issue or by using the Send Feedback button in the extension's settings screen.

  19. Log in to comment