microsoft / microsoft/simplechat
500 Internal Server Error on login related to Redis auth
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 152
- Forks
- 116
- Avg merge
- 7h 7m
- Merged PRs (30d)
- 122
Description
I am using SimpleChat with a "custom" Azure_Environment. The start page appears and when I click Login I get an HTTP 500 error, Internal Server Error, on https://appsc.appservice.customdomain/getAToken.
I am using Managed Identity with Redis.
The App Service Log Stream shows no errors.
App Insights has the error:
ClientAuthenticationError
Exception on /robots933456.txt [GET]
Traceback (most recent call last):
File "/app/venv/lib/python3.13/site-packages/flask/app.py", line 2529, in wsgi_app
response = self.full_dispatch_request()
File "/app/venv/lib/python3.13/site-packages/flask/app.py", line 1815, in full_dispatch_request
self.ensure_sync(func)()
File "/app/app.py", line 89, in before_first_request
token = credential.get_token(f"https://{redis_hostname}.{REDIS_URL_VALUE}:10225/appid")
15 more lines...
I am using custom endpoints, where REDIS_URL_VALUE equals the App Service environment variable CUSTOM_REDIS_URL_VALUE. I've tried these variations on CUSTOM_REDIS_URL_VALUE to no avail:
- cacheinfra.windows.net
- cacheinfra.customdomain
- cacheinfra.cloudapi.customdomain
At this point, the SimpleChat UI doesn't come up so I can change the Redis auth back to keys.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in /app/app.py at before_first_request, especially the credential.get_token call that builds the Redis endpoint from REDIS_URL_VALUE, and review the custom endpoint values in the issue. Reproduce the custom Azure environment login flow and verify that /getAToken no longer returns HTTP 500 or produces ClientAuthenticationError in App Insights.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, flask, python, redis
- Domain
- authentication, backend, cloud, database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100