iljapostnovs / VSCodeUI5Plugin

Visual Studio Code Extension for UI5 Development
Apache License 2.0
61 stars 6 forks source link

Error: SAPUI5 Extension Error occurred sending HttpRequest at startup #295

Closed LordMM74 closed 1 year ago

LordMM74 commented 1 year ago

I installed latest verion an get following error:

SAPUI5 Extension error: Error occurred sending HTTP Request. Uri: "https://ui5.sap.com/1.108.3/docs/api/api-index.json". Message: "Unexpected token  in JSON at position 0". Response data: "undefined"

Opening https://ui5.sap.com/1.108.3/docs/api/api-index.json in browser works fine.

CS Code works behing a proxy in our company ... Internet access in VS Code works fine (installing via marketplace, update and other extension works also). Proxy is configured in VS Code.

iljapostnovs commented 1 year ago

Hi,

Please check Readme and let me know if it helps

LordMM74 commented 1 year ago

I did UI5: Clear Cache more than 5 times before opening the issue (with and without restarting vs code).

iljapostnovs commented 1 year ago

Did you try to configure HTTPS_PROXY env variable?

LordMM74 commented 1 year ago

Setting proxy as windows environment variable is not allowed in our company. I tried setting proxy in settings.json in vs code ... but this doesn't change anything.

iljapostnovs commented 1 year ago

Axios is used as HTTP handler for the extension and it uses HTTPS_PROXY env variable automatically, so it should be used for setting the proxy. If your company doesn't allow it, I'm not sure how I can help. Maybe you could connect to another non restricted wi fi and launch the extension. Meanwhile, are you sure that you can't edit env variables? There are two ways to edit them, and usually only one of them is restricted by companies: 1) System env variables, they are usually not editable image

2) Account env variables, they are usually available for editing image

LordMM74 commented 1 year ago

Ok. There will be no fix? Why the extension did not use system proxy or proxy from settings.json in vs code?

We will deinstall the extension … useless for our company.

iljapostnovs commented 1 year ago

Ok. There will be no fix? Why the extension did not use system proxy or proxy from settings.json in vs code?

We will deinstall the extension … useless for our company.

You didn't really answer my question above :)

VSCode extension is based on ui5plugin-linter and ui5plugin-parser packages, which are nodejs apps. Linter can be run separately using command line, and it's a common practice to use HTTP_PROXY and HTTPS_PROXY environment variables for that, moreover, axios is doing it out of the box. Nobody had complains so far. It makes sense to restrict usage of system variables from security perspective, however, I find the idea of restricting account variables for developers highly questionable, there are many tools that requires setting up env. vars. It's the same as restricting construction workers to use hammer or drill because they can get injured or even injure somebody else with it.

However, if there is a necessity of using another ways of setting up the proxy, I can check what I can do.

Just for clarification, what exactly do you mean by "system proxy"? There are many ways of setting up the proxy, so I would like to know what "system proxy" are you talking about.

I assume that "proxy from settings.json" is http.proxy setting, is that correct?

iljapostnovs commented 1 year ago

We will deinstall the extension … useless for our company. If that is your wish, please do. I don't have any intentions to convince anybody to use my extension, which I am developing totally on my own for 4 years already absolutely free of charge ;)

LordMM74 commented 1 year ago

Our company works in health insurance with extremly high security policy. All settings are Manager through policies. Change Environment is permitted.

iljapostnovs commented 1 year ago

Closed because of authors inactivity on answering questions