void icon indicating copy to clipboard operation
void copied to clipboard

Certificates settings

Open andrewpareles opened this issue 8 months ago • 3 comments

andrewpareles avatar May 14 '25 02:05 andrewpareles

Anyone with cert issues want to test this branch?

andrewpareles avatar May 22 '25 02:05 andrewpareles

Sry, tried for an hour to compile it for the first time, and gave up with issues listed here: https://github.com/voideditor/void/issues/503

nickma82 avatar May 31 '25 14:05 nickma82

I tried this code. This is how I built Void from source on my Intel Mac:

brew install nvm
nvm install node
git clone https://github.com/voideditor/void.git
cd void
git checkout certificates-settings
# install dependencies
npm install
# build react:
npm run buildreact
# build void app:
npm run gulp vscode-darwin-x64

Once it was built, I added my self-signed Root CA, but the chat request to my OpenAI-compatible server (runs on a server on my network) still showed the unable to get local issuer certificate error. This OpenAI-compatible server is setup with TLS and making request with curl do work:

curl https://<my_server>/api/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer <my_token>" -d '{
  "messages": [
    {
      "role": "system",
      "content": "You are a test assistant."
    },
    {
      "role": "user",
      "content": "Testing. Just say hi and nothing else."
    }
  ],
  "model": "<my_model>"
}'
{"id":"chatcmpl-a13ce1d522c54db9968050bcb8f96c43","object":"chat.completion","created":1749058797,"model":"<my_model>","choices":[{"index":0,"message":{"role":"assistant","reasoning_content":"\n\n","content":"\n\nHi","tool_calls":[]},"logprobs":null,"finish_reason":"stop","stop_reason":null}],"usage":{"prompt_tokens":32,"total_tokens":38,"completion_tokens":6,"prompt_tokens_details":null},"prompt_logprobs":null,"kv_transfer_params":null}

I enabled debug logs from View > command palette > Developer: Set log level..., then searched through the whole log folder in ~/Library/Application Support/Void/logs/, but couldn't find any log from this line:

this.logService.debug(`Added ${customCertContents.length} custom certificates to request to ${options.url}`);

I think that if the request service was correctly replaced, and if the LLM requests were using it, this log should be visible.

As a temporary solution, I found a solution that works for me (Void Version: 1.4.1): ignoring certificate issues by starting Void like this:

NODE_TLS_REJECT_UNAUTHORIZED=0 /Applications/Void.app/Contents/MacOS/Electron &> /dev/null

curiouscomputer avatar Jun 04 '25 19:06 curiouscomputer