[GH-ISSUE #4535] UI hangs when rendering mermaid diagrams #52314

Closed
opened 2026-05-05 13:26:50 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @mike-stewart on GitHub (Aug 12, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/4535

Originally assigned to: @tjbck on GitHub.

Bug Report

Installation Method

Docker

Environment

  • Open WebUI Version: v0.3.12
  • Browser (if applicable): Chrome 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:

A prompt that generates mermaid syntax should be displayed as a mermaid diagram.

Actual Behavior:

The UI hangs indefinitely midway through streaming the response, as soon as it tries to render the diagram. Refreshing the page resolves the problem.

Description

Bug Summary:
Rendering mermaid diagrams in streaming chat responses seems to have been broken between 0.3.11 and 0.3.12.

Reproduction Details

Steps to Reproduce:

  1. Enter the following prompt, using gpt-4o: "create a mermaid sequence diagram of the TLS handshake"
  2. The chat response will stop streaming as soon as it attempts to output the diagram, and it will indefinitely hang until the page is refreshed.
  3. Refresh the page, and you will see the full response including the diagram.

Logs and Screenshots

Screenshots/Screen Recordings (if applicable):

On 0.3.12:
Screenshot 2024-08-11 at 9 13 29 PM

On 0.3.11:
Screenshot 2024-08-11 at 9 15 57 PM

Additional Information

I can consistently reproduce this bug on 0.3.12, but not on 0.3.11.

Originally created by @mike-stewart on GitHub (Aug 12, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/4535 Originally assigned to: @tjbck on GitHub. # Bug Report ## Installation Method Docker ## Environment - **Open WebUI Version:** v0.3.12 - **Browser (if applicable):** Chrome 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: A prompt that generates mermaid syntax should be displayed as a mermaid diagram. ## Actual Behavior: The UI hangs indefinitely midway through streaming the response, as soon as it tries to render the diagram. Refreshing the page resolves the problem. ## Description **Bug Summary:** Rendering mermaid diagrams in streaming chat responses seems to have been broken between 0.3.11 and 0.3.12. ## Reproduction Details **Steps to Reproduce:** 1. Enter the following prompt, using gpt-4o: "create a mermaid sequence diagram of the TLS handshake" 2. The chat response will stop streaming as soon as it attempts to output the diagram, and it will indefinitely hang until the page is refreshed. 3. Refresh the page, and you will see the full response including the diagram. ## Logs and Screenshots **Screenshots/Screen Recordings (if applicable):** On 0.3.12: ![Screenshot 2024-08-11 at 9 13 29 PM](https://github.com/user-attachments/assets/4f1a2fa2-0d37-4175-9817-a17c77ee9ce0) On 0.3.11: ![Screenshot 2024-08-11 at 9 15 57 PM](https://github.com/user-attachments/assets/1b76e34e-b994-4750-afdb-022164223463) ## Additional Information I can consistently reproduce this bug on 0.3.12, but not on 0.3.11.
Author
Owner

@tjbck commented on GitHub (Aug 14, 2024):

Should be fixed on dev, let me know if the issue persists!

<!-- gh-comment-id:2288937962 --> @tjbck commented on GitHub (Aug 14, 2024): Should be fixed on dev, let me know if the issue persists!
Author
Owner

@mike-stewart commented on GitHub (Aug 15, 2024):

0.3.13 seems to have fixed it!

<!-- gh-comment-id:2291317000 --> @mike-stewart commented on GitHub (Aug 15, 2024): 0.3.13 seems to have fixed it!
Author
Owner

@mike-stewart commented on GitHub (Aug 16, 2024):

@tjbck Can you reopen this? The specific case I mentioned initially is fixed, but I can still reproduce it when asking for Pie charts. The only difference is that now the UI doesn't hang, it just deletes the visualization after momentarily displaying it.

Screen recording:
https://github.com/user-attachments/assets/462cc646-2c9f-4b1f-ae98-acb4561b594c

<!-- gh-comment-id:2293768634 --> @mike-stewart commented on GitHub (Aug 16, 2024): @tjbck Can you reopen this? The specific case I mentioned initially is fixed, but I can still reproduce it when asking for Pie charts. The only difference is that now the UI doesn't hang, it just deletes the visualization after momentarily displaying it. Screen recording: https://github.com/user-attachments/assets/462cc646-2c9f-4b1f-ae98-acb4561b594c
Author
Owner

@mike-stewart commented on GitHub (Aug 19, 2024):

Opened #4731

<!-- gh-comment-id:2296784678 --> @mike-stewart commented on GitHub (Aug 19, 2024): Opened #4731
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#52314