[GH-ISSUE #22748] issue: Uncaught (in promise) ReferenceError: idx is not defined in InputVariablesModal.svelte #35338

Closed
opened 2026-04-25 09:33:56 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @silentoplayz on GitHub (Mar 17, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/22748

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

Docker

Open WebUI Version

v0.8.10

Ollama Version (if applicable)

v0.18.0

Operating System

Ubuntu 24.04.4 LTS

Browser (if applicable)

Mozilla Firefox Snap for Ubuntu v148.0.2 (64-bit) / Google Chrome v146.0.7680.80 (Official Build) (64-bit)

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

When selecting a custom prompt (using the / trigger) that contains prompt variables (e.g., {{variable_name}}), a modal should appear allowing the user to fill in these variables. The modal should load the input fields and allow the user to save them to populate the chat input.

Actual Behavior

When the "Input Variables" modal appears, it displays a perpetual loading spinner/animation. The input fields never appear, and the browser console throws a ReferenceError: idx is not defined inside src/lib/components/chat/MessageInput/InputVariablesModal.svelte. This prevents the user from using any prompts that require variable input.

Steps to Reproduce

  1. Start an Open WebUI instance (v0.8.10).
  2. Create or navigate to a custom prompt that includes one or more prompt variables (e.g., Hello {{name}}).
  3. In the chat input, type / and select the custom prompt.
  4. Observe the "Input Variables" modal appearing.
  5. Notice the infinite loading spinner and the lack of input fields.
  6. Open the browser console to see the ReferenceError: idx is not defined.

Logs & Screenshots

Browser Console Error:

Uncaught (in promise) ReferenceError: idx is not defined
    w InputVariablesModal.svelte:39
    Ce runtime.js:749
    Us legacy.js:22
    pa legacy.js:43
    w InputVariablesModal.svelte:39
    jr InputVariablesModal.svelte:56
    Ce runtime.js:749
    effect effects.js:329
    Nr runtime.js:258
    Ye runtime.js:460
    Wt batch.js:350
    Gt batch.js:247
    flush batch.js:417
    ensure batch.js:579
    Fn utils.js:47
    Gn task.js:10
    Se task.js:28
    Se task.js:19
    ensure batch.js:573
    ct sources.js:193
    le sources.js:171
    we MessageInput.svelte:175
    O MessageInput.svelte:378
    onSelect CommandSuggestionList.svelte:70
    children Prompts.svelte:74
    s events.js:67
    Ft shared.js:44
    s events.js:66
    Cr events.js:85
    Ta events.js:119
    children Prompts.svelte:87
    o slot.js:28
    Hi Tooltip.svelte:79
    Jr svelte-element.js:116
    ensure branches.js:194
    Nr runtime.js:258
    Ye runtime.js:460
    Y effects.js:136
    Ie effects.js:438
    ensure branches.js:194
    Jr svelte-element.js:72
    Nr runtime.js:258
    Ye runtime.js:460
    Y effects.js:136
    Vs effects.js:415
    Jr svelte-element.js:58
    Hi Tooltip.svelte:70
    N Prompts.svelte:67
    e each.js:684
    Nr runtime.js:258
    Ye runtime.js:460
    Y effects.js:136
    Ie effects.js:438
    Me each.js:683
    o each.js:314
    Nr runtime.js:258
    Ye runtime.js:460
    Y effects.js:136
InputVariablesModal.svelte:39:59
    w InputVariablesModal.svelte:39
    Ce runtime.js:749
    Us legacy.js:22
    pa legacy.js:43
    w InputVariablesModal.svelte:39
    jr InputVariablesModal.svelte:56
    Ce runtime.js:749
    effect effects.js:329
    Nr runtime.js:258
    Ye runtime.js:460
    Wt batch.js:350
    Gt batch.js:247
    flush batch.js:417
    ensure batch.js:579
    Fn utils.js:47
    Gn task.js:10
    Se task.js:28
    (Async: VoidFunction)
    Se task.js:19
    ensure batch.js:573
    ct sources.js:193
    le sources.js:171
    we MessageInput.svelte:175
    O MessageInput.svelte:378
    InterpretGeneratorResume self-hosted:1312
    AsyncFunctionNext self-hosted:780
    (Async: async)
    onSelect CommandSuggestionList.svelte:70
    children Prompts.svelte:74
    s events.js:67
    Ft shared.js:44
    s events.js:66
    (Async: EventListener.handleEvent)
    Cr events.js:85
    Ta events.js:119
    children Prompts.svelte:87
    o slot.js:28
    Hi Tooltip.svelte:79
    Jr svelte-element.js:116
    ensure branches.js:194
    Nr runtime.js:258
    Ye runtime.js:460
    Y effects.js:136
    Ie effects.js:438
    ensure branches.js:194
    Jr svelte-element.js:72
    Nr runtime.js:258
    Ye runtime.js:460
    Y effects.js:136
    Vs effects.js:415
    Jr svelte-element.js:58
    Hi Tooltip.svelte:70
    N Prompts.svelte:67
    e each.js:684
    Nr runtime.js:258
    Ye runtime.js:460
    Y effects.js:136
    Ie effects.js:438
    Me each.js:683
    o each.js:314
    Nr runtime.js:258
    Ye runtime.js:460
    Y effects.js:136

Screenshot of Infinite Loading:
Infinite Loading Spinner in Input Variables Modal

Additional Information

  • The stack trace points to line 39 in src/lib/components/chat/MessageInput/InputVariablesModal.svelte, likely within the init function or a surrounding reactive block.
  • This effectively breaks the custom prompt variable feature for impacted users.
Originally created by @silentoplayz on GitHub (Mar 17, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/22748 ### 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 Docker ### Open WebUI Version v0.8.10 ### Ollama Version (if applicable) v0.18.0 ### Operating System Ubuntu 24.04.4 LTS ### Browser (if applicable) Mozilla Firefox Snap for Ubuntu v148.0.2 (64-bit) / Google Chrome v146.0.7680.80 (Official Build) (64-bit) ### 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 When selecting a custom prompt (using the `/` trigger) that contains prompt variables (e.g., `{{variable_name}}`), a modal should appear allowing the user to fill in these variables. The modal should load the input fields and allow the user to save them to populate the chat input. ### Actual Behavior When the "Input Variables" modal appears, it displays a perpetual loading spinner/animation. The input fields never appear, and the browser console throws a `ReferenceError: idx is not defined` inside `src/lib/components/chat/MessageInput/InputVariablesModal.svelte`. This prevents the user from using any prompts that require variable input. ### Steps to Reproduce 1. Start an Open WebUI instance (v0.8.10). 2. Create or navigate to a custom prompt that includes one or more prompt variables (e.g., `Hello {{name}}`). 3. In the chat input, type `/` and select the custom prompt. 4. Observe the "Input Variables" modal appearing. 5. Notice the infinite loading spinner and the lack of input fields. 6. Open the browser console to see the `ReferenceError: idx is not defined`. ### Logs & Screenshots **Browser Console Error:** ```js Uncaught (in promise) ReferenceError: idx is not defined w InputVariablesModal.svelte:39 Ce runtime.js:749 Us legacy.js:22 pa legacy.js:43 w InputVariablesModal.svelte:39 jr InputVariablesModal.svelte:56 Ce runtime.js:749 effect effects.js:329 Nr runtime.js:258 Ye runtime.js:460 Wt batch.js:350 Gt batch.js:247 flush batch.js:417 ensure batch.js:579 Fn utils.js:47 Gn task.js:10 Se task.js:28 Se task.js:19 ensure batch.js:573 ct sources.js:193 le sources.js:171 we MessageInput.svelte:175 O MessageInput.svelte:378 onSelect CommandSuggestionList.svelte:70 children Prompts.svelte:74 s events.js:67 Ft shared.js:44 s events.js:66 Cr events.js:85 Ta events.js:119 children Prompts.svelte:87 o slot.js:28 Hi Tooltip.svelte:79 Jr svelte-element.js:116 ensure branches.js:194 Nr runtime.js:258 Ye runtime.js:460 Y effects.js:136 Ie effects.js:438 ensure branches.js:194 Jr svelte-element.js:72 Nr runtime.js:258 Ye runtime.js:460 Y effects.js:136 Vs effects.js:415 Jr svelte-element.js:58 Hi Tooltip.svelte:70 N Prompts.svelte:67 e each.js:684 Nr runtime.js:258 Ye runtime.js:460 Y effects.js:136 Ie effects.js:438 Me each.js:683 o each.js:314 Nr runtime.js:258 Ye runtime.js:460 Y effects.js:136 InputVariablesModal.svelte:39:59 w InputVariablesModal.svelte:39 Ce runtime.js:749 Us legacy.js:22 pa legacy.js:43 w InputVariablesModal.svelte:39 jr InputVariablesModal.svelte:56 Ce runtime.js:749 effect effects.js:329 Nr runtime.js:258 Ye runtime.js:460 Wt batch.js:350 Gt batch.js:247 flush batch.js:417 ensure batch.js:579 Fn utils.js:47 Gn task.js:10 Se task.js:28 (Async: VoidFunction) Se task.js:19 ensure batch.js:573 ct sources.js:193 le sources.js:171 we MessageInput.svelte:175 O MessageInput.svelte:378 InterpretGeneratorResume self-hosted:1312 AsyncFunctionNext self-hosted:780 (Async: async) onSelect CommandSuggestionList.svelte:70 children Prompts.svelte:74 s events.js:67 Ft shared.js:44 s events.js:66 (Async: EventListener.handleEvent) Cr events.js:85 Ta events.js:119 children Prompts.svelte:87 o slot.js:28 Hi Tooltip.svelte:79 Jr svelte-element.js:116 ensure branches.js:194 Nr runtime.js:258 Ye runtime.js:460 Y effects.js:136 Ie effects.js:438 ensure branches.js:194 Jr svelte-element.js:72 Nr runtime.js:258 Ye runtime.js:460 Y effects.js:136 Vs effects.js:415 Jr svelte-element.js:58 Hi Tooltip.svelte:70 N Prompts.svelte:67 e each.js:684 Nr runtime.js:258 Ye runtime.js:460 Y effects.js:136 Ie effects.js:438 Me each.js:683 o each.js:314 Nr runtime.js:258 Ye runtime.js:460 Y effects.js:136 ``` **Screenshot of Infinite Loading:** <img width="800" alt="Infinite Loading Spinner in Input Variables Modal" src="https://github.com/user-attachments/assets/2db077c6-17f7-4f40-877f-8d38e6a5e8d6" /> ### Additional Information - The stack trace points to line 39 in `src/lib/components/chat/MessageInput/InputVariablesModal.svelte`, likely within the `init` function or a surrounding reactive block. - This effectively breaks the custom prompt variable feature for impacted users.
GiteaMirror added the bugconfirmed issue labels 2026-04-25 09:33:56 -05:00
Author
Owner

@tjbck commented on GitHub (Mar 22, 2026):

Should be addressed in dev.

<!-- gh-comment-id:4104995905 --> @tjbck commented on GitHub (Mar 22, 2026): Should be addressed in dev.
Author
Owner

@silentoplayz commented on GitHub (Mar 22, 2026):

Should be addressed in dev.

This is still an issue on the latest dev branch for me.

<!-- gh-comment-id:4105722580 --> @silentoplayz commented on GitHub (Mar 22, 2026): > Should be addressed in dev. This is still an issue on the latest `dev` branch for me.
Author
Owner
<!-- gh-comment-id:4105724121 --> @silentoplayz commented on GitHub (Mar 22, 2026): https://github.com/user-attachments/assets/a0cdeac6-7fd6-4840-8b61-38e41fad7523
Author
Owner

@silentoplayz commented on GitHub (Mar 22, 2026):

It looks like the 0dcd6ac983 commit on the dev branch has solved the issue! I'm closing out this issue report now. Thanks @tjbck! 🍻

<!-- gh-comment-id:4106004518 --> @silentoplayz commented on GitHub (Mar 22, 2026): It looks like the https://github.com/open-webui/open-webui/commit/0dcd6ac983bede06b8477179192154467f5b24a2 commit on the dev branch has solved the issue! I'm closing out this issue report now. Thanks @tjbck! 🍻
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#35338