[GH-ISSUE #2956] bug: playground undeclared variable #28608

Closed
opened 2026-04-25 03:13:34 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @coder543 on GitHub (Jun 9, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/2956

Bug Report

Description

Bug Summary:

Uncaught (in promise) ReferenceError: assignment to undeclared variable currentRequestId
    ee Playground.svelte:84
    T Playground.svelte:214
    Ct Playground.svelte:380
    St dom.js:361
    m Playground.svelte:384
    m Playground.svelte:395
    _t Component.js:44
    m Playground.svelte:389
    _t Component.js:44
    p root.svelte:51
    wt utils.js:203
    p +layout.svelte:67
    at scheduler.js:119
    ut scheduler.js:79
    promise callback*lt scheduler.js:20
    ht Component.js:81
    ctx Component.js:139
    $$set root.svelte:62
    $set Component.js:507
    ce client.js:1129
    _start_router client.js:1603
    _start_router client.js:1521
    jt start.js:27
    <anonymous> playground:80
    promise callback* playground:79
Playground.svelte:84:5

Steps to Reproduce:
Use the Playground in completion mode with a text model (as you should, not an instruct/chat model). Do anything. You will get one opportunity to generate a completion, then the UI will break. The "cancel" button will not work, and it will not ever revert to a "submit" button.

I am using the latest docker image, and I checked before submitting this. It is very clearly just an untested piece of code. Probably just need to remove this line of code.

Originally created by @coder543 on GitHub (Jun 9, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/2956 # Bug Report ## Description **Bug Summary:** ``` Uncaught (in promise) ReferenceError: assignment to undeclared variable currentRequestId ee Playground.svelte:84 T Playground.svelte:214 Ct Playground.svelte:380 St dom.js:361 m Playground.svelte:384 m Playground.svelte:395 _t Component.js:44 m Playground.svelte:389 _t Component.js:44 p root.svelte:51 wt utils.js:203 p +layout.svelte:67 at scheduler.js:119 ut scheduler.js:79 promise callback*lt scheduler.js:20 ht Component.js:81 ctx Component.js:139 $$set root.svelte:62 $set Component.js:507 ce client.js:1129 _start_router client.js:1603 _start_router client.js:1521 jt start.js:27 <anonymous> playground:80 promise callback* playground:79 Playground.svelte:84:5 ``` **Steps to Reproduce:** Use the Playground in **completion** mode with a text model (as you should, not an instruct/chat model). Do anything. You will get one opportunity to generate a completion, then the UI will break. The "cancel" button will not work, and it will not ever revert to a "submit" button. I am using the latest docker image, and I checked before submitting this. It is very clearly just an untested piece of code. Probably just need to remove this line of code.
Author
Owner

@tjbck commented on GitHub (Jun 9, 2024):

Good catch, PR welcome!

<!-- gh-comment-id:2156864032 --> @tjbck commented on GitHub (Jun 9, 2024): Good catch, PR welcome!
Author
Owner

@coder543 commented on GitHub (Jun 9, 2024):

I don't have dev environment set up for this repo, sadly, and anything javascript related could take an hour or two to get fully set up... which is more than I want to spend on this bug at the moment. Instead, I'll just use ollama's completion API directly for this experiment. If there were a devcontainer in the repo, I might be able to easily test and submit a PR, but I'm not planning to blindly submit a PR without being able to test it.

<!-- gh-comment-id:2156869273 --> @coder543 commented on GitHub (Jun 9, 2024): I don't have dev environment set up for this repo, sadly, and anything javascript related could take an hour or two to get fully set up... which is more than I want to spend on this bug at the moment. Instead, I'll just use ollama's completion API directly for this experiment. If there were a `devcontainer` in the repo, I might be able to easily test and submit a PR, but I'm not planning to blindly submit a PR without being able to test it.
Author
Owner

@Qualzz commented on GitHub (Jun 9, 2024):

I was about to post this issue 2 minutes ago when I realised I was about to post in the ollama repo...
image

The "currentRequestId is not defined" is triggered when you clic on "cancel".

stopResponse

Playground.svelte:84 Uncaught (in promise) ReferenceError: currentRequestId is not defined
    at ee (Playground.svelte:84:6)
    at async T (Playground.svelte:214:11)

After that the button stay in cancel stay, and doesn't revert back to "Submit". Cuda activity does stops when cancelling, suggesting this is mostly a UX bug.

<!-- gh-comment-id:2156872024 --> @Qualzz commented on GitHub (Jun 9, 2024): I was about to post this issue 2 minutes ago when I realised I was about to post in the ollama repo... ![image](https://github.com/open-webui/open-webui/assets/35169816/4210e5b3-8afd-4e2f-a71d-67c82b9a0c0c) The "currentRequestId is not defined" is triggered when you clic on "cancel". `stopResponse` ``` Playground.svelte:84 Uncaught (in promise) ReferenceError: currentRequestId is not defined at ee (Playground.svelte:84:6) at async T (Playground.svelte:214:11) ``` After that the button stay in cancel stay, and doesn't revert back to "Submit". Cuda activity does stops when cancelling, suggesting this is mostly a UX bug.
Author
Owner

@tjbck commented on GitHub (Jun 10, 2024):

Fixed on dev!

<!-- gh-comment-id:2156932300 --> @tjbck commented on GitHub (Jun 10, 2024): Fixed on dev!
Author
Owner

@coder543 commented on GitHub (Jun 10, 2024):

@tjbck nice! thanks!

<!-- gh-comment-id:2157105747 --> @coder543 commented on GitHub (Jun 10, 2024): @tjbck nice! thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#28608