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
Auto complete doesn't work with corporate proxy #285
Comments
Hello @uxkjaer We are using It seems that to support proxies a custom
So the question is if we should created a custom proxyAgent conditionally if certain env varialbes |
Using it may be optimal instead of adding a branch to our code and having to respect multiple |
@uxkjaer this is not a high priority for us as our main scenarios do not include a corporate proxy. Would you be interested in attempting to contribute a PR for this issue? This is the relevant file responsible for fetching the UI5 SDK. |
Hi @bd82 I've forked the repo and are trying to experiment with this. Bear with me, it's my first time doing typescript. I've cloned the repo down, but can't even run the tests as the I get this error: lerna ERR! yarn run test stderr: I created a small test program which shows what would need to be done from our end to make this work. You can check the repo here: |
You need to compile the code first before you can run the tests. |
Also if you run |
…es by custom fetch agent Used HttpProxyAgent and HttpsProxyAgent to fetch language assistant semantic model, if HTTPS_PROXY / HTTP_PROXY env-vars are fix SAP#285
…es by custom fetch agent Used HttpProxyAgent and HttpsProxyAgent to fetch language assistant semantic model, if HTTPS_PROXY / HTTP_PROXY env-vars are set. Also respects NO_PROXY. fix SAP#285
…work behind proxy Added custom agent to fetcher / node-fetch to be able to GET ui5-model behind a proxy (e.g. corporate proxy). Therefore look at environment variables HTTPS_PROXY, HTTP_PROXY and NO_PROXY and respect them depending on request url. fix SAP#285
I tried to provide a fix and created a PR, but i cannot fulfill the lint requirements due a issue with agent-base for http-proxy-agent and https-proxy agent. (Type incompatibility) |
Thanks @ndrsg 👍 I will have a look at your PR. |
how's it going with this issue. It's stopping us for using this excellent extension. I believe many would be in the same boat. |
I'm tired of work arounds with corp proxy. @uxkjaer any progress on using this extension. I try add https://www.npmjs.com/package/node-global-proxy into the extension activate function code and it didn't work for me. :( |
Hello @babuilyas Do you want to try taking over the #302 PR? Cheers. |
@bd82 I think, i will be in position to do so in few days. Getting up with ui5 tooling and fiori tools. |
Great @babuilyas 👍 Feel free to ping me if you have any questions. |
Thanks. Check it out. |
Thanks @babuilyas 👍 I am re-posting your comment here for future reference:
|
Hey, just wondering if this is still a valid work around? I've tried those steps and confirmed the proxy is working but the extension still throws the connection errors from the OP. This extension seems really useful for my team but this is preventing us :/ |
working behind proxy always sucks, so be sure your proxy is used by vs code as well. Try any proxy app like some mentioned in this post. |
I'd like to take another stab at this issue. I've been trying to get the source working so I can debug. However I'm getting TS errors left right and center. Can you provide a readme of how to get it running from the source code to be able to debug and fix. |
Hello @uxkjaer I've replied to your ts-compilation question in the other issue you opened |
hi @bd82, |
@uxkjaer it could be a while before I will have any time to look into this.... |
Hi all, first I want to thank @uxkjaer for his work. I am currently trying to evaluate if the company I am working for should switch to BAS or VSC but without language support I cannot recommend VSCode. The hack did not work for me as well and most developers won't have adminstrative privileges anyway. Is it possible to use a local file? |
node-fetch-with-proxy uses vm2 package which has webpack issues, so using simple-proxy-agent instead SAP#285
node-fetch-with-proxy uses vm2 package which has webpack issues, so using simple-proxy-agent instead SAP#285
Hi All, |
Hi Sharada,
You can try to clone my fork down and build that. This is working for me,
currently waiting on a pull request to complete.
URL https://github.com/uxkjaer/ui5-language-assistant
|
Thank you @uxkjaer! I am able to use the extension now. |
Hi all, |
Check out my pr #435 or clone my repo directly and build to get the vsix. Then install from that. This works with proxy. |
Thanks @uxkjaer, but it's not working for me. Tried:
But it didn't work. Any steps I may have missed? |
Do you have your proxy settings added as environment variables? |
Yes, as windows env variables and even tried it as VS Code level to overwrite it |
The current official version still does not work from behind a proxy for us, so the @uxkjaer fork still seems to be the way to go. A small tweak was required to spec a newer hard-coded UI5 version, as SAP has started removing older libraries from their servers and the version specified in the current fork is no longer available. See our PR #1 to Jakob's fork. |
Related PR #475 |
New related PR is #478 (made a mistake 😒 ) |
I tested this locally with fidder as a proxy and it worked, however spoken to a friend, who tested this at a government client and it's still failing. He installed the vsix from the PR #478 |
Check this out: vscode-ui5-language-assistant-3.2.1-proxy.vsix.zip |
Should be fixed with #483 - waiting for confirmation |
Confirmed with local proxy tests using HTTP Toolkit |
Hi,
Excellent to see SAP taking ownership of these extensions. However the extension doesn't work through corporate proxy, even though it has been added in VS code settings and windows environment variables.
See output below
c:\Users\KjaerJ\AppData\Roaming\Code\User\globalStorage\saposs.vscode-ui5-language-assistant\ui5-resources-cache\1.71.14 will be used to cache UI5 resources
[Error - 9:46:22 am] Request textDocument/hover failed.
Message: Request textDocument/hover failed with message: request to https://sapui5.hana.ondemand.com/1.71.14/test-resources/sap/ca/scfld/md/designtime/api.json failed, reason: connect ETIMEDOUT 23.48.30.95:443
Code: -32603
(node:13616) UnhandledPromiseRejectionWarning: FetchError: request to https://sapui5.hana.ondemand.com/1.71.14/test-resources/sap/ca/scfld/md/designtime/api.json failed, reason: connect ETIMEDOUT 23.48.30.95:443
at ClientRequest. (c:\Users\KjaerJ.vscode\extensions\saposs.vscode-ui5-language-assistant-1.5.1\node_modules@ui5-language-assistant\language-server\dist\server.js:48289:11)
at ClientRequest.emit (events.js:203:13)
at TLSSocket.socketErrorListener (_http_client.js:399:9)
at TLSSocket.emit (events.js:203:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at processTicksAndRejections (internal/process/task_queues.js:77:11)
(node:13616) UnhandledPromiseRejectionWarning: FetchError: request to https://sapui5.hana.ondemand.com/1.71.14/test-resources/sap/ca/scfld/md/designtime/api.json failed, reason: connect ETIMEDOUT 23.48.30.95:443
at ClientRequest. (c:\Users\KjaerJ.vscode\extensions\saposs.vscode-ui5-language-assistant-1.5.1\node_modules@ui5-language-assistant\language-server\dist\server.js:48289:11)
at ClientRequest.emit (events.js:203:13)
at TLSSocket.socketErrorListener (_http_client.js:399:9)
at TLSSocket.emit (events.js:203:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at processTicksAndRejections (internal/process/task_queues.js:77:11)
(node:13616) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:13616) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:13616) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:13616) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:13616) UnhandledPromiseRejectionWarning: FetchError: request to https://sapui5.hana.ondemand.com/1.71.14/test-resources/sap/ca/scfld/md/designtime/api.json failed, reason: connect ETIMEDOUT 23.48.30.95:443
at ClientRequest. (c:\Users\KjaerJ.vscode\extensions\saposs.vscode-ui5-language-assistant-1.5.1\node_modules@ui5-language-assistant\language-server\dist\server.js:48289:11)
at ClientRequest.emit (events.js:203:13)
at TLSSocket.socketErrorListener (_http_client.js:399:9)
at TLSSocket.emit (events.js:203:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at processTicksAndRejections (internal/process/task_queues.js:77:11)
(node:13616) UnhandledPromiseRejectionWarning: FetchError: request to https://sapui5.hana.ondemand.com/1.71.14/test-resources/sap/ca/scfld/md/designtime/api.json failed, reason: connect ETIMEDOUT 23.48.30.95:443
at ClientRequest. (c:\Users\KjaerJ.vscode\extensions\saposs.vscode-ui5-language-assistant-1.5.1\node_modules@ui5-language-assistant\language-server\dist\server.js:48289:11)
at ClientRequest.emit (events.js:203:13)
at TLSSocket.socketErrorListener (_http_client.js:399:9)
at TLSSocket.emit (events.js:203:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at processTicksAndRejections (internal/process/task_queues.js:77:11)
(node:13616) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:13616) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
[Error - 9:46:31 am] Request textDocument/hover failed.
Message: Request textDocument/hover failed with message: request to https://sapui5.hana.ondemand.com/1.71.14/test-resources/sap/ca/scfld/md/designtime/api.json failed, reason: connect ETIMEDOUT 23.48.30.95:443
Code: -32603
[Error - 9:46:32 am] Request textDocument/completion failed.
Message: Request textDocument/completion failed with message: request to https://sapui5.hana.ondemand.com/1.71.14/test-resources/sap/ca/scfld/md/designtime/api.json failed, reason: connect ETIMEDOUT 23.48.30.95:443
Code: -32603
(node:13616) UnhandledPromiseRejectionWarning: FetchError: request to https://sapui5.hana.ondemand.com/1.71.14/test-resources/sap/ca/scfld/md/designtime/api.json failed, reason: connect ETIMEDOUT 23.48.30.95:443
at ClientRequest. (c:\Users\KjaerJ.vscode\extensions\saposs.vscode-ui5-language-assistant-1.5.1\node_modules@ui5-language-assistant\language-server\dist\server.js:48289:11)
at ClientRequest.emit (events.js:203:13)
at TLSSocket.socketErrorListener (_http_client.js:399:9)
at TLSSocket.emit (events.js:203:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at processTicksAndRejections (internal/process/task_queues.js:77:11)
(node:13616) UnhandledPromiseRejectionWarning: FetchError: request to https://sapui5.hana.ondemand.com/1.71.14/test-resources/sap/ca/scfld/md/designtime/api.json failed, reason: connect ETIMEDOUT 23.48.30.95:443
at ClientRequest. (c:\Users\KjaerJ.vscode\extensions\saposs.vscode-ui5-language-assistant-1.5.1\node_modules@ui5-language-assistant\language-server\dist\server.js:48289:11)
at ClientRequest.emit (events.js:203:13)
at TLSSocket.socketErrorListener (_http_client.js:399:9)
at TLSSocket.emit (events.js:203:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at processTicksAndRejections (internal/process/task_queues.js:77:11)
(node:13616) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
(node:13616) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
[Error - 9:48:13 am] Request textDocument/hover failed.
Message: Request textDocument/hover failed with message: request to https://sapui5.hana.ondemand.com/1.71.14/test-resources/sap/ca/scfld/md/designtime/api.json failed, reason: connect ETIMEDOUT 23.48.30.95:443
Code: -32603
(node:13616) UnhandledPromiseRejectionWarning: FetchError: request to https://sapui5.hana.ondemand.com/1.71.14/test-resources/sap/ca/scfld/md/designtime/api.json failed, reason: connect ETIMEDOUT 23.48.30.95:443
at ClientRequest. (c:\Users\KjaerJ.vscode\extensions\saposs.vscode-ui5-language-assistant-1.5.1\node_modules@ui5-language-assistant\language-server\dist\server.js:48289:11)
at ClientRequest.emit (events.js:203:13)
at TLSSocket.socketErrorListener (_http_client.js:399:9)
at TLSSocket.emit (events.js:203:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at processTicksAndRejections (internal/process/task_queues.js:77:11)
(node:13616) UnhandledPromiseRejectionWarning: FetchError: request to https://sapui5.hana.ondemand.com/1.71.14/test-resources/sap/ca/scfld/md/designtime/api.json failed, reason: connect ETIMEDOUT 23.48.30.95:443
at ClientRequest. (c:\Users\KjaerJ.vscode\extensions\saposs.vscode-ui5-language-assistant-1.5.1\node_modules@ui5-language-assistant\language-server\dist\server.js:48289:11)
at ClientRequest.emit (events.js:203:13)
at TLSSocket.socketErrorListener (_http_client.js:399:9)
at TLSSocket.emit (events.js:203:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at processTicksAndRejections (internal/process/task_queues.js:77:11)
(node:13616) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)
(node:13616) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)
(node:13616) UnhandledPromiseRejectionWarning: FetchError: request to https://sapui5.hana.ondemand.com/1.71.14/test-resources/sap/ca/scfld/md/designtime/api.json failed, reason: connect ETIMEDOUT 23.48.30.95:443
at ClientRequest. (c:\Users\KjaerJ.vscode\extensions\saposs.vscode-ui5-language-assistant-1.5.1\node_modules@ui5-language-assistant\language-server\dist\server.js:48289:11)
at ClientRequest.emit (events.js:203:13)
at TLSSocket.socketErrorListener (_http_client.js:399:9)
at TLSSocket.emit (events.js:203:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at processTicksAndRejections (internal/process/task_queues.js:77:11)
(node:13616) UnhandledPromiseRejectionWarning: FetchError: request to https://sapui5.hana.ondemand.com/1.71.14/test-resources/sap/ca/scfld/md/designtime/api.json failed, reason: connect ETIMEDOUT 23.48.30.95:443
at ClientRequest. (c:\Users\KjaerJ.vscode\extensions\saposs.vscode-ui5-language-assistant-1.5.1\node_modules@ui5-language-assistant\language-server\dist\server.js:48289:11)
at ClientRequest.emit (events.js:203:13)
at TLSSocket.socketErrorListener (_http_client.js:399:9)
at TLSSocket.emit (events.js:203:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at processTicksAndRejections (internal/process/task_queues.js:77:11)
(node:13616) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 5)
(node:13616) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 5)
[Error - 9:48:13 am] Request textDocument/completion failed.
Message: Request textDocument/completion failed with message: request to https://sapui5.hana.ondemand.com/1.71.14/test-resources/sap/ca/scfld/md/designtime/api.json failed, reason: connect ETIMEDOUT 23.48.30.95:443
Code: -32603
(node:13616) UnhandledPromiseRejectionWarning: FetchError: request to https://sapui5.hana.ondemand.com/1.71.14/test-resources/sap/ca/scfld/md/designtime/api.json failed, reason: connect ETIMEDOUT 23.48.30.95:443
at ClientRequest. (c:\Users\KjaerJ.vscode\extensions\saposs.vscode-ui5-language-assistant-1.5.1\node_modules@ui5-language-assistant\language-server\dist\server.js:48289:11)
at ClientRequest.emit (events.js:203:13)
at TLSSocket.socketErrorListener (_http_client.js:399:9)
at TLSSocket.emit (events.js:203:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at processTicksAndRejections (internal/process/task_queues.js:77:11)
(node:13616) UnhandledPromiseRejectionWarning: FetchError: request to https://sapui5.hana.ondemand.com/1.71.14/test-resources/sap/ca/scfld/md/designtime/api.json failed, reason: connect ETIMEDOUT 23.48.30.95:443
at ClientRequest. (c:\Users\KjaerJ.vscode\extensions\saposs.vscode-ui5-language-assistant-1.5.1\node_modules@ui5-language-assistant\language-server\dist\server.js:48289:11)
at ClientRequest.emit (events.js:203:13)
at TLSSocket.socketErrorListener (_http_client.js:399:9)
at TLSSocket.emit (events.js:203:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at processTicksAndRejections (internal/process/task_queues.js:77:11)
(node:13616) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 6)
(node:13616) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 6)
The text was updated successfully, but these errors were encountered: