Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR initialize:initialize: failed to add schemas from catalog #585

Open
Spitfire1900 opened this issue Mar 25, 2024 · 6 comments
Open

Comments

@Spitfire1900
Copy link

Getting the following error in the Even Better TOML LSP output pane:

Even Better TOML: 0.19.2
VSCode: 1.87.2
Windows: 11 (build 22631)

 WARN initialize:initialize: failed to fetch catalog error=error sending request: JsValue(TypeError: fetch failed
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11576:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5))

Caused by:
    JsValue(TypeError: fetch failed
    TypeError: fetch failed
        at Object.fetch (node:internal/deps/undici/undici:11576:11)
        at process.processTicksAndRejections (node:internal/process/task_queues:95:5)) self.root=file:///c%3A/Bitbucket/myproject
ERROR initialize:initialize: failed to add schemas from catalog error=error sending request: JsValue(TypeError: fetch failed
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11576:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)) self.root=file:///c%3A/Bitbucket/myproject
 WARN no notification handler registered method=$/setTrace
@JounQin
Copy link
Collaborator

JounQin commented Mar 26, 2024

That doesn't help anything.

Please provide a minimal but runnable online reproduction.

@Spitfire1900
Copy link
Author

Spitfire1900 commented Mar 26, 2024

Unfortunately, this is all the output that's available in the even better TOML output pane in VScode. I have also been unable to reproduce it on other workstations.

@JounQin
Copy link
Collaborator

JounQin commented Mar 27, 2024

Based on fetch failed, it could just be a request error.

@Spitfire1900
Copy link
Author

I am behind a corporate web proxy in this scope. I've worked with our IT Security department to allow-list the schema catalog, but I can't be certain that the web proxy is the issue when the fetched resource that failed isn't dumped to console.

@Licapule
Copy link

Licapule commented Aug 1, 2024

I have the same trouble for 3 days. I tried to reinstall the plugin, but it doesn't work. I even tried running it on Ubuntu WSL.
Here is all output in vscode output Even Better TOML LSP pane

 INFO registered request handler method="initialize"
 INFO registered request handler method="textDocument/foldingRange"
 INFO registered request handler method="textDocument/documentSymbol"
 INFO registered request handler method="textDocument/formatting"
 INFO registered request handler method="textDocument/completion"
 INFO registered request handler method="textDocument/hover"
 INFO registered request handler method="textDocument/documentLink"
 INFO registered request handler method="textDocument/semanticTokens/full"
 INFO registered request handler method="textDocument/prepareRename"
 INFO registered request handler method="textDocument/rename"
 INFO registered notification handler method="initialized"
 INFO registered notification handler method="textDocument/didOpen"
 INFO registered notification handler method="textDocument/didChange"
 INFO registered notification handler method="textDocument/didSave"
 INFO registered notification handler method="textDocument/didClose"
 INFO registered notification handler method="workspace/didChangeConfiguration"
 INFO registered notification handler method="workspace/didChangeWorkspaceFolders"
 INFO registered request handler method="taplo/convertToJson"
 INFO registered request handler method="taplo/convertToToml"
 INFO registered request handler method="taplo/listSchemas"
 INFO registered request handler method="taplo/associatedSchema"
 INFO registered notification handler method="taplo/associateSchema"
 WARN initialize:initialize: failed to fetch catalog error=error sending request: JsValue(TypeError: fetch failed
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:12293:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5))

Caused by:
    JsValue(TypeError: fetch failed
    TypeError: fetch failed
        at Object.fetch (node:internal/deps/undici/undici:12293:11)
        at process.processTicksAndRejections (node:internal/process/task_queues:95:5)) self.root=file:///c%3A/Users/lic/Documents/Projects/myproject
ERROR initialize:initialize: failed to add schemas from catalog error=error sending request: JsValue(TypeError: fetch failed
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:12293:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)) self.root=file:///c%3A/Users/lic/Documents/Projects/myproject
 WARN update_configuration:initialize: failed to fetch catalog error=error sending request: JsValue(TypeError: fetch failed
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:12293:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5))

Caused by:
    JsValue(TypeError: fetch failed
    TypeError: fetch failed
        at Object.fetch (node:internal/deps/undici/undici:12293:11)
        at process.processTicksAndRejections (node:internal/process/task_queues:95:5)) self.root=root:///
ERROR update_configuration:initialize: failed to add schemas from catalog error=error sending request: JsValue(TypeError: fetch failed
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:12293:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)) self.root=root:///
 WARN update_configuration:initialize: failed to fetch catalog error=error sending request: JsValue(TypeError: fetch failed
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:12293:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5))

Caused by:
    JsValue(TypeError: fetch failed
    TypeError: fetch failed
        at Object.fetch (node:internal/deps/undici/undici:12293:11)
        at process.processTicksAndRejections (node:internal/process/task_queues:95:5)) self.root=file:///c%3A/Users/lic/Documents/Projects/myproject
ERROR update_configuration:initialize: failed to add schemas from catalog error=error sending request: JsValue(TypeError: fetch failed
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:12293:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)) self.root=file:///c%3A/Users/lic/Documents/Projects/myproject
 WARN update_configuration:initialize: failed to fetch catalog error=error sending request: JsValue(TypeError: fetch failed
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:12293:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5))

Caused by:
    JsValue(TypeError: fetch failed
    TypeError: fetch failed
        at Object.fetch (node:internal/deps/undici/undici:12293:11)
        at process.processTicksAndRejections (node:internal/process/task_queues:95:5)) self.root=file:///c%3A/Users/lic/Documents/Projects/myproject
ERROR update_configuration:initialize: failed to add schemas from catalog error=error sending request: JsValue(TypeError: fetch failed
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:12293:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)) self.root=file:///c%3A/Users/lic/Documents/Projects/myproject

There's nothing output in Even Better TOML output pane.

When I modify the config of the plugin, a new warning appears:

 WARN no notification handler registered method=$/setTrace

I have no idea about this problem.

Windows 11, VSCode 1.91.1, Even Better TOML 0.19.2

@nilreml
Copy link

nilreml commented Aug 16, 2024

I'm experiencing the same issue behind a corporate proxy, so I dug in:

The root cause appears to be undici not respecting HTTP_PROXY/NO_PROXY etc. env vars, fixed here.

The fix was released with undici v6.14.0, which in turn made it into nodejs v22.

I reckon upgrading to nodejs v22 should fix the issue (though I'm ill-equipped to do so at this time).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants