smallcloudai / refact-vscode

Refact AI: Open-source AI Code assistant with autocompletion, chat, refactoring and more for VS Code
https://refact.ai
BSD 3-Clause "New" or "Revised" License
68 stars 24 forks source link

VS Code doesn't accept SSL certificate #37

Closed oxyplay closed 1 week ago

oxyplay commented 1 year ago

Expected Behavior

After click on "Login / Register" button in sidebar or popup user should be redirected to https://refact.smallcloud.ai site, and after logging in should have confirmation what "Refact extension is authenticated!". VS Code plugin should show countdown and after few seconds user should see his email and plan. VS Code now should have working autocomplete if everything is correctly set in Refact privacy settings. (Privacy button).

Actual behavior

User gets "Refact extension is authenticated!" but VS Code countdown is never ending and user can't see his email and plan in sidebar. Autocomplete not working.

Problem confirmation

When you get similar problem, please open "Developers Tools" in "Help > Toggle Developer Tools" or open Command Palette (Cmd + Shift + P on Mac, Ctrl + Shift + P on Linux/Windows) and type > Toggle Developer Tools and press enter.

You will get Developer Tools window. Please open Console in top bar and you will find error Openssl : error "self signed certificate in certificate chain.

Problem description

Probably this is so called Man-in-the-middle problem in your network. Some of networks like corporate, hotel, public networks or networks behind some government firewalls or other traffic inspection devices have dynamically breaking all traffic by injecting new SSL certificate in chain. VS Code through OpenSSL detects that change in chain and throws error "self signed certificate in certificate chain and refusing to work because your date is not safe.

Problem workaround

We can't find right now 100% working solution right now. Possible workaround is to install VS Code extensions Win-CA for Windows or Mac CA VSCode for Mac. Put Win-CA in Inject to append mode and restart VS Code editor.

Other possible solutions.

Possible VPN or private proxy server will solve issue.

0xJaskeerat commented 1 year ago

Hey @oxyplay , do you have a bounty for this ?

ghost commented 12 months ago

@olegklimov, why is this left without a bounty, looks like a showstopper.