TypeError: code.replaceAll is not a function #1329

Closed
opened 2025-11-11 14:42:57 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @leobenkel on GitHub (Jun 20, 2024).

Bug Report

Description

Bug Summary:

I am not sure what made it happen.
It seems that the model returned a code block.
And an error showed up in the console.

Environment

all latest
firefox

Reproduction Details

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.

Logs and Screenshots

Browser Console Logs:

Uncaught (in promise) TypeError: code.replaceAll is not a function
Please report this to https://github.com/markedjs/marked.
    codespan ResponseMessage.svelte:83
    parseInline Parser.ts:164
    text Renderer.ts:171
    parse Parser.ts:89
    listitem Renderer.ts:77
    list Renderer.ts:48
    parse Parser.ts:76
    parse Parser.ts:24
    parseMarkdown_fn Instance.ts:502
    marked marked.ts:11
    update ResponseMessage.svelte:506
    update ResponseMessage.svelte:1637
    update ResponseMessage.svelte:1247
    update ResponseMessage.svelte:930
    update ResponseMessage.svelte:4490
    update ResponseMessage.svelte:4636
    update scheduler.js:119
    flush scheduler.js:79
    promise callback*schedule_update scheduler.js:20
    make_dirty Component.js:81
    ctx Component.js:139
    sendPromptOllama Chat.svelte:1528
    sendPrompt Chat.svelte:521
    sendPrompt Chat.svelte:466
    submitPrompt Chat.svelte:386
    keypress_handler MessageInput.svelte:720
    listen dom.js:361
    listen_dev dev.js:133
    mount MessageInput.svelte:777
    mount MessageInput.svelte:2895
    m svelte-hooks.js:291
    mount_component Component.js:44
    mount Chat.svelte:429
    mount Chat.svelte:849
    m svelte-hooks.js:291
    mount_component Component.js:44
    mount +page.svelte:48
    m svelte-hooks.js:291
    mount_component Component.js:44
    update root.svelte:493
    update root.svelte:769
    update_slot_base utils.js:203
    update +layout.svelte:180
    update +layout.svelte:593
    update scheduler.js:119
    flush scheduler.js:79
    promise callback*schedule_update scheduler.js:20
    make_dirty Component.js:81
    ctx Component.js:139
    $$set root.svelte:1250
    get proxy.js:83
    $set Component.js:507
    key proxy.js:46
    navigate client.js:1399
ResponseMessage.svelte:83:23
Originally created by @leobenkel on GitHub (Jun 20, 2024). # Bug Report ## Description **Bug Summary:** I am not sure what made it happen. It seems that the model returned a code block. And an error showed up in the console. ## Environment all latest firefox ## Reproduction Details **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. ## Logs and Screenshots **Browser Console Logs:** ``` Uncaught (in promise) TypeError: code.replaceAll is not a function Please report this to https://github.com/markedjs/marked. codespan ResponseMessage.svelte:83 parseInline Parser.ts:164 text Renderer.ts:171 parse Parser.ts:89 listitem Renderer.ts:77 list Renderer.ts:48 parse Parser.ts:76 parse Parser.ts:24 parseMarkdown_fn Instance.ts:502 marked marked.ts:11 update ResponseMessage.svelte:506 update ResponseMessage.svelte:1637 update ResponseMessage.svelte:1247 update ResponseMessage.svelte:930 update ResponseMessage.svelte:4490 update ResponseMessage.svelte:4636 update scheduler.js:119 flush scheduler.js:79 promise callback*schedule_update scheduler.js:20 make_dirty Component.js:81 ctx Component.js:139 sendPromptOllama Chat.svelte:1528 sendPrompt Chat.svelte:521 sendPrompt Chat.svelte:466 submitPrompt Chat.svelte:386 keypress_handler MessageInput.svelte:720 listen dom.js:361 listen_dev dev.js:133 mount MessageInput.svelte:777 mount MessageInput.svelte:2895 m svelte-hooks.js:291 mount_component Component.js:44 mount Chat.svelte:429 mount Chat.svelte:849 m svelte-hooks.js:291 mount_component Component.js:44 mount +page.svelte:48 m svelte-hooks.js:291 mount_component Component.js:44 update root.svelte:493 update root.svelte:769 update_slot_base utils.js:203 update +layout.svelte:180 update +layout.svelte:593 update scheduler.js:119 flush scheduler.js:79 promise callback*schedule_update scheduler.js:20 make_dirty Component.js:81 ctx Component.js:139 $$set root.svelte:1250 get proxy.js:83 $set Component.js:507 key proxy.js:46 navigate client.js:1399 ResponseMessage.svelte:83:23 ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#1329