Skip to content

The server cannot be started if rootUri is a WSL path #1236

@alisa-zobova

Description

@alisa-zobova

Path to rootUri is correct WSL path, but I got error on initialization:

org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Request initialize failed with message: [UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")

Verbose trace:

[Trace - 08:43:12] Sending request 'initialize - (1)'.
Params: {
  "processId": 9900,
  "rootPath": "//wsl.localhost/Ubuntu/home/alisa/Work/House Caddy/caddy-house-backend",
  "rootUri": "file:////wsl.localhost/Ubuntu/home/alisa/Work/House%20Caddy/caddy-house-backend",
  "capabilities": {
    "workspace": {
      "applyEdit": true,
      "workspaceEdit": {
        "documentChanges": true,
        "resourceOperations": [
          "create",
          "delete",
          "rename"
        ]
      },
      "didChangeConfiguration": {
        "dynamicRegistration": true
      },
      "didChangeWatchedFiles": {
        "dynamicRegistration": true
      },
      "symbol": {},
      "executeCommand": {
        "dynamicRegistration": true
      },
      "workspaceFolders": true,
      "configuration": true,
      "semanticTokens": {
        "refreshSupport": true
      },
      "codeLens": {
        "refreshSupport": true
      },
      "fileOperations": {
        "didRename": true,
        "willRename": true,
        "dynamicRegistration": true
      },
      "inlayHint": {
        "refreshSupport": true
      }
    },
    "textDocument": {
      "synchronization": {
        "willSave": true,
        "willSaveWaitUntil": true,
        "didSave": true
      },
      "completion": {
        "completionItem": {
          "snippetSupport": true,
          "documentationFormat": [
            "markdown",
            "plaintext"
          ],
          "deprecatedSupport": true,
          "resolveSupport": {
            "properties": [
              "documentation",
              "detail",
              "additionalTextEdits"
            ]
          },
          "insertTextModeSupport": {
            "valueSet": [
              1,
              2
            ]
          },
          "labelDetailsSupport": true
        },
        "completionList": {
          "itemDefaults": [
            "editRange"
          ]
        },
        "dynamicRegistration": true
      },
      "hover": {
        "contentFormat": [
          "markdown",
          "plaintext"
        ],
        "dynamicRegistration": true
      },
      "signatureHelp": {
        "signatureInformation": {
          "parameterInformation": {
            "labelOffsetSupport": true
          }
        },
        "dynamicRegistration": true
      },
      "references": {
        "dynamicRegistration": true
      },
      "documentHighlight": {
        "dynamicRegistration": true
      },
      "documentSymbol": {
        "symbolKind": {
          "valueSet": [
            18,
            17,
            5,
            14,
            9,
            10,
            22,
            24,
            8,
            1,
            12,
            11,
            20,
            6,
            2,
            3,
            21,
            16,
            19,
            25,
            4,
            7,
            15,
            23,
            26,
            13
          ]
        },
        "hierarchicalDocumentSymbolSupport": true,
        "dynamicRegistration": true
      },
      "formatting": {
        "dynamicRegistration": true
      },
      "rangeFormatting": {
        "dynamicRegistration": true
      },
      "declaration": {
        "linkSupport": true,
        "dynamicRegistration": true
      },
      "definition": {
        "linkSupport": true,
        "dynamicRegistration": true
      },
      "typeDefinition": {
        "linkSupport": true,
        "dynamicRegistration": true
      },
      "implementation": {
        "linkSupport": true,
        "dynamicRegistration": true
      },
      "codeAction": {
        "codeActionLiteralSupport": {
          "codeActionKind": {
            "valueSet": [
              "quickfix",
              "refactor",
              "refactor.extract",
              "refactor.inline",
              "refactor.rewrite",
              "source",
              "source.organizeImports"
            ]
          }
        },
        "dataSupport": true,
        "resolveSupport": {
          "properties": [
            "edit"
          ]
        },
        "dynamicRegistration": true
      },
      "codeLens": {
        "dynamicRegistration": true
      },
      "documentLink": {
        "dynamicRegistration": true
      },
      "colorProvider": {
        "dynamicRegistration": true
      },
      "rename": {
        "prepareSupport": true,
        "dynamicRegistration": true
      },
      "publishDiagnostics": {
        "relatedInformation": true,
        "tagSupport": {
          "valueSet": [
            1,
            2
          ]
        },
        "codeDescriptionSupport": true,
        "dataSupport": true
      },
      "foldingRange": {
        "dynamicRegistration": true
      },
      "typeHierarchy": {
        "dynamicRegistration": true
      },
      "callHierarchy": {
        "dynamicRegistration": true
      },
      "semanticTokens": {
        "requests": {
          "range": false,
          "full": true
        },
        "tokenTypes": [
          "namespace",
          "type",
          "class",
          "enum",
          "interface",
          "struct",
          "typeParameter",
          "parameter",
          "variable",
          "property",
          "enumMember",
          "event",
          "function",
          "method",
          "macro",
          "keyword",
          "modifier",
          "comment",
          "string",
          "number",
          "regexp",
          "operator",
          "decorator",
          "label"
        ],
        "tokenModifiers": [
          "declaration",
          "definition",
          "readonly",
          "static"
        ],
        "formats": [
          "relative"
        ],
        "multilineTokenSupport": true,
        "serverCancelSupport": true,
        "dynamicRegistration": true
      },
      "inlayHint": {
        "dynamicRegistration": true
      },
      "diagnostic": {
        "relatedDocumentSupport": true,
        "dynamicRegistration": true
      }
    },
    "window": {
      "workDoneProgress": true,
      "showMessage": {},
      "showDocument": {
        "support": true
      }
    },
    "general": {
      "staleRequestSupport": {
        "cancel": true,
        "retryOnContentModified": []
      },
      "positionEncodings": [
        "utf-16"
      ]
    }
  },
  "clientInfo": {
    "name": "PyCharm 2025.2.0.1",
    "version": "PyCharm (build PY-252.23892.515)"
  },
  "trace": "off",
  "workspaceFolders": [
    {
      "uri": "file:////wsl.localhost/Ubuntu/home/alisa/Work/House%20Caddy/caddy-house-backend",
      "name": "caddy-house-backend"
    }
  ]
}


org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Request initialize failed with message: [UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleResponse(RemoteEndpoint.java:209)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:193)
	at com.redhat.devtools.lsp4ij.LanguageServerWrapper.lambda$start$5(LanguageServerWrapper.java:378)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:507)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1491)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:2073)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:2035)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:187)
[Trace - 08:43:13] Received notification 'window/logMessage'
Params: {
  "type": 3,
  "message": "Pyright language server 1.1.404 starting"
}


[Trace - 08:43:13] Received notification 'window/logMessage'
Params: {
  "type": 3,
  "message": "Server root directory: file:///c%3A/Users/zobov/AppData/Local/Programs/Python/Python313/Lib/site-packages/pyright/dist/dist"
}


[Trace - 08:43:13] Received response 'initialize - (1)' in 1003ms.
No response returned.
Error: {
  "code": -32603,
  "message": "Request initialize failed with message: [UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters (\"//\")"
}

[Trace - 08:43:13] Sending request 'shutdown - (2)'.
Params: null


[Trace - 08:43:13] Received response 'shutdown - (2)' in 0ms.
No response returned.


[Trace - 08:43:13] Sending notification 'exit'
Params: null

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions