znck / grammarly

Grammarly for VS Code
https://marketplace.visualstudio.com/items?itemName=znck.grammarly
MIT License
1.63k stars 116 forks source link

Proxy support ? #292

Open Mikaciu opened 2 years ago

Mikaciu commented 2 years ago

Hello,

I have some trouble using the Grammarly VSCode extension on a host behind a corporate proxy.

Extension version: v0.23.6 Pre-Release / Preview The extension is installed on a Linux host I access through the "Remote-SSH" extension. On the remote host is installed a local proxy (CNTLM), which is configured in VSCode through the http.proxy configuration variable.

None of the values in the option http.proxySupport seem to be used by the extension, it only seems to retrieve the JS using a direct connection :

Ready!
[Error - 11:00:31 AM] Server initialization failed.
  Message: Request initialize failed with message: request to https://js.grammarly.com/grammarly-sdk@1.7 failed, reason: connect ETIMEDOUT 52.222.158.17:443
  Code: -32603 
[Error - 11:00:31 AM] Starting client failed
  Message: Request initialize failed with message: request to https://js.grammarly.com/grammarly-sdk@1.7 failed, reason: connect ETIMEDOUT 52.222.158.17:443
  Code: -32603 

Additional analysis :

After having checked /proc/<pid of the znck.grammarly-0.23.6/dist/server/index.node.js process>/environ, I can see the following environment variables are set :

Would it be possible for the extension to handle the proxy configuration ?

Thanks,

BR

JasonCubic commented 1 year ago

Similar here

Ready!
[Error - 12:43:17 PM] Server initialization failed.
  Message: Request initialize failed with message: request to https://js.grammarly.com/grammarly-sdk@1.7 failed, reason: self signed certificate in certificate chain
  Code: -32603 
[Error - 12:43:17 PM] Starting client failed
  Message: Request initialize failed with message: request to https://js.grammarly.com/grammarly-sdk@1.7 failed, reason: self signed certificate in certificate chain
  Code: -32603 
xuestrange commented 1 year ago

Similar here

Ready!
[Error - 16:42:55] Server initialization failed.
  Message: Request initialize failed with message: request to https://js.grammarly.com/grammarly-sdk@1.7 failed, reason: socket hang up
  Code: -32603 
[Error - 16:42:55] Starting client failed
  Message: Request initialize failed with message: request to https://js.grammarly.com/grammarly-sdk@1.7 failed, reason: socket hang up
  Code: -32603 
efekhari27 commented 1 year ago

+1 I am also getting the same error on a Linux host running behind a corporate proxy.

[Error - 10:27:08] Server initialization failed.
  Message: Request initialize failed with message: request to https://js.grammarly.com/grammarly-sdk@1.7 failed, reason: connect ETIMEDOUT 18.164.52.11:443
  Code: -32603 
[Error - 10:27:08] Starting client failed
  Message: Request initialize failed with message: request to https://js.grammarly.com/grammarly-sdk@1.7 failed, reason: connect ETIMEDOUT 18.164.52.11:443
  Code: -32603 
niiccolas commented 11 months ago

+1

Ready!
[Error - 16:46:49] Server initialization failed.
  Message: Request initialize failed with message: fetch failed
  Code: -32603 
[Error - 16:46:49] Starting client failed
  Message: Request initialize failed with message: fetch failed
  Code: -32603 
Karpisek commented 11 months ago

This is a much-needed feature as it is otherwise unusable in a corporate environment...

xuestrange commented 11 months ago

Anyone can submit a PR?

Koushikphy commented 10 months ago

+1

Ready!
[Error - 16:46:49] Server initialization failed.
  Message: Request initialize failed with message: fetch failed
  Code: -32603 
[Error - 16:46:49] Starting client failed
  Message: Request initialize failed with message: fetch failed
  Code: -32603 

]

Having same issue..

andrejpan commented 10 months ago

Another user (on linux and in the company) seeing this error. What exactly changed in last few releases that we are observing this issue?