🐛 ReferenceError: appData is not defined #20

Closed
opened 2026-02-15 20:16:49 -05:00 by yindo · 1 comment
Owner

Originally created by @gabe-l-hart on GitHub (Feb 3, 2025).

Description

Disclaimer: I'm a total novice at frontend frameworks, so this could easily be user error!

When trying to run in development mode (npm run start), I'm able to get through the initial installation phase and Open WebUI boots successfully in a subprocess (I can access it via http://localhost:8080 in a browser tab), but the Electron app fails to render. It reaches the stage where it attempts to render the main UI, but only displays a black page with the OI logo. The console shows the following error:

Image

Full Log
VM4 sandbox_bundle:2 Electron Security Warning (Insecure Content-Security-Policy) This renderer process has either no Content Security
  Policy set or a policy with "unsafe-eval" enabled. This exposes users of
  this app to unnecessary security risks.

For more information and help, consult
https://electronjs.org/docs/tutorial/security.
This warning will not show up
once the app is packaged.
warnAboutInsecureCSP @ VM4 sandbox_bundle:2
logSecurityWarnings @ VM4 sandbox_bundle:2
(anonymous) @ VM4 sandbox_bundle:2
load
securityWarnings @ VM4 sandbox_bundle:2
./lib/renderer/common-init.ts @ VM4 sandbox_bundle:2
__webpack_require__ @ VM4 sandbox_bundle:2
(anonymous) @ VM4 sandbox_bundle:2
(anonymous) @ VM4 sandbox_bundle:2
___electron_webpack_init__ @ VM4 sandbox_bundle:2
(anonymous) @ VM4 sandbox_bundle:2
+layout.svelte:218 Uncaught (in promise) ReferenceError: appData is not defined
    at +layout.svelte:218:6
(anonymous) @ +layout.svelte:218
await in (anonymous)
J @ utils.js:41
(anonymous) @ Component.js:47
_t @ scheduler.js:99
jt @ Component.js:164
Et @ root.svelte:23
se @ client.js:451
J @ client.js:1428
await in J
oe @ client.js:384
fn @ client.js:1756
vn @ client.js:311
await in vn
(anonymous) @ (index):105
Promise.then
(anonymous) @ (index):104
Show 9 more frames
Show less

Environment

  • Platform: MacOS 15 .1.1, M3 Max
  • Repo Commit: c36ab79
  • Node: v22.13.0

package-lock.json

Repro Steps

  1. use nvm to select v22 (=> v22.13.0)
  2. npm i
  3. npm run create:python-tar
  4. npm run start

My only thought was that this was caused by an incompatibility with the latest version of open-webui's frontend, so I modified this line to pass 0.5.6 as the pinned version. I verified in the terminal logs that it installed v0.5.6, but that did not fix the issue.

Originally created by @gabe-l-hart on GitHub (Feb 3, 2025). ## Description **Disclaimer**: I'm a total novice at frontend frameworks, so this could easily be user error! When trying to run in development mode (`npm run start`), I'm able to get through the initial installation phase and Open WebUI boots successfully in a subprocess (I can access it via `http://localhost:8080` in a browser tab), but the Electron app fails to render. It reaches the stage where it attempts to render the main UI, but only displays a black page with the `OI` logo. The console shows the following error: ![Image](https://github.com/user-attachments/assets/61106bd9-6ceb-4637-8161-c5ed2bfa13a6) <details> <summary>Full Log</summary> ``` VM4 sandbox_bundle:2 Electron Security Warning (Insecure Content-Security-Policy) This renderer process has either no Content Security Policy set or a policy with "unsafe-eval" enabled. This exposes users of this app to unnecessary security risks. For more information and help, consult https://electronjs.org/docs/tutorial/security. This warning will not show up once the app is packaged. warnAboutInsecureCSP @ VM4 sandbox_bundle:2 logSecurityWarnings @ VM4 sandbox_bundle:2 (anonymous) @ VM4 sandbox_bundle:2 load securityWarnings @ VM4 sandbox_bundle:2 ./lib/renderer/common-init.ts @ VM4 sandbox_bundle:2 __webpack_require__ @ VM4 sandbox_bundle:2 (anonymous) @ VM4 sandbox_bundle:2 (anonymous) @ VM4 sandbox_bundle:2 ___electron_webpack_init__ @ VM4 sandbox_bundle:2 (anonymous) @ VM4 sandbox_bundle:2 +layout.svelte:218 Uncaught (in promise) ReferenceError: appData is not defined at +layout.svelte:218:6 (anonymous) @ +layout.svelte:218 await in (anonymous) J @ utils.js:41 (anonymous) @ Component.js:47 _t @ scheduler.js:99 jt @ Component.js:164 Et @ root.svelte:23 se @ client.js:451 J @ client.js:1428 await in J oe @ client.js:384 fn @ client.js:1756 vn @ client.js:311 await in vn (anonymous) @ (index):105 Promise.then (anonymous) @ (index):104 Show 9 more frames Show less ``` </details> ## Environment * Platform: MacOS 15 .1.1, M3 Max * Repo Commit: `c36ab79` * Node: `v22.13.0` [package-lock.json](https://github.com/user-attachments/files/18649439/package-lock.json) ## Repro Steps 1. use `nvm` to select `v22` (=> `v22.13.0`) 2. `npm i` 3. `npm run create:python-tar` 4. `npm run start` My only thought was that this was caused by an incompatibility with the latest version of `open-webui`'s frontend, so I modified [this line](https://github.com/open-webui/desktop/blob/main/src/utils/index.ts#L335) to pass `0.5.6` as the pinned version. I verified in the terminal logs that it installed `v0.5.6`, but that did not fix the issue.
yindo closed this issue 2026-02-15 20:16:49 -05:00
Author
Owner

@gabe-l-hart commented on GitHub (Feb 3, 2025):

I also tried downgrading electron-forge to 7.5.0 in case it was related to this issue, but no luck.

@gabe-l-hart commented on GitHub (Feb 3, 2025): I also tried downgrading `electron-forge` to `7.5.0` in case it was related to [this issue](https://github.com/open-webui/desktop/issues/23), but no luck.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: open-webui/desktop#20