Uploaded image for project: 'VS Code Extension'
  1. VS Code Extension
  2. VSCODE-182

Certificate file paths for connections are set incorrectly under VSCode in WSL2

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • No version
    • Affects Version/s: 0.2.0
    • Component/s: Connectivity
    • None
    • Environment:
      VScode running in WSL2 (Ubuntu 20.04)
    • 3
    • Not Needed
    • Iteration Papaya

      When running VScode in Ubuntu (under WSL2) it is impossible to specify correct paths to certificates that need to be used to setup an SSL/TLS connection.

      Reproduction:

      1. On Windows setup an Ubuntu 20.04 WSL2 instance and install VScode
      2. On Windows setup an X server
      3. Start VScode with the display set to the windows X server
      4. Assuming the username is bob, create your CA.pem and client.pem in bobs home dir
      5. Install MongoDB VScode plugin and create a connection which specifies the above files

      Outcome:
      Instead of the file paths being set to

      • /home/bob/CA.pem
      • /home/bob/client.pem

      They are set to:

      • /mnt/c/Users/<windows user name>/home/bob/CA.pem
      • /mnt/c/Users/<windows user name>/home/bob/CA.pem

      The connection will fail with file not found. The text is not editable so you can't manually specify the correct path.

      Opening the same files in VScode directly and checking the path returns the correct path, so we appear to be returning the incorrect value from the file dialog. Hopefully we can fix this or allow the user to manually edit the field to the correct values.

      The same files / environment work correctly in Compass so the WSL2 environment should not be an issue (WSL2 = HyperV VM)

            Assignee:
            rhys.howell@mongodb.com Rhys Howell
            Reporter:
            dariuszsq@gmail.com dariuszsq N/A
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: