znck / grammarly

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

unable to get local issuer certificate #243

Open znck opened 2 years ago

znck commented 2 years ago

Discussed in https://github.com/znck/grammarly/discussions/242

Originally posted by **jichunxie** May 9, 2022 I installed the extension in vscode, but the initialization failed. Here is the error message: Request initialize failed with message: request to https://js.grammarly.com/grammarly-sdk@1.7 failed, reason: unable to get local issuer certificate Does anyone know how to solve this issue?
znck commented 2 years ago

@jaguarfi Please provide information to reproduce this.

jichunxie commented 2 years ago

Here is the info. Thanks!

The OS is macOS Monterey version 12.3.1. The machine is MacBook Air M1.

VS Code version: Version: 1.67.0 (Universal) Commit: 57fd6d0195bb9b9d1b49f6da5db789060795de47 Date: 2022-05-04T12:14:47.100Z (6 days ago) Electron: 17.4.1 Chromium: 98.0.4758.141 Node.js: 16.13.0 V8: 9.8.177.13-electron.0 OS: Darwin arm64 21.4.0

Grammarly Extension: v0.16.0

ianldgs commented 2 years ago

I have the same issue, similar setup. Setting NODE_EXTRA_CA_CERTS in my .zshrc doesn't work. Setting NODE_TLS_REJECT_UNAUTHORIZED to 0 does, but IMO is not a nice solution.

mmphego commented 2 years ago

Was this issue ever resolved? I am experiencing it ATM

haydencbarnes commented 1 year ago

@mmphego Still experiencing it here as well. You can use a Docker container to get around it (but that is not really a solution). Another solution would be to work with your cyber/IT team to specifically allow the Grammarly HTTPS calls through whatever security software you are using (but that opens a whole can of worms). The import of certs from #286 should help here if it is merged and it can find your certs at "/path/to/cert.pem."

arminanton commented 1 year ago

I'm experiencing the same. The company I work for uses self signed certs, so I guess my only bypass to allow Grammarly to work would be the NODE_TLS_REJECT_UNAUTHORIZED=0. I'm on Mac as well.

ianldgs commented 1 year ago

By this time I've switched to a self-hosted (local docker) LanguageTool. It's not as good, but at least doesn't send everything I write about the company to a separate server, which might not be allowed in corporate environments. And there's also a vscode extension :)