Originally created by @imJack6 on GitHub (Jan 31, 2025).
Bug Report
Important Notes
Before submitting a bug report: Please check the Issues or Discussions section to see if a similar issue or feature request has already been posted. It's likely we're already tracking it! If you’re unsure, start a discussion post first. This will help us efficiently focus on improving the project.
Collaborate respectfully: We value a constructive attitude, so please be mindful of your communication. If negativity is part of your approach, our capacity to engage may be limited. We’re here to help if you’re open to learning and communicating positively. Remember, Open WebUI is a volunteer-driven project managed by a single maintainer and supported by contributors who also have full-time jobs. We appreciate your time and ask that you respect ours.
Contributing: If you encounter an issue, we highly encourage you to submit a pull request or fork the project. We actively work to prevent contributor burnout to maintain the quality and continuity of Open WebUI.
Bug reproducibility: If a bug cannot be reproduced with a :main or :dev Docker setup, or a pip install with Python 3.11, it may require additional help from the community. In such cases, we will move it to the "issues" Discussions section due to our limited resources. We encourage the community to assist with these issues. Remember, it’s not that the issue doesn’t exist; we need your help!
Note: Please remove the notes above when submitting your post. Thank you for your understanding and support!
Installation Method
Docker
Environment
Open WebUI Version: v0.5.7
Ollama (if applicable): 0.5.7
Operating System: Debian 11
Browser (if applicable): Edge 132.0.2957.127
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.
I have included the Docker container logs.
I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.
Expected Behavior:
New users can be registered using OAuth login
Actual Behavior:
Internal Server Error
Description
Bug Summary:
Cannot register new account using OAuth login
Reproduction Details
Steps to Reproduce:
Configure OAuth for Open WebUI, then log in to a new account through OAuth to register Open WebUI
Logs and Screenshots
Browser Console Logs:
GET https://ai.jackcraft.cn/oauth/oidc/callback?code=bq9ObtXf********************RHS51&state=LiRh6**********************5rX7&iss=https%3A%2F%2F****.*********.**%2Foidc
500 (Internal Server Error)
Ht.f @ /_app/immutable/nodes/33.Ddy2FPF2.js:5
Docker Container Logs:
ollamawebui | INFO: **.**.**.**:0 - "GET /oauth/oidc/login HTTP/1.1" 302 Found
ollamawebui | INFO [open_webui.models.auths] insert_new_auth
ollamawebui | INFO: **.**.**.**:0 - "GET /oauth/oidc/callback?code=bq9Ob********************S51&state=LiRh6nYR****************NOVi5rX7&iss=https%3A%2F%2F****.*********.**%2Foidc HTTP/1.1" 500 Internal Server Error
ollamawebui | ERROR: Exception in ASGI application
ollamawebui | + Exception Group Traceback (most recent call last):
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 87, in collapse_excgroups
ollamawebui | | yield
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 190, in __call__
ollamawebui | | async with anyio.create_task_group() as task_group:
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 767, in __aexit__
ollamawebui | | raise BaseExceptionGroup(
ollamawebui | | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
ollamawebui | +-+---------------- 1 ----------------
ollamawebui | | Traceback (most recent call last):
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 401, in run_asgi
ollamawebui | | result = await app( # type: ignore[func-returns-value]
ollamawebui | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in __call__
ollamawebui | | return await self.app(scope, receive, send)
ollamawebui | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
ollamawebui | | await super().__call__(scope, receive, send)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
ollamawebui | | await self.middleware_stack(scope, receive, send)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
ollamawebui | | raise exc
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
ollamawebui | | await self.app(scope, receive, _send)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/sessions.py", line 85, in __call__
ollamawebui | | await self.app(scope, receive, send_wrapper)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 85, in __call__
ollamawebui | | await self.app(scope, receive, send)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
ollamawebui | | with collapse_excgroups():
ollamawebui | | File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
ollamawebui | | self.gen.throw(typ, value, traceback)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
ollamawebui | | raise exc
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
ollamawebui | | response = await self.dispatch_func(request, call_next)
ollamawebui | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | | File "/app/backend/open_webui/main.py", line 732, in inspect_websocket
ollamawebui | | return await call_next(request)
ollamawebui | | ^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
ollamawebui | | raise app_exc
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
ollamawebui | | await self.app(scope, receive_or_disconnect, send_no_error)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
ollamawebui | | with collapse_excgroups():
ollamawebui | | File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
ollamawebui | | self.gen.throw(typ, value, traceback)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
ollamawebui | | raise exc
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
ollamawebui | | response = await self.dispatch_func(request, call_next)
ollamawebui | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | | File "/app/backend/open_webui/main.py", line 711, in check_url
ollamawebui | | response = await call_next(request)
ollamawebui | | ^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
ollamawebui | | raise app_exc
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
ollamawebui | | await self.app(scope, receive_or_disconnect, send_no_error)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
ollamawebui | | with collapse_excgroups():
ollamawebui | | File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
ollamawebui | | self.gen.throw(typ, value, traceback)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
ollamawebui | | raise exc
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
ollamawebui | | response = await self.dispatch_func(request, call_next)
ollamawebui | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | | File "/app/backend/open_webui/main.py", line 701, in commit_session_after_request
ollamawebui | | response = await call_next(request)
ollamawebui | | ^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
ollamawebui | | raise app_exc
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
ollamawebui | | await self.app(scope, receive_or_disconnect, send_no_error)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
ollamawebui | | with collapse_excgroups():
ollamawebui | | File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
ollamawebui | | self.gen.throw(typ, value, traceback)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
ollamawebui | | raise exc
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
ollamawebui | | response = await self.dispatch_func(request, call_next)
ollamawebui | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | | File "/app/backend/open_webui/utils/security_headers.py", line 11, in dispatch
ollamawebui | | response = await call_next(request)
ollamawebui | | ^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
ollamawebui | | raise app_exc
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
ollamawebui | | await self.app(scope, receive_or_disconnect, send_no_error)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
ollamawebui | | with collapse_excgroups():
ollamawebui | | File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
ollamawebui | | self.gen.throw(typ, value, traceback)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
ollamawebui | | raise exc
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
ollamawebui | | response = await self.dispatch_func(request, call_next)
ollamawebui | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | | File "/app/backend/open_webui/main.py", line 690, in dispatch
ollamawebui | | response = await call_next(request)
ollamawebui | | ^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
ollamawebui | | raise app_exc
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
ollamawebui | | await self.app(scope, receive_or_disconnect, send_no_error)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
ollamawebui | | await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
ollamawebui | | raise exc
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
ollamawebui | | await app(scope, receive, sender)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 756, in __call__
ollamawebui | | await self.middleware_stack(scope, receive, send)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 776, in app
ollamawebui | | await route.handle(scope, receive, send)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 297, in handle
ollamawebui | | await self.app(scope, receive, send)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 77, in app
ollamawebui | | await wrap_app_handling_exceptions(app, request)(scope, receive, send)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
ollamawebui | | raise exc
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
ollamawebui | | await app(scope, receive, sender)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 72, in app
ollamawebui | | response = await func(request)
ollamawebui | | ^^^^^^^^^^^^^^^^^^^
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 278, in app
ollamawebui | | raw_response = await run_endpoint_function(
ollamawebui | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
ollamawebui | | return await dependant.call(**values)
ollamawebui | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | | File "/app/backend/open_webui/main.py", line 1121, in oauth_callback
ollamawebui | | return await oauth_manager.handle_callback(provider, request, response)
ollamawebui | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | | File "/app/backend/open_webui/utils/oauth.py", line 283, in handle_callback
ollamawebui | | user = Auths.insert_new_auth(
ollamawebui | | ^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | | File "/app/backend/open_webui/models/auths.py", line 118, in insert_new_auth
ollamawebui | | user = Users.insert_new_user(
ollamawebui | | ^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | | File "/app/backend/open_webui/models/users.py", line 108, in insert_new_user
ollamawebui | | user = UserModel(
ollamawebui | | ^^^^^^^^^^
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/pydantic/main.py", line 212, in __init__
ollamawebui | | validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
ollamawebui | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | | pydantic_core._pydantic_core.ValidationError: 1 validation error for UserModel
ollamawebui | | name
ollamawebui | | Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
ollamawebui | | For further information visit https://errors.pydantic.dev/2.9/v/string_type
ollamawebui | +------------------------------------
ollamawebui |
ollamawebui | During handling of the above exception, another exception occurred:
ollamawebui |
ollamawebui | Traceback (most recent call last):
ollamawebui | File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 401, in run_asgi
ollamawebui | result = await app( # type: ignore[func-returns-value]
ollamawebui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in __call__
ollamawebui | return await self.app(scope, receive, send)
ollamawebui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
ollamawebui | await super().__call__(scope, receive, send)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
ollamawebui | await self.middleware_stack(scope, receive, send)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
ollamawebui | raise exc
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
ollamawebui | await self.app(scope, receive, _send)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/sessions.py", line 85, in __call__
ollamawebui | await self.app(scope, receive, send_wrapper)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 85, in __call__
ollamawebui | await self.app(scope, receive, send)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
ollamawebui | with collapse_excgroups():
ollamawebui | File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
ollamawebui | self.gen.throw(typ, value, traceback)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
ollamawebui | raise exc
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
ollamawebui | response = await self.dispatch_func(request, call_next)
ollamawebui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | File "/app/backend/open_webui/main.py", line 732, in inspect_websocket
ollamawebui | return await call_next(request)
ollamawebui | ^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
ollamawebui | raise app_exc
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
ollamawebui | await self.app(scope, receive_or_disconnect, send_no_error)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
ollamawebui | with collapse_excgroups():
ollamawebui | File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
ollamawebui | self.gen.throw(typ, value, traceback)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
ollamawebui | raise exc
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
ollamawebui | response = await self.dispatch_func(request, call_next)
ollamawebui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | File "/app/backend/open_webui/main.py", line 711, in check_url
ollamawebui | response = await call_next(request)
ollamawebui | ^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
ollamawebui | raise app_exc
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
ollamawebui | await self.app(scope, receive_or_disconnect, send_no_error)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
ollamawebui | with collapse_excgroups():
ollamawebui | File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
ollamawebui | self.gen.throw(typ, value, traceback)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
ollamawebui | raise exc
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
ollamawebui | response = await self.dispatch_func(request, call_next)
ollamawebui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | File "/app/backend/open_webui/main.py", line 701, in commit_session_after_request
ollamawebui | response = await call_next(request)
ollamawebui | ^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
ollamawebui | raise app_exc
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
ollamawebui | await self.app(scope, receive_or_disconnect, send_no_error)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
ollamawebui | with collapse_excgroups():
ollamawebui | File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
ollamawebui | self.gen.throw(typ, value, traceback)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
ollamawebui | raise exc
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
ollamawebui | response = await self.dispatch_func(request, call_next)
ollamawebui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | File "/app/backend/open_webui/utils/security_headers.py", line 11, in dispatch
ollamawebui | response = await call_next(request)
ollamawebui | ^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
ollamawebui | raise app_exc
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
ollamawebui | await self.app(scope, receive_or_disconnect, send_no_error)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
ollamawebui | with collapse_excgroups():
ollamawebui | File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
ollamawebui | self.gen.throw(typ, value, traceback)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
ollamawebui | raise exc
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
ollamawebui | response = await self.dispatch_func(request, call_next)
ollamawebui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | File "/app/backend/open_webui/main.py", line 690, in dispatch
ollamawebui | response = await call_next(request)
ollamawebui | ^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
ollamawebui | raise app_exc
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
ollamawebui | await self.app(scope, receive_or_disconnect, send_no_error)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
ollamawebui | await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
ollamawebui | raise exc
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
ollamawebui | await app(scope, receive, sender)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 756, in __call__
ollamawebui | await self.middleware_stack(scope, receive, send)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 776, in app
ollamawebui | await route.handle(scope, receive, send)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 297, in handle
ollamawebui | await self.app(scope, receive, send)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 77, in app
ollamawebui | await wrap_app_handling_exceptions(app, request)(scope, receive, send)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
ollamawebui | raise exc
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
ollamawebui | await app(scope, receive, sender)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 72, in app
ollamawebui | response = await func(request)
ollamawebui | ^^^^^^^^^^^^^^^^^^^
ollamawebui | File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 278, in app
ollamawebui | raw_response = await run_endpoint_function(
ollamawebui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
ollamawebui | return await dependant.call(**values)
ollamawebui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | File "/app/backend/open_webui/main.py", line 1121, in oauth_callback
ollamawebui | return await oauth_manager.handle_callback(provider, request, response)
ollamawebui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | File "/app/backend/open_webui/utils/oauth.py", line 283, in handle_callback
ollamawebui | user = Auths.insert_new_auth(
ollamawebui | ^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | File "/app/backend/open_webui/models/auths.py", line 118, in insert_new_auth
ollamawebui | user = Users.insert_new_user(
ollamawebui | ^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | File "/app/backend/open_webui/models/users.py", line 108, in insert_new_user
ollamawebui | user = UserModel(
ollamawebui | ^^^^^^^^^^
ollamawebui | File "/usr/local/lib/python3.11/site-packages/pydantic/main.py", line 212, in __init__
ollamawebui | validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
ollamawebui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | pydantic_core._pydantic_core.ValidationError: 1 validation error for UserModel
ollamawebui | name
ollamawebui | Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
ollamawebui | For further information visit https://errors.pydantic.dev/2.9/v/string_type
ollamawebui | INFO: connection closed
Screenshots/Screen Recordings (if applicable):
Additional Information
The OAuth provider is Logto, and the added application is OIDC. I can use OAuth to log in to overwrite users who have registered with the same email address, and I can log in normally, but I cannot register new users. The permissions allowed by the Open WebUI application in Logto are set to custom_dataemailprofile.
Some of the environment variables set in Docker are as follows:
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 @imJack6 on GitHub (Jan 31, 2025).
# Bug Report
## Important Notes
- **Before submitting a bug report**: Please check the Issues or Discussions section to see if a similar issue or feature request has already been posted. It's likely we're already tracking it! If you’re unsure, start a discussion post first. This will help us efficiently focus on improving the project.
- **Collaborate respectfully**: We value a constructive attitude, so please be mindful of your communication. If negativity is part of your approach, our capacity to engage may be limited. We’re here to help if you’re open to learning and communicating positively. Remember, Open WebUI is a volunteer-driven project managed by a single maintainer and supported by contributors who also have full-time jobs. We appreciate your time and ask that you respect ours.
- **Contributing**: If you encounter an issue, we highly encourage you to submit a pull request or fork the project. We actively work to prevent contributor burnout to maintain the quality and continuity of Open WebUI.
- **Bug reproducibility**: If a bug cannot be reproduced with a `:main` or `:dev` Docker setup, or a pip install with Python 3.11, it may require additional help from the community. In such cases, we will move it to the "issues" Discussions section due to our limited resources. We encourage the community to assist with these issues. Remember, it’s not that the issue doesn’t exist; we need your help!
Note: Please remove the notes above when submitting your post. Thank you for your understanding and support!
---
## Installation Method
Docker
## Environment
- **Open WebUI Version:** v0.5.7
- **Ollama (if applicable):** 0.5.7
- **Operating System:** Debian 11
- **Browser (if applicable):** Edge 132.0.2957.127
**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:
New users can be registered using OAuth login
## Actual Behavior:
Internal Server Error
## Description
**Bug Summary:**
Cannot register new account using OAuth login
## Reproduction Details
**Steps to Reproduce:**
Configure OAuth for Open WebUI, then log in to a new account through OAuth to register Open WebUI
## Logs and Screenshots
**Browser Console Logs:**
```
GET https://ai.jackcraft.cn/oauth/oidc/callback?code=bq9ObtXf********************RHS51&state=LiRh6**********************5rX7&iss=https%3A%2F%2F****.*********.**%2Foidc
500 (Internal Server Error)
Ht.f @ /_app/immutable/nodes/33.Ddy2FPF2.js:5
```
**Docker Container Logs:**
```
ollamawebui | INFO: **.**.**.**:0 - "GET /oauth/oidc/login HTTP/1.1" 302 Found
ollamawebui | INFO [open_webui.models.auths] insert_new_auth
ollamawebui | INFO: **.**.**.**:0 - "GET /oauth/oidc/callback?code=bq9Ob********************S51&state=LiRh6nYR****************NOVi5rX7&iss=https%3A%2F%2F****.*********.**%2Foidc HTTP/1.1" 500 Internal Server Error
ollamawebui | ERROR: Exception in ASGI application
ollamawebui | + Exception Group Traceback (most recent call last):
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 87, in collapse_excgroups
ollamawebui | | yield
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 190, in __call__
ollamawebui | | async with anyio.create_task_group() as task_group:
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 767, in __aexit__
ollamawebui | | raise BaseExceptionGroup(
ollamawebui | | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
ollamawebui | +-+---------------- 1 ----------------
ollamawebui | | Traceback (most recent call last):
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 401, in run_asgi
ollamawebui | | result = await app( # type: ignore[func-returns-value]
ollamawebui | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in __call__
ollamawebui | | return await self.app(scope, receive, send)
ollamawebui | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
ollamawebui | | await super().__call__(scope, receive, send)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
ollamawebui | | await self.middleware_stack(scope, receive, send)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
ollamawebui | | raise exc
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
ollamawebui | | await self.app(scope, receive, _send)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/sessions.py", line 85, in __call__
ollamawebui | | await self.app(scope, receive, send_wrapper)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 85, in __call__
ollamawebui | | await self.app(scope, receive, send)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
ollamawebui | | with collapse_excgroups():
ollamawebui | | File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
ollamawebui | | self.gen.throw(typ, value, traceback)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
ollamawebui | | raise exc
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
ollamawebui | | response = await self.dispatch_func(request, call_next)
ollamawebui | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | | File "/app/backend/open_webui/main.py", line 732, in inspect_websocket
ollamawebui | | return await call_next(request)
ollamawebui | | ^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
ollamawebui | | raise app_exc
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
ollamawebui | | await self.app(scope, receive_or_disconnect, send_no_error)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
ollamawebui | | with collapse_excgroups():
ollamawebui | | File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
ollamawebui | | self.gen.throw(typ, value, traceback)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
ollamawebui | | raise exc
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
ollamawebui | | response = await self.dispatch_func(request, call_next)
ollamawebui | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | | File "/app/backend/open_webui/main.py", line 711, in check_url
ollamawebui | | response = await call_next(request)
ollamawebui | | ^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
ollamawebui | | raise app_exc
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
ollamawebui | | await self.app(scope, receive_or_disconnect, send_no_error)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
ollamawebui | | with collapse_excgroups():
ollamawebui | | File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
ollamawebui | | self.gen.throw(typ, value, traceback)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
ollamawebui | | raise exc
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
ollamawebui | | response = await self.dispatch_func(request, call_next)
ollamawebui | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | | File "/app/backend/open_webui/main.py", line 701, in commit_session_after_request
ollamawebui | | response = await call_next(request)
ollamawebui | | ^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
ollamawebui | | raise app_exc
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
ollamawebui | | await self.app(scope, receive_or_disconnect, send_no_error)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
ollamawebui | | with collapse_excgroups():
ollamawebui | | File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
ollamawebui | | self.gen.throw(typ, value, traceback)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
ollamawebui | | raise exc
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
ollamawebui | | response = await self.dispatch_func(request, call_next)
ollamawebui | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | | File "/app/backend/open_webui/utils/security_headers.py", line 11, in dispatch
ollamawebui | | response = await call_next(request)
ollamawebui | | ^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
ollamawebui | | raise app_exc
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
ollamawebui | | await self.app(scope, receive_or_disconnect, send_no_error)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
ollamawebui | | with collapse_excgroups():
ollamawebui | | File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
ollamawebui | | self.gen.throw(typ, value, traceback)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
ollamawebui | | raise exc
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
ollamawebui | | response = await self.dispatch_func(request, call_next)
ollamawebui | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | | File "/app/backend/open_webui/main.py", line 690, in dispatch
ollamawebui | | response = await call_next(request)
ollamawebui | | ^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
ollamawebui | | raise app_exc
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
ollamawebui | | await self.app(scope, receive_or_disconnect, send_no_error)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
ollamawebui | | await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
ollamawebui | | raise exc
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
ollamawebui | | await app(scope, receive, sender)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 756, in __call__
ollamawebui | | await self.middleware_stack(scope, receive, send)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 776, in app
ollamawebui | | await route.handle(scope, receive, send)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 297, in handle
ollamawebui | | await self.app(scope, receive, send)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 77, in app
ollamawebui | | await wrap_app_handling_exceptions(app, request)(scope, receive, send)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
ollamawebui | | raise exc
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
ollamawebui | | await app(scope, receive, sender)
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 72, in app
ollamawebui | | response = await func(request)
ollamawebui | | ^^^^^^^^^^^^^^^^^^^
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 278, in app
ollamawebui | | raw_response = await run_endpoint_function(
ollamawebui | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
ollamawebui | | return await dependant.call(**values)
ollamawebui | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | | File "/app/backend/open_webui/main.py", line 1121, in oauth_callback
ollamawebui | | return await oauth_manager.handle_callback(provider, request, response)
ollamawebui | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | | File "/app/backend/open_webui/utils/oauth.py", line 283, in handle_callback
ollamawebui | | user = Auths.insert_new_auth(
ollamawebui | | ^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | | File "/app/backend/open_webui/models/auths.py", line 118, in insert_new_auth
ollamawebui | | user = Users.insert_new_user(
ollamawebui | | ^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | | File "/app/backend/open_webui/models/users.py", line 108, in insert_new_user
ollamawebui | | user = UserModel(
ollamawebui | | ^^^^^^^^^^
ollamawebui | | File "/usr/local/lib/python3.11/site-packages/pydantic/main.py", line 212, in __init__
ollamawebui | | validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
ollamawebui | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | | pydantic_core._pydantic_core.ValidationError: 1 validation error for UserModel
ollamawebui | | name
ollamawebui | | Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
ollamawebui | | For further information visit https://errors.pydantic.dev/2.9/v/string_type
ollamawebui | +------------------------------------
ollamawebui |
ollamawebui | During handling of the above exception, another exception occurred:
ollamawebui |
ollamawebui | Traceback (most recent call last):
ollamawebui | File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 401, in run_asgi
ollamawebui | result = await app( # type: ignore[func-returns-value]
ollamawebui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in __call__
ollamawebui | return await self.app(scope, receive, send)
ollamawebui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
ollamawebui | await super().__call__(scope, receive, send)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
ollamawebui | await self.middleware_stack(scope, receive, send)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
ollamawebui | raise exc
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
ollamawebui | await self.app(scope, receive, _send)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/sessions.py", line 85, in __call__
ollamawebui | await self.app(scope, receive, send_wrapper)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 85, in __call__
ollamawebui | await self.app(scope, receive, send)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
ollamawebui | with collapse_excgroups():
ollamawebui | File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
ollamawebui | self.gen.throw(typ, value, traceback)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
ollamawebui | raise exc
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
ollamawebui | response = await self.dispatch_func(request, call_next)
ollamawebui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | File "/app/backend/open_webui/main.py", line 732, in inspect_websocket
ollamawebui | return await call_next(request)
ollamawebui | ^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
ollamawebui | raise app_exc
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
ollamawebui | await self.app(scope, receive_or_disconnect, send_no_error)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
ollamawebui | with collapse_excgroups():
ollamawebui | File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
ollamawebui | self.gen.throw(typ, value, traceback)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
ollamawebui | raise exc
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
ollamawebui | response = await self.dispatch_func(request, call_next)
ollamawebui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | File "/app/backend/open_webui/main.py", line 711, in check_url
ollamawebui | response = await call_next(request)
ollamawebui | ^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
ollamawebui | raise app_exc
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
ollamawebui | await self.app(scope, receive_or_disconnect, send_no_error)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
ollamawebui | with collapse_excgroups():
ollamawebui | File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
ollamawebui | self.gen.throw(typ, value, traceback)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
ollamawebui | raise exc
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
ollamawebui | response = await self.dispatch_func(request, call_next)
ollamawebui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | File "/app/backend/open_webui/main.py", line 701, in commit_session_after_request
ollamawebui | response = await call_next(request)
ollamawebui | ^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
ollamawebui | raise app_exc
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
ollamawebui | await self.app(scope, receive_or_disconnect, send_no_error)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
ollamawebui | with collapse_excgroups():
ollamawebui | File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
ollamawebui | self.gen.throw(typ, value, traceback)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
ollamawebui | raise exc
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
ollamawebui | response = await self.dispatch_func(request, call_next)
ollamawebui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | File "/app/backend/open_webui/utils/security_headers.py", line 11, in dispatch
ollamawebui | response = await call_next(request)
ollamawebui | ^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
ollamawebui | raise app_exc
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
ollamawebui | await self.app(scope, receive_or_disconnect, send_no_error)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
ollamawebui | with collapse_excgroups():
ollamawebui | File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
ollamawebui | self.gen.throw(typ, value, traceback)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
ollamawebui | raise exc
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
ollamawebui | response = await self.dispatch_func(request, call_next)
ollamawebui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | File "/app/backend/open_webui/main.py", line 690, in dispatch
ollamawebui | response = await call_next(request)
ollamawebui | ^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
ollamawebui | raise app_exc
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
ollamawebui | await self.app(scope, receive_or_disconnect, send_no_error)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
ollamawebui | await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
ollamawebui | raise exc
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
ollamawebui | await app(scope, receive, sender)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 756, in __call__
ollamawebui | await self.middleware_stack(scope, receive, send)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 776, in app
ollamawebui | await route.handle(scope, receive, send)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 297, in handle
ollamawebui | await self.app(scope, receive, send)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 77, in app
ollamawebui | await wrap_app_handling_exceptions(app, request)(scope, receive, send)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
ollamawebui | raise exc
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
ollamawebui | await app(scope, receive, sender)
ollamawebui | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 72, in app
ollamawebui | response = await func(request)
ollamawebui | ^^^^^^^^^^^^^^^^^^^
ollamawebui | File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 278, in app
ollamawebui | raw_response = await run_endpoint_function(
ollamawebui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
ollamawebui | return await dependant.call(**values)
ollamawebui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | File "/app/backend/open_webui/main.py", line 1121, in oauth_callback
ollamawebui | return await oauth_manager.handle_callback(provider, request, response)
ollamawebui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | File "/app/backend/open_webui/utils/oauth.py", line 283, in handle_callback
ollamawebui | user = Auths.insert_new_auth(
ollamawebui | ^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | File "/app/backend/open_webui/models/auths.py", line 118, in insert_new_auth
ollamawebui | user = Users.insert_new_user(
ollamawebui | ^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | File "/app/backend/open_webui/models/users.py", line 108, in insert_new_user
ollamawebui | user = UserModel(
ollamawebui | ^^^^^^^^^^
ollamawebui | File "/usr/local/lib/python3.11/site-packages/pydantic/main.py", line 212, in __init__
ollamawebui | validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
ollamawebui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ollamawebui | pydantic_core._pydantic_core.ValidationError: 1 validation error for UserModel
ollamawebui | name
ollamawebui | Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
ollamawebui | For further information visit https://errors.pydantic.dev/2.9/v/string_type
ollamawebui | INFO: connection closed
```
**Screenshots/Screen Recordings (if applicable):**

## Additional Information
The OAuth provider is Logto, and the added application is OIDC. I can use OAuth to log in to overwrite users who have registered with the same email address, and I can log in normally, but I cannot register new users. The permissions allowed by the Open WebUI application in Logto are set to `custom_data` `email` `profile`.
Some of the environment variables set in Docker are as follows:
```
- OAUTH_CLIENT_ID=*****************************
- OAUTH_CLIENT_SECRET=********************************************
- OPENID_PROVIDER_URL=https://****.*********.**/oidc/.well-known/openid-configuration
- ENABLE_OAUTH_SIGNUP=true
- ENABLE_LOGIN_FORM=false
- ENABLE_SIGNUP=true
- OAUTH_MERGE_ACCOUNTS_BY_EMAIL=true
```
## 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!
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 @imJack6 on GitHub (Jan 31, 2025).
Bug Report
Important Notes
Before submitting a bug report: Please check the Issues or Discussions section to see if a similar issue or feature request has already been posted. It's likely we're already tracking it! If you’re unsure, start a discussion post first. This will help us efficiently focus on improving the project.
Collaborate respectfully: We value a constructive attitude, so please be mindful of your communication. If negativity is part of your approach, our capacity to engage may be limited. We’re here to help if you’re open to learning and communicating positively. Remember, Open WebUI is a volunteer-driven project managed by a single maintainer and supported by contributors who also have full-time jobs. We appreciate your time and ask that you respect ours.
Contributing: If you encounter an issue, we highly encourage you to submit a pull request or fork the project. We actively work to prevent contributor burnout to maintain the quality and continuity of Open WebUI.
Bug reproducibility: If a bug cannot be reproduced with a
:mainor:devDocker setup, or a pip install with Python 3.11, it may require additional help from the community. In such cases, we will move it to the "issues" Discussions section due to our limited resources. We encourage the community to assist with these issues. Remember, it’s not that the issue doesn’t exist; we need your help!Note: Please remove the notes above when submitting your post. Thank you for your understanding and support!
Installation Method
Docker
Environment
Open WebUI Version: v0.5.7
Ollama (if applicable): 0.5.7
Operating System: Debian 11
Browser (if applicable): Edge 132.0.2957.127
Confirmation:
Expected Behavior:
New users can be registered using OAuth login
Actual Behavior:
Internal Server Error
Description
Bug Summary:
Cannot register new account using OAuth login
Reproduction Details
Steps to Reproduce:
Configure OAuth for Open WebUI, then log in to a new account through OAuth to register Open WebUI
Logs and Screenshots
Browser Console Logs:
Docker Container Logs:
Screenshots/Screen Recordings (if applicable):

Additional Information
The OAuth provider is Logto, and the added application is OIDC. I can use OAuth to log in to overwrite users who have registered with the same email address, and I can log in normally, but I cannot register new users. The permissions allowed by the Open WebUI application in Logto are set to
custom_dataemailprofile.Some of the environment variables set in Docker are as follows:
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!