You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cannot read properties of undefined (reading 'toLocaleLowerCase') #912
EvanChaki (@evchaki) , I really appreciate the effort you put into fixing this bug. I'm curious to know what caused this error. I followed the deployment process as documented, and it seems like others didn't encounter this issue. Did I miss a step somewhere, or could there be some underlying project-specific issues at play?
AI endpoints are set in appsettings.json - This needs to be updated in 2-3 places based on whether you want to use Planner or not. Check these sections - Completion, Embedding and/or Planner
Key for AI resource is set - This can either be set using dotnet secrets or updated in appsettings.json in 2-3 places similar to step 1
Also, are you guys following the README exactly (spinning up the webapi and WebApp locally) or are you using one of the deployment templates to deploy Semantic Kernel to Azure?
You cannot log in to Copilot chat with the same account as the Azure subscription, you need to change another account, otherwise an error will be reported no matter what content is sent
Is there any plan to deploy the configuration on the server? Now it can only be accessed on localhost, but I want to access it through the server IP on the Internet
Also, are you guys following the README exactly (spinning up the webapi and WebApp locally) or are you using one of the deployment templates to deploy Semantic Kernel to Azure?
I get the same problem! I deployed strictly according to README. Is it necessary to deploy the Semantic Kernel to Azure and then deploy the copilot chat locally?Or simply deploy the copilot chat app locally?
I get the same problem! I deployed strictly according to README. Is it necessary to deploy the Semantic Kernel to Azure and then deploy the copilot chat locally?Or simply deploy the copilot chat app locally?
Hey Tangroo (@Tangroo), It is not necessary to deploy the webapi to Azure, running it locally should work fine!
In the second requirement, it says that you need to configure the Azure Functions Core Tools. Do you need to deploy this tool locally ahead of time? Despite installing the tool, I still see the same error message.
Copilot Chat actually doesn't require Azure Functions Core Tools (our bad, we should update the documentation). The other sample apps leverage the KernelHttpServer as the service API, and it's deployed against Azure Function Runtime, so those tools are required there to run the service locally. Copilot uses an Asp.Net web application to expose SK APIs.
cooptestTangroo (@Tangroo) I'm unable to reproduce this issue. Do you guys have the latest changes pulled? We've pushed a lot of bug fixes in the past week
Yes, I pulled the latest code and cloned it again yesterday. However, if I redeploy it, I will still report the same error.
cooptestTangroo (@Tangroo) I'm unable to reproduce this issue. Do you guys have the latest changes pulled? We've pushed a lot of bug fixes in the past week
Yes, I pulled the latest code and cloned it again yesterday. However, if I redeploy it, I will still report the same error.
Can you send a screenshot of the error? We no longer have the getAudienceMemberForId method, so I’m wondering what the stack looks like now.
the webapi started successfully.
When the webapp is just opened, it is also in a normal state
When I send a message to it, it jumps directly to this error page
cooptestTangroo (@Tangroo) I'm unable to reproduce this issue. Do you guys have the latest changes pulled? We've pushed a lot of bug fixes in the past week
No, I changed a Microsoft account and logged in to Copilot Chat again, it can run successfully and receive a reply
cooptestTangroo (@Tangroo) I'm unable to reproduce this issue. Do you guys have the latest changes pulled? We've pushed a lot of bug fixes in the past week
No, I changed a Microsoft account and logged in to Copilot Chat again, it can run successfully and receive a reply
I changed a Microsoft account and logged in to Copilot Chat again, but cant connect to <api.openai.com>
fail: Microsoft.SemanticKernel.IKernel[0] Error executing request, max retry count reached. Reason: System.Net.Http.HttpRequestException System.Net.Http.HttpRequestException: (api.openai.com:443) ---> System.Net.Sockets.SocketException (10060): at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken) at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) at System.Net.Sockets.Socket.g__WaitForConnectWithCancellation|277_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request) at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at Microsoft.SemanticKernel.Reliability.DefaultHttpRetryHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) warn: Microsoft.SemanticKernel.IKernel[0]
Hi Codingsaikou, this seems like a separate issue related to OpenAI capacity. OpenAI might have been throttled at the time you tried to connect. Can you try again? If the issue persists, please open another issue thread for help. Thanks!
Turns out Msal doesn't require "name" as a required property on the account, so when it was undefined (as it is for most personal accounts), we'd see the null pointer error when trying to parse the value on the front and backend.
I've implemented a solution that falls back to the account username if the name property is empty, so your personal accounts should work with Copilot chat now.
Thanks for calling this to our attention and all of your help in debugging! Closing this issue. Please reopen if the problem persists.
Activity
hunk-fe commentedon May 11, 2023
I get the same problem!
hedaiping commentedon May 11, 2023
i got same problem
evchaki commentedon May 11, 2023
doolachen (@doolachen) , thank you for bringing this up. We have logged a bug and are working to fix it.
BeiPoer commentedon May 12, 2023
i got same problem
doolachen commentedon May 12, 2023
EvanChaki (@evchaki) , I really appreciate the effort you put into fixing this bug. I'm curious to know what caused this error. I followed the deployment process as documented, and it seems like others didn't encounter this issue. Did I miss a step somewhere, or could there be some underlying project-specific issues at play?
cooptest commentedon May 12, 2023
doolachen (@doolachen) There is no such error when I switch to the edge browser, but the message robot does not reply
cooptest commentedon May 12, 2023
doolachen (@doolachen) 换成edge浏览器不会报错,但是给机器人发消息它不回复
hathind-ms commentedon May 16, 2023
Can you please confirm the following:
appsettings.json- This needs to be updated in 2-3 places based on whether you want to use Planner or not. Check these sections -Completion,Embeddingand/orPlannerdotnet secretsor updated inappsettings.jsonin 2-3 places similar to step 1Reference this ReadMe for more details: https://github.com/microsoft/semantic-kernel/blob/main/samples/apps/copilot-chat-app/README.md
teresaqhoang commentedon May 16, 2023
Hi doolachen (@doolachen), hunk (@hunk-fe), @daiping0323, @forczc, AND cooptest, do you see a screen that says
Semantic Kernel service up and runningwhen you navigate to https://localhost:40443/probe?Also, are you guys following the README exactly (spinning up the webapi and WebApp locally) or are you using one of the deployment templates to deploy Semantic Kernel to Azure?
cooptest commentedon May 17, 2023
Deploy and install locally (http://localhost:3000)
I can start successfully and get a response
You cannot log in to Copilot chat with the same account as the Azure subscription, you need to change another account, otherwise an error will be reported no matter what content is sent
Is there any plan to deploy the configuration on the server? Now it can only be accessed on localhost, but I want to access it through the server IP on the Internet
Tangroo commentedon May 18, 2023
I get the same problem! I deployed strictly according to README. Is it necessary to deploy the Semantic Kernel to Azure and then deploy the copilot chat locally?Or simply deploy the copilot chat app locally?
Tangroo commentedon May 18, 2023
https://github.com/microsoft/semantic-kernel#sample-apps-
In the second requirement, it says that you need to configure the Azure Functions Core Tools. Do you need to deploy this tool locally ahead of time? Despite installing the tool, I still see the same error message.
teresaqhoang commentedon May 18, 2023
Hey Tangroo (@Tangroo), It is not necessary to deploy the webapi to Azure, running it locally should work fine!
Copilot Chat actually doesn't require Azure Functions Core Tools (our bad, we should update the documentation). The other sample apps leverage the KernelHttpServer as the service API, and it's deployed against Azure Function Runtime, so those tools are required there to run the service locally. Copilot uses an Asp.Net web application to expose SK APIs.
2 remaining items
Tangroo commentedon May 19, 2023
Yes, I pulled the latest code and cloned it again yesterday. However, if I redeploy it, I will still report the same error.
teresaqhoang commentedon May 19, 2023
Can you send a screenshot of the error? We no longer have the getAudienceMemberForId method, so I’m wondering what the stack looks like now.
Tangroo commentedon May 19, 2023
the webapi started successfully.
When the webapp is just opened, it is also in a normal state
When I send a message to it, it jumps directly to this error page
BeiPoer commentedon May 19, 2023
I have the same issue as Tangroo (@Tangroo), and I noticed there is an error with this request on the network.

ur: https://localhost:40443/chat
coopliu commentedon May 19, 2023
No, I changed a Microsoft account and logged in to Copilot Chat again, it can run successfully and receive a reply

BeiPoer commentedon May 19, 2023
me too
teresaqhoang commentedon May 19, 2023
What kind of accounts were you using before? Personal? @forczc Tangroo (@Tangroo)
BeiPoer commentedon May 20, 2023
yes,Personal
Codingsaikou commentedon May 22, 2023
I changed a Microsoft account and logged in to Copilot Chat again, but cant connect to <api.openai.com>
fail: Microsoft.SemanticKernel.IKernel[0]
Error executing request, max retry count reached. Reason: System.Net.Http.HttpRequestException
System.Net.Http.HttpRequestException: (api.openai.com:443)
---> System.Net.Sockets.SocketException (10060):
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
at System.Net.Sockets.Socket.g__WaitForConnectWithCancellation|277_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request)
at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at Microsoft.SemanticKernel.Reliability.DefaultHttpRetryHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
warn: Microsoft.SemanticKernel.IKernel[0]
Fallback to username (email) if name is not available on msal account…
teresaqhoang commentedon May 22, 2023
Hi Codingsaikou, this seems like a separate issue related to OpenAI capacity. OpenAI might have been throttled at the time you tried to connect. Can you try again? If the issue persists, please open another issue thread for help. Thanks!
teresaqhoang commentedon May 22, 2023
Hi doolachen (@doolachen), hunk (@hunk-fe), @daiping0323, @forczc, cooptest, I just merged a fix into main to solve this issue.
Turns out Msal doesn't require "name" as a required property on the account, so when it was undefined (as it is for most personal accounts), we'd see the null pointer error when trying to parse the value on the front and backend.
I've implemented a solution that falls back to the account username if the name property is empty, so your personal accounts should work with Copilot chat now.
Thanks for calling this to our attention and all of your help in debugging! Closing this issue. Please reopen if the problem persists.
Fallback to username (email) if name is not available on msal account…
Fallback to username (email) if name is not available on msal account…