intitni / CopilotForXcode

The first GitHub Copilot, Codeium and ChatGPT Xcode Source Editor Extension
https://copilotforxcode.intii.com
MIT License
7.84k stars 386 forks source link

[Help Wanted]: FetchError when loading Copilot suggestions with proxy #510

Closed dmitryd20 closed 6 months ago

dmitryd20 commented 6 months ago

Before Reporting

Describe your issue

I have been using Copilot for Xcode with proxy for several months and it was working perfectly. At some moment suggestions stopped working. Details:

  1. Application shows "Status: OK" when using proxy.

    Снимок экрана 2024-05-14 в 15 02 33
  2. When triggering suggestions loading from Xcode editor, I see the following two errors from CopilotForXcodeExtensionService:

    • Request Error: (FetchError) Hostname/IP does not match certificate's altnames: Host: copilot-proxy.githubusercontent.com. is not in the cert's altnames: DNS:*.gist.githubusercontent.com, DNS:gist.githubusercontent.com
    • Error on ghost text request: (FetchError) Hostname/IP does not match certificate's altnames: Host: copilot-proxy.githubusercontent.com. is not in the cert's altnames: DNS:*.gist.githubusercontent.com, DNS:gist.githubusercontent.com
  3. All of my iOS teammates have the same error.

  4. My Android teammates use the same proxy with Jetbrains IDE Copilot plugin and it still works without any problems.

What have I tried:

intitni commented 6 months ago

It looks like the language server was trying to access https://copilot-proxy.githubusercontent.com but the certificate was incorrect. What happens if you access it directly in Safari?

How did you setup the proxy? Which version of Node are you using?

If you are using self signed certificate, please use the workaround in this issue.

If you would like to try the latest version of the language server, you can download it from copilot.vim and extract the dist folder into ~/Library/Application\ Support/com.intii.CopilotForXcode/GitHub\ Copilot/executable/copilot

dmitryd20 commented 6 months ago

Tried the latest Language Server version from Copilot.vim v1.31. And it works without any errors/warnings.

So, the reason was inside the Language Server. Thanks for help!