Skip to content

How to track down SELF_SIGNED_CERT_IN_CHAIN error when calling Azure OpenAI model deployment? #383

@andrewconnell

Description

@andrewconnell

Working through an issue I can't repro that looks like it may be a network issue...

The same project works fine on some machines, but not others. Usually, this error pops up with NPM installs and proxies, but zero issues there.

This project was created with the ATK and other projects (tabs, bots, and message extensions) created & run on the same work just fine... so does this one, until it tries to call an Azure OpenAI model deployment.

So, the self-signed cert is installed & trusted, and the non-LLM part of the bot works... so... ¯_(ツ)_/¯

Ideas on how to track this down? It appears to be coming from the OpenAI package...

[DEBUG] LightBot/prompt Processing plugins before send (0 plugins found)
[DEBUG] LightBot/prompt System instructions for LLM:
[DEBUG] LightBot/prompt You are an AI agent that can chat with users.
[ERROR] LightBot/model {
[ERROR] LightBot/model   "cause": {
[ERROR] LightBot/model     "message": "request to https://voitanos04-demo-teamsac-resource.openai.azure.com/openai/deployments/Voitanos04-gpt-4o-mini-aaif/chat/completions?api-version=2024-10-21 failed, reason: self-signed certificate in certificate chain",
[ERROR] LightBot/model     "type": "system",
[ERROR] LightBot/model     "errno": "SELF_SIGNED_CERT_IN_CHAIN",
[ERROR] LightBot/model     "code": "SELF_SIGNED_CERT_IN_CHAIN"
[ERROR] LightBot/model   }
[ERROR] LightBot/model }
Error: Connection error.
  at AzureOpenAI.makeRequest (C:\Users\OprWHH1\Documents\Voitanos04d\node_modules\openai\src\core.ts:507:13)
  at processTicksAndRejections (c:\Users\OprWHH1\Documents\Voitanos04d\lib\internal\process\task_queues.js:105:5)
  at async OpenAIChatModel.send (C:\Users\OprWHH1\Documents\Voitanos04d\node_modules\@microsoft\teams.openai\src\chat.ts:131:26)
  at async ChatPrompt.send (C:\Users\OprWHH1\Documents\Voitanos04d\node_modules\@microsoft\teams.ai\src\prompts\chat.ts:236:17)
  at async Array.<anonymous> (C:\Users\OprWHH1\Documents\Voitanos04d\src\app\app.ts:130:7)
  at async ActivityContext.next (C:\Users\OprWHH1\Documents\Voitanos04d\node_modules\@microsoft\teams.apps\src\app.process.ts:107:17)
  at async next (C:\Users\OprWHH1\Documents\Voitanos04d\node_modules\@microsoft\teams.apps\src\app.process.ts:107:17) 
  at async App.$process [as process] (C:\Users\OprWHH1\Documents\Voitanos04d\node_modules\@microsoft\teams.apps\src\app.process.ts:167:15)
  at async App.onActivity (C:\Users\OprWHH1\Documents\Voitanos04d\node_modules\@microsoft\teams.apps\src\app.events.ts:44:3) {status: undefined, headers: undefined, request_id: undefined, error: undefined, code: undefined, …}
[DEBUG] LightBot/http/stream closed with no content

fyi @LochDhu

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions