Originally created by @slock83 on GitHub (Mar 13, 2024).
Bug Report
Description
Bug Summary:
Since the last release, the chat function does not work anymore.
I backtraced the bug a bit, and it seems to come from the new RAG middleware, an dfound this issue : https://stackoverflow.com/questions/64115628/get-starlette-request-body-in-the-middleware-context
(Commenting pretty much everything in the middleware except the await request.body() still reproduces the bug. Removing it fixes the behavior).
I updated uvicorn, starlette and fastapi to the latest version.
I am running behind a Caddy reverse proxy
Steps to Reproduce:
Try to generate text --> Request stalls and eventually timeouts.
Execution seemingly stops during the "call_next" (prints placed before works, prints placed in the actual called route do not)
Expected Behavior:
The model replies
Actual Behavior:
Nothing, infinite loading.
Environment
Operating System: Linux (ubuntu)
Browser (if applicable): either (tested on various firefox and chrome)
I am running the latest version, installed from scratch (fresh build with bun for the frontend part, freshly updated python env for the backend). Docker is not an option.
I am running the frontend behind a reverse-proxy (caddy).
Reproduction Details
Confirmation:
I have read and followed all the instructions provided in the README.md.
I am on the latest version of both Open WebUI and Ollama.
I have included the browser console logs. (not really useful, request sent, but no reply. No particular error apart from an empty promise on timeout)
I have included the Docker container logs. (not running on docker)
[Include any additional details that may help in understanding and reproducing the issue. This could include specific configurations, error messages, or anything else relevant to the bug.]
Note
If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!
Originally created by @slock83 on GitHub (Mar 13, 2024).
# Bug Report
## Description
**Bug Summary:**
Since the last release, the chat function does not work anymore.
I backtraced the bug a bit, and it seems to come from the new RAG middleware, an dfound this issue :
https://stackoverflow.com/questions/64115628/get-starlette-request-body-in-the-middleware-context
(Commenting pretty much everything in the middleware except the `await request.body()` still reproduces the bug. Removing it fixes the behavior).
I updated uvicorn, starlette and fastapi to the latest version.
I am running behind a Caddy reverse proxy
**Steps to Reproduce:**
Try to generate text --> Request stalls and eventually timeouts.
Execution seemingly stops during the "call_next" (prints placed before works, prints placed in the actual called route do not)
**Expected Behavior:**
The model replies
**Actual Behavior:**
Nothing, infinite loading.
## Environment
- **Operating System:** Linux (ubuntu)
- **Browser (if applicable):** either (tested on various firefox and chrome)
I am running the latest version, installed from scratch (fresh build with bun for the frontend part, freshly updated python env for the backend). Docker is not an option.
I am running the frontend behind a reverse-proxy (caddy).
## Reproduction Details
**Confirmation:**
- [x] I have read and followed all the instructions provided in the README.md.
- [x] I am on the latest version of both Open WebUI and Ollama.
- [x] I have included the browser console logs. (not really useful, request sent, but no reply. No particular error apart from an empty promise on timeout)
- [x] I have included the Docker container logs. (not running on docker)
## Logs and Screenshots
[error_log.txt](https://github.com/open-webui/open-webui/files/14586422/error_log.txt)
## Installation Method
Manual install + caddy reverse proxy
## Additional Information
[Include any additional details that may help in understanding and reproducing the issue. This could include specific configurations, error messages, or anything else relevant to the bug.]
## Note
If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!
I'm unable to reproduce the issue at all here and seems to be working fine on all my of my machines (macos, windows, linux), could you please elaborate more on how one might attempt to reproduce the issue? Keep us updated, Thanks!
@tjbck commented on GitHub (Mar 13, 2024):
I'm unable to reproduce the issue at all here and seems to be working fine on all my of my machines (macos, windows, linux), could you please elaborate more on how one might attempt to reproduce the issue? Keep us updated, Thanks!
I'm running a custom fork, but in order to test, I reverted to the main branch, at commit 7ae4669f35
Everything is mostly stock, I initially disabled the litellm proxy (as it adds a ton of dependencies, including system packages, and it is a non-starter in our environment : we picked open-webui because the dependency list was rather small, since our target is air-gapped and heavily restricted). In order to troubleshoot the issue, I installed it and ran on a fresh pull, still the same issues
Tested with or without the reverse proxy, same result.
Tested with 3 versions of fastapi/uvicorn/starlette (latest, previous stable, and a few months old).
Tested with or without litelllm
After a bit of troubleshooting on my side, the issue seems to come from receiving the body (await request.body()) in the middleware, apparently some people had issues with this in the past (with the same combo uvicorn/fastapi).
Rebuilding completely my python env without using conda fixed the issue however, so maybe conda pinned a dep to an old version...
Closing since it does not come from your side, but I'll explore a bit more on my side.
@slock83 commented on GitHub (Mar 14, 2024):
Of course !
I'm running a custom fork, but in order to test, I reverted to the main branch, at commit 7ae4669f350ad30b44594c5e76759db445d9bf5d
Everything is mostly stock, I initially disabled the litellm proxy (as it adds a ton of dependencies, including system packages, and it is a non-starter in our environment : we picked open-webui because the dependency list was rather small, since our target is air-gapped and heavily restricted). In order to troubleshoot the issue, I installed it and ran on a fresh pull, still the same issues
Tested with or without the reverse proxy, same result.
Tested with 3 versions of fastapi/uvicorn/starlette (latest, previous stable, and a few months old).
Tested with or without litelllm
After a bit of troubleshooting on my side, the issue seems to come from receiving the body (await request.body()) in the middleware, apparently some people had issues with this in the past (with the same combo uvicorn/fastapi).
Rebuilding completely my python env without using conda fixed the issue however, so maybe conda pinned a dep to an old version...
Closing since it does not come from your side, but I'll explore a bit more on my side.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @slock83 on GitHub (Mar 13, 2024).
Bug Report
Description
Bug Summary:
Since the last release, the chat function does not work anymore.
I backtraced the bug a bit, and it seems to come from the new RAG middleware, an dfound this issue :
https://stackoverflow.com/questions/64115628/get-starlette-request-body-in-the-middleware-context
(Commenting pretty much everything in the middleware except the
await request.body()still reproduces the bug. Removing it fixes the behavior).I updated uvicorn, starlette and fastapi to the latest version.
I am running behind a Caddy reverse proxy
Steps to Reproduce:
Try to generate text --> Request stalls and eventually timeouts.
Execution seemingly stops during the "call_next" (prints placed before works, prints placed in the actual called route do not)
Expected Behavior:
The model replies
Actual Behavior:
Nothing, infinite loading.
Environment
I am running the latest version, installed from scratch (fresh build with bun for the frontend part, freshly updated python env for the backend). Docker is not an option.
I am running the frontend behind a reverse-proxy (caddy).
Reproduction Details
Confirmation:
Logs and Screenshots
error_log.txt
Installation Method
Manual install + caddy reverse proxy
Additional Information
[Include any additional details that may help in understanding and reproducing the issue. This could include specific configurations, error messages, or anything else relevant to the bug.]
Note
If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!
@tjbck commented on GitHub (Mar 13, 2024):
I'm unable to reproduce the issue at all here and seems to be working fine on all my of my machines (macos, windows, linux), could you please elaborate more on how one might attempt to reproduce the issue? Keep us updated, Thanks!
@slock83 commented on GitHub (Mar 14, 2024):
Of course !
I'm running a custom fork, but in order to test, I reverted to the main branch, at commit
7ae4669f35Everything is mostly stock, I initially disabled the litellm proxy (as it adds a ton of dependencies, including system packages, and it is a non-starter in our environment : we picked open-webui because the dependency list was rather small, since our target is air-gapped and heavily restricted). In order to troubleshoot the issue, I installed it and ran on a fresh pull, still the same issues
Tested with or without the reverse proxy, same result.
Tested with 3 versions of fastapi/uvicorn/starlette (latest, previous stable, and a few months old).
Tested with or without litelllm
After a bit of troubleshooting on my side, the issue seems to come from receiving the body (await request.body()) in the middleware, apparently some people had issues with this in the past (with the same combo uvicorn/fastapi).
Rebuilding completely my python env without using conda fixed the issue however, so maybe conda pinned a dep to an old version...
Closing since it does not come from your side, but I'll explore a bit more on my side.