SnaveSutit / origins-mod-vscode-extension

MIT License
8 stars 3 forks source link

[BUG] Failed to load schemas from the extension: connection reset #54

Open Snapshotlight opened 4 weeks ago

Snapshotlight commented 4 weeks ago

It might be a same bug in #53 but his solution did not work for me so I thought open an independent issue is fine. Describe the bug Whenever I open a json files under origins datapack, I am told that "unable to load schemas from 'https://raw.githubusercontent.com/SnaveSutit/origins-mod-json-schemas/main/schemas/apoli/power_types/fire_projectile.json : read ECONNRESET'" (the original text is Chinese). And the extension does not work either. Even with a VPN in TUN mode the error remains. However, I can directly visit github.com without VPN. The error does not happen before 2.2.0 and happen without an error info before 3.1.0.

To Reproduce As explained above. I dont know whether being in China mainland is a necessary condition.

Expected behavior I hope the extension works at least with a VPN requirement.

Snapshotlight commented 4 weeks ago

With my further testing, I find that in version 3.1.0, the extension could mark and tell the mistakes but failed to show text completion.

SnaveSutit commented 3 weeks ago

China is notorious for it's strict internet policies, so that's what I'm assuming is causing this issue.

SnaveSutit commented 3 weeks ago

I see you mentioned that you tried the solution suggested in #53, and it didn't work.

You downloaded the schemas repo, and linked all of the schemas locally in your user settings?

Snapshotlight commented 3 weeks ago

Not yet since I'm still struggling to understand how to linked schemas locally. "His solution" refers to "using VPN in TUN mode".

I'm quite curious about why this error do not happen before 2.2.0. Anyway, I would try your solution. Thanks a lot.

SnaveSutit commented 3 weeks ago

At the bottom of the other issue I suggested (and included documentation for) the same solution I suggested above: https://github.com/SnaveSutit/origins-mod-vscode-extension/issues/53#issuecomment-2336373203

SnaveSutit commented 3 weeks ago

The reason it happens in newer versions is because I split the VSCode plugin up from the JSON Schemas, they're now stored remotely and have to be fetched from Github. So I don't have to update the VSCode plugin every time I make a small change to the Schemas, they'll just update automatically, even without restarting VSCode.