[GH-ISSUE #15919] issue: Models loading stuck in infinite loop #17720

Closed
opened 2026-04-19 23:35:00 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @eric-burel on GitHub (Jul 21, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/15919

Check Existing Issues

  • I have searched the existing issues and discussions.
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

v0.6.18

Ollama Version (if applicable)

No response

Operating System

Ubuntu 24.04.2 LTS

Browser (if applicable)

Chromium Version 138.0.7204.157 (Build officiel) snap (64 bits)

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

List Mistral models

Actual Behavior

After adding an OpenAI API connection (on Mistral endpoint), going through the "models" tab will stay stuck to a loading spinner, changing tabs then stops working (the spinner stays there).

Image

Steps to Reproduce

  1. Install with Docker
docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main
  1. Add Mistral as an OpenAI compatible API : https://api.mistral.ai/v1 + API key
  2. Go to "Models" tab => spinner is displayed

Logs & Screenshots

Image

Browser logs :

Models.svelte:66 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'localeCompare')
    at Models.svelte:66:19
    at Array.sort (<anonymous>)
    at B1.l.$$.update (Models.svelte:60:5)

Docker logs:

NFO:     Started server process [1]
INFO:     Waiting for application startup.
2025-07-21 16:06:47.280 | INFO     | open_webui.utils.logger:start_logger:157 - GLOBAL_LOG_LEVEL: INFO - {}
2025-07-21 16:06:47.280 | INFO     | open_webui.main:lifespan:519 - Installing external dependencies of functions and tools... - {}
2025-07-21 16:06:47.292 | INFO     | open_webui.utils.plugin:install_frontmatter_requirements:241 - No requirements found in frontmatter. - {}
2025-07-21 16:07:24.890 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 172.17.0.1:55146 - "GET /_app/version.json HTTP/1.1" 200 - {}
2025-07-21 16:08:25.888 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 172.17.0.1:59644 - "GET /_app/version.json HTTP/1.1" 200 - {}

Additional Information

No response

Originally created by @eric-burel on GitHub (Jul 21, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/15919 ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version v0.6.18 ### Ollama Version (if applicable) _No response_ ### Operating System Ubuntu 24.04.2 LTS ### Browser (if applicable) Chromium Version 138.0.7204.157 (Build officiel) snap (64 bits) ### 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 List Mistral models ### Actual Behavior After adding an OpenAI API connection (on Mistral endpoint), going through the "models" tab will stay stuck to a loading spinner, changing tabs then stops working (the spinner stays there). <img width="1419" height="353" alt="Image" src="https://github.com/user-attachments/assets/eefe68a0-8033-4805-90a9-ffcd014025d0" /> ### Steps to Reproduce 1. Install with Docker ```sh docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main ``` 3. Add Mistral as an OpenAI compatible API : `https://api.mistral.ai/v1` + API key 4. Go to "Models" tab => spinner is displayed ### Logs & Screenshots <img width="993" height="443" alt="Image" src="https://github.com/user-attachments/assets/d5a1b3d0-fa41-41ce-b378-d2bae5a541f6" /> Browser logs : ```txt Models.svelte:66 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'localeCompare') at Models.svelte:66:19 at Array.sort (<anonymous>) at B1.l.$$.update (Models.svelte:60:5) ``` Docker logs: ``` NFO: Started server process [1] INFO: Waiting for application startup. 2025-07-21 16:06:47.280 | INFO | open_webui.utils.logger:start_logger:157 - GLOBAL_LOG_LEVEL: INFO - {} 2025-07-21 16:06:47.280 | INFO | open_webui.main:lifespan:519 - Installing external dependencies of functions and tools... - {} 2025-07-21 16:06:47.292 | INFO | open_webui.utils.plugin:install_frontmatter_requirements:241 - No requirements found in frontmatter. - {} 2025-07-21 16:07:24.890 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.17.0.1:55146 - "GET /_app/version.json HTTP/1.1" 200 - {} 2025-07-21 16:08:25.888 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.17.0.1:59644 - "GET /_app/version.json HTTP/1.1" 200 - {} ``` ### Additional Information _No response_
GiteaMirror added the bug label 2026-04-19 23:35:00 -05:00
Author
Owner

@muka commented on GitHub (Aug 12, 2025):

To me happened just after adding antrophic openai api endpoint

Image
<!-- gh-comment-id:3180060913 --> @muka commented on GitHub (Aug 12, 2025): To me happened just after adding antrophic openai api endpoint <img width="274" height="175" alt="Image" src="https://github.com/user-attachments/assets/f978dc2d-8db3-4676-94fc-c9d3aab73a91" />
Author
Owner

@oboeglen commented on GitHub (Aug 12, 2025):

Bug seems remaining in 0.6.2, any solutions ?

Error : Uncaught (in promise) TypeError: can't access property "localeCompare", X.name is null

<!-- gh-comment-id:3180999042 --> @oboeglen commented on GitHub (Aug 12, 2025): Bug seems remaining in 0.6.2, any solutions ? Error : Uncaught (in promise) TypeError: can't access property "localeCompare", X.name is null
Author
Owner

@rgaricano commented on GitHub (Aug 19, 2025):

(commented in https://discord.com/channels/1170866489302188073/1407314327257612308 )

If you want try this fix:
change
https://github.com/open-webui/open-webui/blob/main/src/lib/components/admin/Settings/Models.svelte#L66
by
return (a.name || '').localeCompare(b.name || '');
and rebuild

EDITED,
In production images don't include source code - they only contain compiled files.

To apply this fix correctly, you need to use an image that includes source code (like :dev) or clone the repository and use docker-compose for development.

If docker you can try with this script for make the changes and rebuild frontend inside the docker:
(is a bash script, if you are in mswindows just run the commands by hand or make a bat)

#!/bin/bash  
  
# Script to verify container structure and apply the fix  
  
CONTAINER_NAME="open-webui"  
  
echo "🔍 Verifying container structure..."  
  
# Check if frontend build directory exists  
if docker exec $CONTAINER_NAME test -d "/app/build"; then  
    echo "✅ Found build directory at /app/build"  
    echo "❌ This is a production image - source code cannot be edited"  
    echo "💡 You need to use a development image or rebuild from source code"  
      
    echo ""  
    echo "Available options:"  
    echo "1. Use the :dev image for development:"  
    echo "   docker run -d -p 3000:8080 -v open-webui:/app/backend/data --name open-webui-dev ghcr.io/open-webui/open-webui:dev"  
    echo ""  
    echo "2. Or clone the repository and use docker-compose:"  
    echo "   git clone https://github.com/open-webui/open-webui.git"  
    echo "   cd open-webui"  
    echo "   # Edit src/lib/components/admin/Settings/Models.svelte line 66"  
    echo "   # Change: return a.name.localeCompare(b.name);"  
    echo "   # To: return (a.name || '').localeCompare(b.name || '');"  
    echo "   docker-compose up -d"  
      
elif docker exec $CONTAINER_NAME test -d "/app/src"; then  
    echo "✅ Found source code at /app/src"  
    echo "🔧 Applying fix..."  
      
    # Create backup  
    docker exec $CONTAINER_NAME cp /app/src/lib/components/admin/Settings/Models.svelte /app/src/lib/components/admin/Settings/Models.svelte.backup  
      
    # Apply fix  
    docker exec $CONTAINER_NAME sed -i 's/return a\.name\.localeCompare(b\.name);/return (a.name || "").localeCompare(b.name || "");/g' /app/src/lib/components/admin/Settings/Models.svelte  
      
    # Verify change  
    echo "📋 Verifying changes..."  
    docker exec $CONTAINER_NAME grep -n "localeCompare" /app/src/lib/components/admin/Settings/Models.svelte  
      
    # Rebuild  
    echo "🔨 Rebuilding..."  
    docker exec $CONTAINER_NAME npm run build  
      
    echo "✅ Fix applied successfully"  
else  
    echo "❌ Neither source code nor build found"  
    echo "🔍 Container structure:"  
    docker exec $CONTAINER_NAME ls -la /app/  
fi

(I'm not using docker, I didn't tried it)

<!-- gh-comment-id:3201973451 --> @rgaricano commented on GitHub (Aug 19, 2025): (commented in https://discord.com/channels/1170866489302188073/1407314327257612308 ) If you want try this fix: change https://github.com/open-webui/open-webui/blob/main/src/lib/components/admin/Settings/Models.svelte#L66 by ` return (a.name || '').localeCompare(b.name || '');` and rebuild EDITED, In production images don't include source code - they only contain compiled files. To apply this fix correctly, you need to use an image that includes source code (like :dev) or clone the repository and use docker-compose for development. If docker you can try with this script for make the changes and rebuild frontend inside the docker: (is a bash script, if you are in mswindows just run the commands by hand or make a bat) ``` #!/bin/bash # Script to verify container structure and apply the fix CONTAINER_NAME="open-webui" echo "🔍 Verifying container structure..." # Check if frontend build directory exists if docker exec $CONTAINER_NAME test -d "/app/build"; then echo "✅ Found build directory at /app/build" echo "❌ This is a production image - source code cannot be edited" echo "💡 You need to use a development image or rebuild from source code" echo "" echo "Available options:" echo "1. Use the :dev image for development:" echo " docker run -d -p 3000:8080 -v open-webui:/app/backend/data --name open-webui-dev ghcr.io/open-webui/open-webui:dev" echo "" echo "2. Or clone the repository and use docker-compose:" echo " git clone https://github.com/open-webui/open-webui.git" echo " cd open-webui" echo " # Edit src/lib/components/admin/Settings/Models.svelte line 66" echo " # Change: return a.name.localeCompare(b.name);" echo " # To: return (a.name || '').localeCompare(b.name || '');" echo " docker-compose up -d" elif docker exec $CONTAINER_NAME test -d "/app/src"; then echo "✅ Found source code at /app/src" echo "🔧 Applying fix..." # Create backup docker exec $CONTAINER_NAME cp /app/src/lib/components/admin/Settings/Models.svelte /app/src/lib/components/admin/Settings/Models.svelte.backup # Apply fix docker exec $CONTAINER_NAME sed -i 's/return a\.name\.localeCompare(b\.name);/return (a.name || "").localeCompare(b.name || "");/g' /app/src/lib/components/admin/Settings/Models.svelte # Verify change echo "📋 Verifying changes..." docker exec $CONTAINER_NAME grep -n "localeCompare" /app/src/lib/components/admin/Settings/Models.svelte # Rebuild echo "🔨 Rebuilding..." docker exec $CONTAINER_NAME npm run build echo "✅ Fix applied successfully" else echo "❌ Neither source code nor build found" echo "🔍 Container structure:" docker exec $CONTAINER_NAME ls -la /app/ fi ``` (I'm not using docker, I didn't tried it)
Author
Owner

@jtabox commented on GitHub (Aug 21, 2025):

Have been having the same issue... Read the comment in Discord but I'm not sure if a fix is live or not. On v0.6.22 via Docker. Will try the Docker script, it's just kinda impractical to do that every time I restart.

<!-- gh-comment-id:3208502387 --> @jtabox commented on GitHub (Aug 21, 2025): Have been having the same issue... Read the comment in Discord but I'm not sure if a fix is live or not. On `v0.6.22` via Docker. Will try the Docker script, it's just kinda impractical to do that every time I restart.
Author
Owner

@rgaricano commented on GitHub (Aug 21, 2025):

I edited my previous message, because the first script I posted used a build that doesn't include src, Node.js or development dependencies.

<!-- gh-comment-id:3208618948 --> @rgaricano commented on GitHub (Aug 21, 2025): I edited my previous message, because the first script I posted used a build that doesn't include src, Node.js or development dependencies.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#17720