vscode-yaml icon indicating copy to clipboard operation
vscode-yaml copied to clipboard

No schema being loaded even for .travis.yml

Open sgomez86 opened this issue 4 years ago • 7 comments

I'm pretty sure it must be a problem with all the restrictions I have on my company laptop as on my personal one works flawless and it automacally detected it was ansible and downloaded the schema without me having to configure schemas or anything. Is there any kind of long of the extension?

I just installed on my company laptop the extension after removing the Ansible one and is not working even with the default files that is suppoed to work out of the box like .travil.yml. No autocomplete, no hover.

"On Developer: Show logs" I can see the following warning but nothing else.

[warning] [redhat.vscode-yaml] Accessing a resource scoped configuration without providing a resource is not expected. To get the effective value for '[yaml]', provide the URI of a resource or 'null' for any resource.

If I try to manually map an schema from https://www.schemastore.org/json/ I get the error "unable to get local issuer certificate". As I said, I'm pretty sure is my laptop but I cannot figure out what is the issue. I have tried both, adding the proxy setting being on the company network and without them while being at home.

Setup: VSCode 1.52.1 Windows 10

sgomez86 avatar Jan 12 '21 10:01 sgomez86

We have a fix for:

unable to get local issuer certificate

coming in the next few days (when 0.14.0 is released) and that should fix your issue I believe. I'll let you know when it's released

JPinkney avatar Jan 12 '21 12:01 JPinkney

Thank you very much, I will keep an eye on the updates.

sgomez86 avatar Jan 12 '21 12:01 sgomez86

We've just release vscode-yaml 0.14.0 and it should be available on the marketplace. When you get a chance can you try again and let me know what the result is

JPinkney avatar Jan 12 '21 16:01 JPinkney

Hi,

I just updated and keep with the same issue. If I do not specify an schema nothing seems to work but no error and If I specify one, I get the "unable to get local issuer certificate". This is the schema I added for testing.

"yaml.schemas": { "https://json.schemastore.org/ansible-playbook": ["*.yml"] },

As I said previously I think it might be my our corporate laptop restrictions because I asked a collague to test and is having the same issues but yesterday I installed version 0.13 on my personal laptop and worked like a charm.

sgomez86 avatar Jan 12 '21 16:01 sgomez86

For a workaround if you can access https://json.schemastore.org/ansible-playbook you can download it and then reference it locally in yaml.schemas. So you can do something like:

"yaml.schemas": {
"./schemas/ansible-playbook.yml": ["*.yml"]
},

JPinkney avatar Jan 12 '21 16:01 JPinkney

There is no way to debbug the root cause like logs or similar? I will try that workarround you mentio but I saw that if I put HTTP instead of HTTPS it do works. Unfortunatelly that schema I need tries to download other schema so those fails as it uses https.

With the following schema using http is working OK altough is not the one I need.

"yaml.schemas": { ""http://json.schemastore.org/ansible-role-2.9"": ["*.yml"] },

sgomez86 avatar Jan 12 '21 16:01 sgomez86

Hi!, I am getting this same warning when open an yaml file:

[2022-03-04 08:49:44.144] [exthost] [info] ExtensionService#_doActivateExtension redhat.vscode-yaml, startup: false, activationEvent: 'onLanguage:yaml'
[2022-03-04 08:49:44.484] [exthost] [warning] [redhat.vscode-yaml] Accessing a resource scoped configuration without providing a resource is not expected. To get the effective value for '[yaml]', provide the URI of a resource or 'null' for any resource.

Beside that warning sort/format commands seems to work fine

My current versions are:

# plugin
varsion: v1.4.0
Released on: 10/4/2017, 16:41:49
Last updated: 2/4/2022, 04:16:49
Identifier: redhat.vscode-yaml

# vscode about:
Version: 1.64.2
Commit: f80445acd5a3dadef24aa209168452a3d97cc326
Date: 2022-02-09T22:02:29.527Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Linux x64 5.4.0-100-generic

wences-dc-uba-ar avatar Mar 04 '22 11:03 wences-dc-uba-ar