Closed jdb78 closed 8 months ago
Did you set the CHAINLIT_URL
env variable?
Yes. That is set. Otherwise it would also never work. The issue is intermittent, so it works if you just refresh sufficiently often. I am not sure where the error occurs and how to get a proper traceback on it.
The issue might be uvicorn. What seemed to help (tbc) is installing uvicorn with the standard extra. I think this adds httptools and uvloop. Running things now with UVICORN_HTTP=httptools
and UVICORN_TIMEOUT_KEEP_ALIVE=0
and have not seen any issues with new users.
Closing as this has been solved. Thanks for having shared your solution, feel free to re-open if it pops up again.
@jdb78 I am glad I found this thread!! I also am having this issue in Azure App Service.
Just to be clear all you did was set those environment variables in the app service and that fixed it?
This is a strange one and only seems to happen if the app is deployed on Azure App Service. At login, sometimes (not always!), I get a
Invalid HTTP request received.
with status:400 Bad request
. If you refresh long enough, you eventually get logged in.Here is a log with chainlit
1.0.200
where I annonymized some details.You can see that it all passes the oauth callback (which does some additional pulling of data from graphapi) but then seems to error
In the browser the invalid HTTP request looks like this:
Any idea where the issue might come from? / Suggestions how to debug this?