[GH-ISSUE #24178] issue: 0.9.2 upload file/image broken: Unexpected token 'I', "Internal S"... is not valid JSON #58889

Closed
opened 2026-05-06 00:21:21 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @bitsofinfo on GitHub (Apr 27, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/24178

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!).
  • I am using the latest version of Open WebUI.

Installation Method

Git Clone

Open WebUI Version

0.9.2

Ollama Version (if applicable)

No response

Operating System

any

Browser (if applicable)

any

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using 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 every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

Upgraded from 0.8.10 to 0.9.2. In user chat, add a image file. Get immediate UI error

Unexpected token 'I', "Internal S"... is not valid JSON

500 error to api/v1/files/?process=false

Console

open-webui-1           | 2026-04-27 17:44:29.209 | INFO     | uvicorn.protocols.http.httptools_impl:send:483 - 140.82.114.6:0 - "POST /api/v1/files/?process=false HTTP/1.1" 500
open-webui-1           | Exception in ASGI application
open-webui-1           | Traceback (most recent call last):
open-webui-1           |   File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 416, in run_asgi
open-webui-1           |     result = await app(  # type: ignore[func-returns-value]
open-webui-1           |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
open-webui-1           |   File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in __call__
open-webui-1           |     return await self.app(scope, receive, send)
open-webui-1           |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
open-webui-1           |   File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1160, in __call__
open-webui-1           |     await super().__call__(scope, receive, send)
open-webui-1           |   File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 90, in __call__
open-webui-1           |     await self.middleware_stack(scope, receive, send)
open-webui-1           |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
open-webui-1           |     raise exc
open-webui-1           |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
open-webui-1           |     await self.app(scope, receive, _send)
open-webui-1           |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/sessions.py", line 88, in __call__
open-webui-1           |     await self.app(scope, receive, send_wrapper)
open-webui-1           |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 96, in __call__
open-webui-1           |     await self.simple_response(scope, receive, send, request_headers=headers)
open-webui-1           |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 154, in simple_response
open-webui-1           |     await self.app(scope, receive, send)
open-webui-1           |   File "/app/backend/open_webui/utils/asgi_middleware.py", line 207, in __call__
open-webui-1           |     await self.app(scope, receive, send)
open-webui-1           |   File "/app/backend/open_webui/utils/asgi_middleware.py", line 171, in __call__
open-webui-1           |     await self.app(scope, receive, send_with_timing)
open-webui-1           |   File "/app/backend/open_webui/utils/asgi_middleware.py", line 92, in __call__
open-webui-1           |     await self.app(scope, receive, send)
open-webui-1           |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
open-webui-1           |     with recv_stream, send_stream, collapse_excgroups():
open-webui-1           |   File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
open-webui-1           |     self.gen.throw(typ, value, traceback)
open-webui-1           |   File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 87, in collapse_excgroups
open-webui-1           |     raise exc
open-webui-1           |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 193, in __call__
open-webui-1           |     response = await self.dispatch_func(request, call_next)
open-webui-1           |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
open-webui-1           |   File "/app/backend/open_webui/utils/security_headers.py", line 11, in dispatch
open-webui-1           |     response = await call_next(request)
open-webui-1           |                ^^^^^^^^^^^^^^^^^^^^^^^^
open-webui-1           |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 168, in call_next
open-webui-1           |     raise app_exc from app_exc.__cause__ or app_exc.__context__
open-webui-1           |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 144, in coro
open-webui-1           |     await self.app(scope, receive_or_disconnect, send_no_error)
open-webui-1           |   File "/app/backend/open_webui/utils/asgi_middleware.py", line 223, in __call__
open-webui-1           |     await self.app(scope, receive, send)
open-webui-1           |   File "/usr/local/lib/python3.11/site-packages/starlette_compress/__init__.py", line 104, in __call__
open-webui-1           |     return await self._zstd(scope, receive, send)
open-webui-1           |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
open-webui-1           |   File "/usr/local/lib/python3.11/site-packages/starlette_compress/_zstd_legacy.py", line 107, in __call__
open-webui-1           |     await self.app(scope, receive, wrapper)
open-webui-1           |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 63, in __call__
open-webui-1           |     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
open-webui-1           |   File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
open-webui-1           |     raise exc
open-webui-1           |   File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
open-webui-1           |     await app(scope, receive, sender)
open-webui-1           |   File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
open-webui-1           |     await self.app(scope, receive, send)
open-webui-1           |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 660, in __call__
open-webui-1           |     await self.middleware_stack(scope, receive, send)
open-webui-1           |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 680, in app
open-webui-1           |     await route.handle(scope, receive, send)
open-webui-1           |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 276, in handle
open-webui-1           |     await self.app(scope, receive, send)
open-webui-1           |   File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 130, in app
open-webui-1           |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)
open-webui-1           |   File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
open-webui-1           |     raise exc
open-webui-1           |   File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
open-webui-1           |     await app(scope, receive, sender)
open-webui-1           |   File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 116, in app
open-webui-1           |     response = await f(request)
open-webui-1           |                ^^^^^^^^^^^^^^^^
open-webui-1           |   File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 691, in app
open-webui-1           |     content = await serialize_response(
open-webui-1           |               ^^^^^^^^^^^^^^^^^^^^^^^^^
open-webui-1           |   File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 296, in serialize_response
open-webui-1           |     raise ResponseValidationError(
open-webui-1           | fastapi.exceptions.ResponseValidationError: 1 validation error:
open-webui-1           |   {'type': 'model_attributes_type', 'loc': ('response',), 'msg': 'Input should be a valid dictionary or object to extract fields from', 'input': <coroutine object FilesTable.insert_new_file at 0xffff2dab1930>}
open-webui-1           |
open-webui-1           |   File "/app/backend/open_webui/routers/files.py", line 167, in upload_file
open-webui-1           |     POST /api/v1/files/

Actual Behavior

see above

Steps to Reproduce

see above

Logs & Screenshots

see above

Additional Information

No response

Originally created by @bitsofinfo on GitHub (Apr 27, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/24178 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!). - [x] I am using the latest version of Open WebUI. ### Installation Method Git Clone ### Open WebUI Version 0.9.2 ### Ollama Version (if applicable) _No response_ ### Operating System any ### Browser (if applicable) any ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using 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 every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior Upgraded from 0.8.10 to 0.9.2. In user chat, add a image file. Get immediate UI error `Unexpected token 'I', "Internal S"... is not valid JSON` 500 error to `api/v1/files/?process=false` Console ``` open-webui-1 | 2026-04-27 17:44:29.209 | INFO | uvicorn.protocols.http.httptools_impl:send:483 - 140.82.114.6:0 - "POST /api/v1/files/?process=false HTTP/1.1" 500 open-webui-1 | Exception in ASGI application open-webui-1 | Traceback (most recent call last): open-webui-1 | File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 416, in run_asgi open-webui-1 | result = await app( # type: ignore[func-returns-value] open-webui-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ open-webui-1 | File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in __call__ open-webui-1 | return await self.app(scope, receive, send) open-webui-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ open-webui-1 | File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1160, in __call__ open-webui-1 | await super().__call__(scope, receive, send) open-webui-1 | File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 90, in __call__ open-webui-1 | await self.middleware_stack(scope, receive, send) open-webui-1 | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__ open-webui-1 | raise exc open-webui-1 | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__ open-webui-1 | await self.app(scope, receive, _send) open-webui-1 | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/sessions.py", line 88, in __call__ open-webui-1 | await self.app(scope, receive, send_wrapper) open-webui-1 | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 96, in __call__ open-webui-1 | await self.simple_response(scope, receive, send, request_headers=headers) open-webui-1 | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 154, in simple_response open-webui-1 | await self.app(scope, receive, send) open-webui-1 | File "/app/backend/open_webui/utils/asgi_middleware.py", line 207, in __call__ open-webui-1 | await self.app(scope, receive, send) open-webui-1 | File "/app/backend/open_webui/utils/asgi_middleware.py", line 171, in __call__ open-webui-1 | await self.app(scope, receive, send_with_timing) open-webui-1 | File "/app/backend/open_webui/utils/asgi_middleware.py", line 92, in __call__ open-webui-1 | await self.app(scope, receive, send) open-webui-1 | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__ open-webui-1 | with recv_stream, send_stream, collapse_excgroups(): open-webui-1 | File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__ open-webui-1 | self.gen.throw(typ, value, traceback) open-webui-1 | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 87, in collapse_excgroups open-webui-1 | raise exc open-webui-1 | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 193, in __call__ open-webui-1 | response = await self.dispatch_func(request, call_next) open-webui-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ open-webui-1 | File "/app/backend/open_webui/utils/security_headers.py", line 11, in dispatch open-webui-1 | response = await call_next(request) open-webui-1 | ^^^^^^^^^^^^^^^^^^^^^^^^ open-webui-1 | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 168, in call_next open-webui-1 | raise app_exc from app_exc.__cause__ or app_exc.__context__ open-webui-1 | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 144, in coro open-webui-1 | await self.app(scope, receive_or_disconnect, send_no_error) open-webui-1 | File "/app/backend/open_webui/utils/asgi_middleware.py", line 223, in __call__ open-webui-1 | await self.app(scope, receive, send) open-webui-1 | File "/usr/local/lib/python3.11/site-packages/starlette_compress/__init__.py", line 104, in __call__ open-webui-1 | return await self._zstd(scope, receive, send) open-webui-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ open-webui-1 | File "/usr/local/lib/python3.11/site-packages/starlette_compress/_zstd_legacy.py", line 107, in __call__ open-webui-1 | await self.app(scope, receive, wrapper) open-webui-1 | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 63, in __call__ open-webui-1 | await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) open-webui-1 | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app open-webui-1 | raise exc open-webui-1 | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app open-webui-1 | await app(scope, receive, sender) open-webui-1 | File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__ open-webui-1 | await self.app(scope, receive, send) open-webui-1 | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 660, in __call__ open-webui-1 | await self.middleware_stack(scope, receive, send) open-webui-1 | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 680, in app open-webui-1 | await route.handle(scope, receive, send) open-webui-1 | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 276, in handle open-webui-1 | await self.app(scope, receive, send) open-webui-1 | File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 130, in app open-webui-1 | await wrap_app_handling_exceptions(app, request)(scope, receive, send) open-webui-1 | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app open-webui-1 | raise exc open-webui-1 | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app open-webui-1 | await app(scope, receive, sender) open-webui-1 | File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 116, in app open-webui-1 | response = await f(request) open-webui-1 | ^^^^^^^^^^^^^^^^ open-webui-1 | File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 691, in app open-webui-1 | content = await serialize_response( open-webui-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^ open-webui-1 | File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 296, in serialize_response open-webui-1 | raise ResponseValidationError( open-webui-1 | fastapi.exceptions.ResponseValidationError: 1 validation error: open-webui-1 | {'type': 'model_attributes_type', 'loc': ('response',), 'msg': 'Input should be a valid dictionary or object to extract fields from', 'input': <coroutine object FilesTable.insert_new_file at 0xffff2dab1930>} open-webui-1 | open-webui-1 | File "/app/backend/open_webui/routers/files.py", line 167, in upload_file open-webui-1 | POST /api/v1/files/ ``` ### Actual Behavior see above ### Steps to Reproduce see above ### Logs & Screenshots see above ### Additional Information _No response_
GiteaMirror added the bug label 2026-05-06 00:21:21 -05:00
Author
Owner

@Classic298 commented on GitHub (Apr 27, 2026):

Please provide proper reproduction steps. Images upload just works fine for me..cannot reproduce anything. Websocket?

<!-- gh-comment-id:4329406387 --> @Classic298 commented on GitHub (Apr 27, 2026): Please provide proper reproduction steps. Images upload just works fine for me..cannot reproduce anything. Websocket?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#58889