[GH-ISSUE #5226] When I trying to reopen the chat, I can see the history but I cannot send any message anymore #13903

Closed
opened 2026-04-19 20:27:11 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @plutozhang99 on GitHub (Sep 6, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/5226

Bug Report

Installation Method:Docker

Environment

  • Open WebUI Version: : v0.3.16

  • Ollama (if applicable): v0.3.9

  • Operating System: Ubuntu 20.04

  • **Browser (if applicable):**Chrome Version 128.0.6613.114

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.
  • [ x ] I have included the Docker container logs.
  • [ x ] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

Expected Behavior:

When I trying to reopen the chat, I can see the history but I cannot send any message anymore

Actual Behavior:

Click the history chat, send message again, error happened

Description

Bug Summary:
When I try to reopen the chat, I can see the history but I cannot send any message anymore, some times, it will also freeze the page

Reproduction Details

Steps to Reproduce:
[Outline the steps to reproduce the bug. Be as detailed as possible.]

Logs and Screenshots

Browser Console Logs:
submitPrompt 3135c32c-3e11-43de-b393-eaac77897aa3

Docker Container Logs:
INFO: 70.28.125.226:0 - "POST /api/chat/completed HTTP/1.1" 500 Internal Server Error
ERROR: Exception in ASGI application

  • Exception Group Traceback (most recent call last):
    | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 87, in collapse_excgroups
    | yield
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 190, in call
    | async with anyio.create_task_group() as task_group:
    | File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 680, in aexit
    | raise BaseExceptionGroup(
    | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
    +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    | File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 401, in run_asgi
    | result = await app( # type: ignore[func-returns-value]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in call
    | return await self.app(scope, receive, send)
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in call
    | await super().call(scope, receive, send)
    | File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 123, in call
    | await self.middleware_stack(scope, receive, send)
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in call
    | raise exc
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in call
    | await self.app(scope, receive, _send)
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in call
    | with collapse_excgroups():
    | File "/usr/local/lib/python3.11/contextlib.py", line 158, in exit
    | self.gen.throw(typ, value, traceback)
    | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    | raise exc
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in call
    | response = await self.dispatch_func(request, call_next)
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/app/backend/main.py", line 790, in update_embedding_function
    | response = await call_next(request)
    | ^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
    | raise app_exc
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
    | await self.app(scope, receive_or_disconnect, send_no_error)
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in call
    | with collapse_excgroups():
    | File "/usr/local/lib/python3.11/contextlib.py", line 158, in exit
    | self.gen.throw(typ, value, traceback)
    | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    | raise exc
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in call
    | response = await self.dispatch_func(request, call_next)
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/app/backend/main.py", line 781, in check_url
    | response = await call_next(request)
    | ^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
    | raise app_exc
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
    | await self.app(scope, receive_or_disconnect, send_no_error)
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in call
    | with collapse_excgroups():
    | File "/usr/local/lib/python3.11/contextlib.py", line 158, in exit
    | self.gen.throw(typ, value, traceback)
    | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    | raise exc
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in call
    | response = await self.dispatch_func(request, call_next)
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/app/backend/main.py", line 767, in commit_session_after_request
    | response = await call_next(request)
    | ^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
    | raise app_exc
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
    | await self.app(scope, receive_or_disconnect, send_no_error)
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 93, in call
    | await self.simple_response(scope, receive, send, request_headers=headers)
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 148, in simple_response
    | await self.app(scope, receive, send)
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in call
    | with collapse_excgroups():
    | File "/usr/local/lib/python3.11/contextlib.py", line 158, in exit
    | self.gen.throw(typ, value, traceback)
    | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    | raise exc
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in call
    | response = await self.dispatch_func(request, call_next)
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/app/backend/main.py", line 713, in dispatch
    | return await call_next(request)
    | ^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
    | raise app_exc
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
    | await self.app(scope, receive_or_disconnect, send_no_error)
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in call
    | with collapse_excgroups():
    | File "/usr/local/lib/python3.11/contextlib.py", line 158, in exit
    | self.gen.throw(typ, value, traceback)
    | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    | raise exc
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in call
    | response = await self.dispatch_func(request, call_next)
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/app/backend/main.py", line 507, in dispatch
    | return await call_next(request)
    | ^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
    | raise app_exc
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
    | await self.app(scope, receive_or_disconnect, send_no_error)
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 65, in call
    | await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
    | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    | raise exc
    | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    | await app(scope, receive, sender)
    | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 756, in call
    | await self.middleware_stack(scope, receive, send)
    | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 776, in app
    | await route.handle(scope, receive, send)
    | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 297, in handle
    | await self.app(scope, receive, send)
    | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 77, in app
    | await wrap_app_handling_exceptions(app, request)(scope, receive, send)
    | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    | raise exc
    | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    | await app(scope, receive, sender)
    | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 72, in app
    | response = await func(request)
    | ^^^^^^^^^^^^^^^^^^^
    | File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 278, in app
    | raw_response = await run_endpoint_function(
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
    | return await dependant.call(**values)
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/app/backend/main.py", line 1070, in chat_completed
    | "session_id": data["session_id"],
    | ~~~~^^^^^^^^^^^^^^
    | KeyError: 'session_id'
    +------------------------------------

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 401, in run_asgi
result = await app( # type: ignore[func-returns-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in call
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in call
await super().call(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 123, in call
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in call
raise exc
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in call
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in call
with collapse_excgroups():
File "/usr/local/lib/python3.11/contextlib.py", line 158, in exit
self.gen.throw(typ, value, traceback)
File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
raise exc
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in call
response = await self.dispatch_func(request, call_next)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/main.py", line 790, in update_embedding_function
response = await call_next(request)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
raise app_exc
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in call
with collapse_excgroups():
File "/usr/local/lib/python3.11/contextlib.py", line 158, in exit
self.gen.throw(typ, value, traceback)
File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
raise exc
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in call
response = await self.dispatch_func(request, call_next)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/main.py", line 781, in check_url
response = await call_next(request)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
raise app_exc
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in call
with collapse_excgroups():
File "/usr/local/lib/python3.11/contextlib.py", line 158, in exit
self.gen.throw(typ, value, traceback)
File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
raise exc
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in call
response = await self.dispatch_func(request, call_next)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/main.py", line 767, in commit_session_after_request
response = await call_next(request)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
raise app_exc
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 93, in call
await self.simple_response(scope, receive, send, request_headers=headers)
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 148, in simple_response
await self.app(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in call
with collapse_excgroups():
File "/usr/local/lib/python3.11/contextlib.py", line 158, in exit
self.gen.throw(typ, value, traceback)
File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
raise exc
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in call
response = await self.dispatch_func(request, call_next)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/main.py", line 713, in dispatch
return await call_next(request)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
raise app_exc
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in call
with collapse_excgroups():
File "/usr/local/lib/python3.11/contextlib.py", line 158, in exit
self.gen.throw(typ, value, traceback)
File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
raise exc
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in call
response = await self.dispatch_func(request, call_next)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/main.py", line 507, in dispatch
return await call_next(request)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
raise app_exc
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 65, in call
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
raise exc
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 756, in call
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 776, in app
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 297, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 77, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
raise exc
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 72, in app
response = await func(request)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 278, in app
raw_response = await run_endpoint_function(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
return await dependant.call(**values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/main.py", line 1070, in chat_completed
"session_id": data["session_id"],
~~~~^^^^^^^^^^^^^^
KeyError: 'session_id'
INFO: 70.28.125.226:0 - "POST /api/v1/chats/791db5e6-0d7f-4dfb-9cac-8e38e9491fec HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "POST /api/v1/chats/791db5e6-0d7f-4dfb-9cac-8e38e9491fec HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK
generate_title
chatgpt-4o-latest
INFO: 70.28.125.226:0 - "POST /api/task/title/completions HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "POST /api/v1/chats/791db5e6-0d7f-4dfb-9cac-8e38e9491fec HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /ws/socket.io/?EIO=4&transport=polling&t=P77ymkr&sid=vBS1qi_uMYNZ2zmcAAFP HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "POST /ws/socket.io/?EIO=4&transport=polling&t=P77ysq2&sid=vBS1qi_uMYNZ2zmcAAFP HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /ws/socket.io/?EIO=4&transport=polling&t=P77ysq3&sid=vBS1qi_uMYNZ2zmcAAFP HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "POST /ws/socket.io/?EIO=4&transport=polling&t=P77yyxx&sid=vBS1qi_uMYNZ2zmcAAFP HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /ws/socket.io/?EIO=4&transport=polling&t=P77yyxy&sid=vBS1qi_uMYNZ2zmcAAFP HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /ws/socket.io/?EIO=4&transport=polling&t=P77y-5x&sid=vBS1qi_uMYNZ2zmcAAFP HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "POST /ws/socket.io/?EIO=4&transport=polling&t=P77z33j&sid=vBS1qi_uMYNZ2zmcAAFP HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /c/8821e649-202c-4dab-8e8a-765c136cb722 HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /api/config HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /manifest.json HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /ws/socket.io/?EIO=4&transport=polling&t=P77z4S9 HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /api/v1/auths/ HTTP/1.1" 200 OK
user Pluto(893e15b1-f2a5-4f2d-bbb0-a88894989054) connected with session ID ZWhwQmuiK5SCU7aFAAFS
INFO: 70.28.125.226:0 - "GET /ws/socket.io/?EIO=4&transport=polling&t=P77z33k&sid=vBS1qi_uMYNZ2zmcAAFP HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /ws/socket.io/?EIO=4&transport=polling&t=P77z4TM&sid=KjTHho69FhywA_o4AAFR HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "POST /ws/socket.io/?EIO=4&transport=polling&t=P77z4TL&sid=KjTHho69FhywA_o4AAFR HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /api/config HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /ws/socket.io/?EIO=4&transport=websocket&sid=KjTHho69FhywA_o4AAFR HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /api/changelog HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /api/v1/users/user/settings HTTP/1.1" 200 OK
INFO [apps.openai.main] get_all_models()
INFO: 70.28.125.226:0 - "GET /api/v1/documents/ HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /api/v1/prompts/ HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /api/v1/chats/tags/all HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /api/v1/configs/banners HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /api/v1/tools/ HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /api/v1/functions/ HTTP/1.1" 200 OK
INFO [apps.ollama.main] get_all_models()
INFO: 70.28.125.226:0 - "GET /api/models HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /api/v1/chats/8821e649-202c-4dab-8e8a-765c136cb722 HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "POST /api/v1/chats/tags HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /api/v1/chats/8821e649-202c-4dab-8e8a-765c136cb722/tags HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /api/v1/users/user/settings HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /api/v1/chats/?page=2 HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /ollama/api/version HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /ollama/api/version HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /ollama/api/version HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /api/v1/chats/791db5e6-0d7f-4dfb-9cac-8e38e9491fec HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /api/v1/chats/791db5e6-0d7f-4dfb-9cac-8e38e9491fec/tags HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /api/v1/users/user/settings HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /api/v1/chats/791db5e6-0d7f-4dfb-9cac-8e38e9491fec/tags HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /api/v1/chats/791db5e6-0d7f-4dfb-9cac-8e38e9491fec/tags HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "DELETE /api/v1/chats/791db5e6-0d7f-4dfb-9cac-8e38e9491fec HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /api/v1/chats/?page=2 HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /ollama/api/version HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /api/v1/users/user/settings HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "POST /api/v1/chats/tags HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /api/v1/chats/8821e649-202c-4dab-8e8a-765c136cb722/tags HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /api/v1/chats/8821e649-202c-4dab-8e8a-765c136cb722/tags HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "DELETE /api/v1/chats/8821e649-202c-4dab-8e8a-765c136cb722 HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /api/v1/chats/?page=2 HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "POST /api/v1/chats/tags HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /api/v1/chats/32871f67-54c0-4309-aab0-fdbf042b3666 HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /api/v1/chats/32871f67-54c0-4309-aab0-fdbf042b3666/tags HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /api/v1/users/user/settings HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /ollama/api/version HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /ollama/api/version HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /api/v1/users/user/settings HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /ws/socket.io/?EIO=4&transport=polling&t=P77z4UE&sid=KjTHho69FhywA_o4AAFR HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "POST /ws/socket.io/?EIO=4&transport=polling&t=P77zAZt&sid=KjTHho69FhywA_o4AAFR HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "POST /api/v1/chats/new HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "POST /api/chat/completions HTTP/1.1" 200 OK
INFO: 70.28.125.226:0 - "POST /api/chat/completed HTTP/1.1" 500 Internal Server Error
ERROR: Exception in ASGI application

  • Exception Group Traceback (most recent call last):
    | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 87, in collapse_excgroups
    | yield
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 190, in call
    | async with anyio.create_task_group() as task_group:
    | File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 680, in aexit
    | raise BaseExceptionGroup(
    | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
    +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    | File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 401, in run_asgi
    | result = await app( # type: ignore[func-returns-value]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in call
    | return await self.app(scope, receive, send)
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in call
    | await super().call(scope, receive, send)
    | File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 123, in call
    | await self.middleware_stack(scope, receive, send)
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in call
    | raise exc
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in call
    | await self.app(scope, receive, _send)
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in call
    | with collapse_excgroups():
    | File "/usr/local/lib/python3.11/contextlib.py", line 158, in exit
    | self.gen.throw(typ, value, traceback)
    | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    | raise exc
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in call
    | response = await self.dispatch_func(request, call_next)
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/app/backend/main.py", line 790, in update_embedding_function
    | response = await call_next(request)
    | ^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
    | raise app_exc
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
    | await self.app(scope, receive_or_disconnect, send_no_error)
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in call
    | with collapse_excgroups():
    | File "/usr/local/lib/python3.11/contextlib.py", line 158, in exit
    | self.gen.throw(typ, value, traceback)
    | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    | raise exc
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in call
    | response = await self.dispatch_func(request, call_next)
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/app/backend/main.py", line 781, in check_url
    | response = await call_next(request)
    | ^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
    | raise app_exc
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
    | await self.app(scope, receive_or_disconnect, send_no_error)
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in call
    | with collapse_excgroups():
    | File "/usr/local/lib/python3.11/contextlib.py", line 158, in exit
    | self.gen.throw(typ, value, traceback)
    | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    | raise exc
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in call
    | response = await self.dispatch_func(request, call_next)
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/app/backend/main.py", line 767, in commit_session_after_request
    | response = await call_next(request)
    | ^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
    | raise app_exc
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
    | await self.app(scope, receive_or_disconnect, send_no_error)
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 93, in call
    | await self.simple_response(scope, receive, send, request_headers=headers)
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 148, in simple_response
    | await self.app(scope, receive, send)
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in call
    | with collapse_excgroups():
    | File "/usr/local/lib/python3.11/contextlib.py", line 158, in exit
    | self.gen.throw(typ, value, traceback)
    | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    | raise exc
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in call
    | response = await self.dispatch_func(request, call_next)
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/app/backend/main.py", line 713, in dispatch
    | return await call_next(request)
    | ^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
    | raise app_exc
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
    | await self.app(scope, receive_or_disconnect, send_no_error)
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in call
    | with collapse_excgroups():
    | File "/usr/local/lib/python3.11/contextlib.py", line 158, in exit
    | self.gen.throw(typ, value, traceback)
    | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    | raise exc
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in call
    | response = await self.dispatch_func(request, call_next)
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/app/backend/main.py", line 507, in dispatch
    | return await call_next(request)
    | ^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
    | raise app_exc
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
    | await self.app(scope, receive_or_disconnect, send_no_error)
    | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 65, in call
    | await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
    | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    | raise exc
    | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    | await app(scope, receive, sender)
    | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 756, in call
    | await self.middleware_stack(scope, receive, send)
    | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 776, in app
    | await route.handle(scope, receive, send)
    | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 297, in handle
    | await self.app(scope, receive, send)
    | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 77, in app
    | await wrap_app_handling_exceptions(app, request)(scope, receive, send)
    | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    | raise exc
    | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    | await app(scope, receive, sender)
    | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 72, in app
    | response = await func(request)
    | ^^^^^^^^^^^^^^^^^^^
    | File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 278, in app
    | raw_response = await run_endpoint_function(
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
    | return await dependant.call(**values)
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/app/backend/main.py", line 1070, in chat_completed
    | "session_id": data["session_id"],
    | ~~~~^^^^^^^^^^^^^^
    | KeyError: 'session_id'
    +------------------------------------

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 401, in run_asgi
result = await app( # type: ignore[func-returns-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in call
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in call
await super().call(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 123, in call
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in call
raise exc
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in call
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in call
with collapse_excgroups():
File "/usr/local/lib/python3.11/contextlib.py", line 158, in exit
self.gen.throw(typ, value, traceback)
File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
raise exc
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in call
response = await self.dispatch_func(request, call_next)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/main.py", line 790, in update_embedding_function
response = await call_next(request)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
raise app_exc
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in call
with collapse_excgroups():
File "/usr/local/lib/python3.11/contextlib.py", line 158, in exit
self.gen.throw(typ, value, traceback)
File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
raise exc
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in call
response = await self.dispatch_func(request, call_next)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/main.py", line 781, in check_url
response = await call_next(request)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
raise app_exc
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in call
with collapse_excgroups():
File "/usr/local/lib/python3.11/contextlib.py", line 158, in exit
self.gen.throw(typ, value, traceback)
File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
raise exc
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in call
response = await self.dispatch_func(request, call_next)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/main.py", line 767, in commit_session_after_request
response = await call_next(request)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
raise app_exc
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 93, in call
await self.simple_response(scope, receive, send, request_headers=headers)
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 148, in simple_response
await self.app(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in call
with collapse_excgroups():
File "/usr/local/lib/python3.11/contextlib.py", line 158, in exit
self.gen.throw(typ, value, traceback)
File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
raise exc
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in call
response = await self.dispatch_func(request, call_next)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/main.py", line 713, in dispatch
return await call_next(request)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
raise app_exc
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in call
with collapse_excgroups():
File "/usr/local/lib/python3.11/contextlib.py", line 158, in exit
self.gen.throw(typ, value, traceback)
File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
raise exc
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in call
response = await self.dispatch_func(request, call_next)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/main.py", line 507, in dispatch
return await call_next(request)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
raise app_exc
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 65, in call
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
raise exc
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 756, in call
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 776, in app
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 297, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 77, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
raise exc
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 72, in app
response = await func(request)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 278, in app
raw_response = await run_endpoint_function(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
return await dependant.call(**values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/main.py", line 1070, in chat_completed
"session_id": data["session_id"],
~~~~^^^^^^^^^^^^^^
KeyError: 'session_id'

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 @plutozhang99 on GitHub (Sep 6, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/5226 # Bug Report ## Installation Method:Docker ## Environment - **Open WebUI Version:** : v0.3.16 - **Ollama (if applicable):** v0.3.9 - **Operating System:** Ubuntu 20.04 - **Browser (if applicable):**Chrome Version 128.0.6613.114 **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. - [ x ] I have included the Docker container logs. - [ x ] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below. ## Expected Behavior: When I trying to reopen the chat, I can see the history but I cannot send any message anymore ## Actual Behavior: Click the history chat, send message again, error happened ## Description **Bug Summary:** When I try to reopen the chat, I can see the history but I cannot send any message anymore, some times, it will also freeze the page ## Reproduction Details **Steps to Reproduce:** [Outline the steps to reproduce the bug. Be as detailed as possible.] ## Logs and Screenshots **Browser Console Logs:** submitPrompt 3135c32c-3e11-43de-b393-eaac77897aa3 **Docker Container Logs:** INFO: 70.28.125.226:0 - "POST /api/chat/completed HTTP/1.1" 500 Internal Server Error ERROR: Exception in ASGI application + Exception Group Traceback (most recent call last): | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 87, in collapse_excgroups | yield | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 190, in __call__ | async with anyio.create_task_group() as task_group: | File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 680, in __aexit__ | raise BaseExceptionGroup( | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception) +-+---------------- 1 ---------------- | Traceback (most recent call last): | File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 401, in run_asgi | result = await app( # type: ignore[func-returns-value] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in __call__ | return await self.app(scope, receive, send) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__ | await super().__call__(scope, receive, send) | File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__ | await self.middleware_stack(scope, receive, send) | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__ | raise exc | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__ | await self.app(scope, receive, _send) | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__ | with collapse_excgroups(): | File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__ | self.gen.throw(typ, value, traceback) | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups | raise exc | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__ | response = await self.dispatch_func(request, call_next) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/app/backend/main.py", line 790, in update_embedding_function | response = await call_next(request) | ^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next | raise app_exc | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro | await self.app(scope, receive_or_disconnect, send_no_error) | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__ | with collapse_excgroups(): | File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__ | self.gen.throw(typ, value, traceback) | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups | raise exc | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__ | response = await self.dispatch_func(request, call_next) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/app/backend/main.py", line 781, in check_url | response = await call_next(request) | ^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next | raise app_exc | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro | await self.app(scope, receive_or_disconnect, send_no_error) | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__ | with collapse_excgroups(): | File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__ | self.gen.throw(typ, value, traceback) | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups | raise exc | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__ | response = await self.dispatch_func(request, call_next) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/app/backend/main.py", line 767, in commit_session_after_request | response = await call_next(request) | ^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next | raise app_exc | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro | await self.app(scope, receive_or_disconnect, send_no_error) | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 93, in __call__ | await self.simple_response(scope, receive, send, request_headers=headers) | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 148, in simple_response | await self.app(scope, receive, send) | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__ | with collapse_excgroups(): | File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__ | self.gen.throw(typ, value, traceback) | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups | raise exc | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__ | response = await self.dispatch_func(request, call_next) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/app/backend/main.py", line 713, in dispatch | return await call_next(request) | ^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next | raise app_exc | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro | await self.app(scope, receive_or_disconnect, send_no_error) | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__ | with collapse_excgroups(): | File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__ | self.gen.throw(typ, value, traceback) | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups | raise exc | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__ | response = await self.dispatch_func(request, call_next) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/app/backend/main.py", line 507, in dispatch | return await call_next(request) | ^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next | raise app_exc | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro | await self.app(scope, receive_or_disconnect, send_no_error) | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 65, in __call__ | await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app | raise exc | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app | await app(scope, receive, sender) | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 756, in __call__ | await self.middleware_stack(scope, receive, send) | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 776, in app | await route.handle(scope, receive, send) | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 297, in handle | await self.app(scope, receive, send) | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 77, in app | await wrap_app_handling_exceptions(app, request)(scope, receive, send) | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app | raise exc | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app | await app(scope, receive, sender) | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 72, in app | response = await func(request) | ^^^^^^^^^^^^^^^^^^^ | File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 278, in app | raw_response = await run_endpoint_function( | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function | return await dependant.call(**values) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/app/backend/main.py", line 1070, in chat_completed | "session_id": data["session_id"], | ~~~~^^^^^^^^^^^^^^ | KeyError: 'session_id' +------------------------------------ During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 401, in run_asgi result = await app( # type: ignore[func-returns-value] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in __call__ return await self.app(scope, receive, send) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__ await super().__call__(scope, receive, send) File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__ await self.middleware_stack(scope, receive, send) File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__ raise exc File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__ await self.app(scope, receive, _send) File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__ with collapse_excgroups(): File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__ self.gen.throw(typ, value, traceback) File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups raise exc File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__ response = await self.dispatch_func(request, call_next) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/main.py", line 790, in update_embedding_function response = await call_next(request) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next raise app_exc File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro await self.app(scope, receive_or_disconnect, send_no_error) File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__ with collapse_excgroups(): File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__ self.gen.throw(typ, value, traceback) File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups raise exc File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__ response = await self.dispatch_func(request, call_next) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/main.py", line 781, in check_url response = await call_next(request) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next raise app_exc File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro await self.app(scope, receive_or_disconnect, send_no_error) File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__ with collapse_excgroups(): File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__ self.gen.throw(typ, value, traceback) File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups raise exc File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__ response = await self.dispatch_func(request, call_next) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/main.py", line 767, in commit_session_after_request response = await call_next(request) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next raise app_exc File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro await self.app(scope, receive_or_disconnect, send_no_error) File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 93, in __call__ await self.simple_response(scope, receive, send, request_headers=headers) File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 148, in simple_response await self.app(scope, receive, send) File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__ with collapse_excgroups(): File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__ self.gen.throw(typ, value, traceback) File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups raise exc File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__ response = await self.dispatch_func(request, call_next) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/main.py", line 713, in dispatch return await call_next(request) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next raise app_exc File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro await self.app(scope, receive_or_disconnect, send_no_error) File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__ with collapse_excgroups(): File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__ self.gen.throw(typ, value, traceback) File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups raise exc File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__ response = await self.dispatch_func(request, call_next) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/main.py", line 507, in dispatch return await call_next(request) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next raise app_exc File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro await self.app(scope, receive_or_disconnect, send_no_error) File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 65, in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app raise exc File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app await app(scope, receive, sender) File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 756, in __call__ await self.middleware_stack(scope, receive, send) File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 776, in app await route.handle(scope, receive, send) File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 297, in handle await self.app(scope, receive, send) File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 77, in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app raise exc File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app await app(scope, receive, sender) File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 72, in app response = await func(request) ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 278, in app raw_response = await run_endpoint_function( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function return await dependant.call(**values) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/main.py", line 1070, in chat_completed "session_id": data["session_id"], ~~~~^^^^^^^^^^^^^^ KeyError: 'session_id' INFO: 70.28.125.226:0 - "POST /api/v1/chats/791db5e6-0d7f-4dfb-9cac-8e38e9491fec HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "POST /api/v1/chats/791db5e6-0d7f-4dfb-9cac-8e38e9491fec HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK generate_title chatgpt-4o-latest INFO: 70.28.125.226:0 - "POST /api/task/title/completions HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "POST /api/v1/chats/791db5e6-0d7f-4dfb-9cac-8e38e9491fec HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /ws/socket.io/?EIO=4&transport=polling&t=P77ymkr&sid=vBS1qi_uMYNZ2zmcAAFP HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "POST /ws/socket.io/?EIO=4&transport=polling&t=P77ysq2&sid=vBS1qi_uMYNZ2zmcAAFP HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /ws/socket.io/?EIO=4&transport=polling&t=P77ysq3&sid=vBS1qi_uMYNZ2zmcAAFP HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "POST /ws/socket.io/?EIO=4&transport=polling&t=P77yyxx&sid=vBS1qi_uMYNZ2zmcAAFP HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /ws/socket.io/?EIO=4&transport=polling&t=P77yyxy&sid=vBS1qi_uMYNZ2zmcAAFP HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /ws/socket.io/?EIO=4&transport=polling&t=P77y-5x&sid=vBS1qi_uMYNZ2zmcAAFP HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "POST /ws/socket.io/?EIO=4&transport=polling&t=P77z33j&sid=vBS1qi_uMYNZ2zmcAAFP HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /c/8821e649-202c-4dab-8e8a-765c136cb722 HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /api/config HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /manifest.json HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /ws/socket.io/?EIO=4&transport=polling&t=P77z4S9 HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /api/v1/auths/ HTTP/1.1" 200 OK user Pluto(893e15b1-f2a5-4f2d-bbb0-a88894989054) connected with session ID ZWhwQmuiK5SCU7aFAAFS INFO: 70.28.125.226:0 - "GET /ws/socket.io/?EIO=4&transport=polling&t=P77z33k&sid=vBS1qi_uMYNZ2zmcAAFP HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /ws/socket.io/?EIO=4&transport=polling&t=P77z4TM&sid=KjTHho69FhywA_o4AAFR HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "POST /ws/socket.io/?EIO=4&transport=polling&t=P77z4TL&sid=KjTHho69FhywA_o4AAFR HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /api/config HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /ws/socket.io/?EIO=4&transport=websocket&sid=KjTHho69FhywA_o4AAFR HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /api/changelog HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /api/v1/users/user/settings HTTP/1.1" 200 OK INFO [apps.openai.main] get_all_models() INFO: 70.28.125.226:0 - "GET /api/v1/documents/ HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /api/v1/prompts/ HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /api/v1/chats/tags/all HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /api/v1/configs/banners HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /api/v1/tools/ HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /api/v1/functions/ HTTP/1.1" 200 OK INFO [apps.ollama.main] get_all_models() INFO: 70.28.125.226:0 - "GET /api/models HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /api/v1/chats/8821e649-202c-4dab-8e8a-765c136cb722 HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "POST /api/v1/chats/tags HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /api/v1/chats/8821e649-202c-4dab-8e8a-765c136cb722/tags HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /api/v1/users/user/settings HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /api/v1/chats/?page=2 HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /ollama/api/version HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /ollama/api/version HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /ollama/api/version HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /api/v1/chats/791db5e6-0d7f-4dfb-9cac-8e38e9491fec HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /api/v1/chats/791db5e6-0d7f-4dfb-9cac-8e38e9491fec/tags HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /api/v1/users/user/settings HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /api/v1/chats/791db5e6-0d7f-4dfb-9cac-8e38e9491fec/tags HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /api/v1/chats/791db5e6-0d7f-4dfb-9cac-8e38e9491fec/tags HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "DELETE /api/v1/chats/791db5e6-0d7f-4dfb-9cac-8e38e9491fec HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /api/v1/chats/?page=2 HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /ollama/api/version HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /api/v1/users/user/settings HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "POST /api/v1/chats/tags HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /api/v1/chats/8821e649-202c-4dab-8e8a-765c136cb722/tags HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /api/v1/chats/8821e649-202c-4dab-8e8a-765c136cb722/tags HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "DELETE /api/v1/chats/8821e649-202c-4dab-8e8a-765c136cb722 HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /api/v1/chats/?page=2 HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "POST /api/v1/chats/tags HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /api/v1/chats/32871f67-54c0-4309-aab0-fdbf042b3666 HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /api/v1/chats/32871f67-54c0-4309-aab0-fdbf042b3666/tags HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /api/v1/users/user/settings HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /ollama/api/version HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /ollama/api/version HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /api/v1/users/user/settings HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /ws/socket.io/?EIO=4&transport=polling&t=P77z4UE&sid=KjTHho69FhywA_o4AAFR HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "POST /ws/socket.io/?EIO=4&transport=polling&t=P77zAZt&sid=KjTHho69FhywA_o4AAFR HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "POST /api/v1/chats/new HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "POST /api/chat/completions HTTP/1.1" 200 OK INFO: 70.28.125.226:0 - "POST /api/chat/completed HTTP/1.1" 500 Internal Server Error ERROR: Exception in ASGI application + Exception Group Traceback (most recent call last): | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 87, in collapse_excgroups | yield | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 190, in __call__ | async with anyio.create_task_group() as task_group: | File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 680, in __aexit__ | raise BaseExceptionGroup( | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception) +-+---------------- 1 ---------------- | Traceback (most recent call last): | File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 401, in run_asgi | result = await app( # type: ignore[func-returns-value] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in __call__ | return await self.app(scope, receive, send) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__ | await super().__call__(scope, receive, send) | File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__ | await self.middleware_stack(scope, receive, send) | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__ | raise exc | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__ | await self.app(scope, receive, _send) | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__ | with collapse_excgroups(): | File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__ | self.gen.throw(typ, value, traceback) | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups | raise exc | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__ | response = await self.dispatch_func(request, call_next) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/app/backend/main.py", line 790, in update_embedding_function | response = await call_next(request) | ^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next | raise app_exc | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro | await self.app(scope, receive_or_disconnect, send_no_error) | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__ | with collapse_excgroups(): | File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__ | self.gen.throw(typ, value, traceback) | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups | raise exc | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__ | response = await self.dispatch_func(request, call_next) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/app/backend/main.py", line 781, in check_url | response = await call_next(request) | ^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next | raise app_exc | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro | await self.app(scope, receive_or_disconnect, send_no_error) | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__ | with collapse_excgroups(): | File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__ | self.gen.throw(typ, value, traceback) | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups | raise exc | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__ | response = await self.dispatch_func(request, call_next) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/app/backend/main.py", line 767, in commit_session_after_request | response = await call_next(request) | ^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next | raise app_exc | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro | await self.app(scope, receive_or_disconnect, send_no_error) | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 93, in __call__ | await self.simple_response(scope, receive, send, request_headers=headers) | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 148, in simple_response | await self.app(scope, receive, send) | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__ | with collapse_excgroups(): | File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__ | self.gen.throw(typ, value, traceback) | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups | raise exc | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__ | response = await self.dispatch_func(request, call_next) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/app/backend/main.py", line 713, in dispatch | return await call_next(request) | ^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next | raise app_exc | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro | await self.app(scope, receive_or_disconnect, send_no_error) | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__ | with collapse_excgroups(): | File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__ | self.gen.throw(typ, value, traceback) | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups | raise exc | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__ | response = await self.dispatch_func(request, call_next) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/app/backend/main.py", line 507, in dispatch | return await call_next(request) | ^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next | raise app_exc | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro | await self.app(scope, receive_or_disconnect, send_no_error) | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 65, in __call__ | await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app | raise exc | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app | await app(scope, receive, sender) | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 756, in __call__ | await self.middleware_stack(scope, receive, send) | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 776, in app | await route.handle(scope, receive, send) | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 297, in handle | await self.app(scope, receive, send) | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 77, in app | await wrap_app_handling_exceptions(app, request)(scope, receive, send) | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app | raise exc | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app | await app(scope, receive, sender) | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 72, in app | response = await func(request) | ^^^^^^^^^^^^^^^^^^^ | File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 278, in app | raw_response = await run_endpoint_function( | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function | return await dependant.call(**values) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/app/backend/main.py", line 1070, in chat_completed | "session_id": data["session_id"], | ~~~~^^^^^^^^^^^^^^ | KeyError: 'session_id' +------------------------------------ During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 401, in run_asgi result = await app( # type: ignore[func-returns-value] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in __call__ return await self.app(scope, receive, send) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__ await super().__call__(scope, receive, send) File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__ await self.middleware_stack(scope, receive, send) File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__ raise exc File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__ await self.app(scope, receive, _send) File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__ with collapse_excgroups(): File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__ self.gen.throw(typ, value, traceback) File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups raise exc File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__ response = await self.dispatch_func(request, call_next) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/main.py", line 790, in update_embedding_function response = await call_next(request) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next raise app_exc File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro await self.app(scope, receive_or_disconnect, send_no_error) File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__ with collapse_excgroups(): File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__ self.gen.throw(typ, value, traceback) File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups raise exc File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__ response = await self.dispatch_func(request, call_next) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/main.py", line 781, in check_url response = await call_next(request) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next raise app_exc File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro await self.app(scope, receive_or_disconnect, send_no_error) File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__ with collapse_excgroups(): File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__ self.gen.throw(typ, value, traceback) File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups raise exc File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__ response = await self.dispatch_func(request, call_next) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/main.py", line 767, in commit_session_after_request response = await call_next(request) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next raise app_exc File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro await self.app(scope, receive_or_disconnect, send_no_error) File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 93, in __call__ await self.simple_response(scope, receive, send, request_headers=headers) File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 148, in simple_response await self.app(scope, receive, send) File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__ with collapse_excgroups(): File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__ self.gen.throw(typ, value, traceback) File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups raise exc File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__ response = await self.dispatch_func(request, call_next) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/main.py", line 713, in dispatch return await call_next(request) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next raise app_exc File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro await self.app(scope, receive_or_disconnect, send_no_error) File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__ with collapse_excgroups(): File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__ self.gen.throw(typ, value, traceback) File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups raise exc File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__ response = await self.dispatch_func(request, call_next) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/main.py", line 507, in dispatch return await call_next(request) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next raise app_exc File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro await self.app(scope, receive_or_disconnect, send_no_error) File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 65, in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app raise exc File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app await app(scope, receive, sender) File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 756, in __call__ await self.middleware_stack(scope, receive, send) File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 776, in app await route.handle(scope, receive, send) File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 297, in handle await self.app(scope, receive, send) File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 77, in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app raise exc File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app await app(scope, receive, sender) File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 72, in app response = await func(request) ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 278, in app raw_response = await run_endpoint_function( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function return await dependant.call(**values) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/main.py", line 1070, in chat_completed "session_id": data["session_id"], ~~~~^^^^^^^^^^^^^^ KeyError: 'session_id' ## 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!
Author
Owner

@silentoplayz commented on GitHub (Sep 6, 2024):

Please update your Open WebUI to the latest version and let us know if this issue still persists.

<!-- gh-comment-id:2334388731 --> @silentoplayz commented on GitHub (Sep 6, 2024): Please update your Open WebUI to the latest version and let us know if this issue still persists.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#13903