-
|
I have been using wails for a while now. What has been really annoying about the library is the fact that after I modify frontend code that relies on the generated bindings in the Navbar.svelte:14 init 0
Navbar.svelte:18 Fetching notebook entry to calculate streaks
error-handling.js:36 Uncaught TypeError: Cannot read properties of undefined (reading 'main')
at GetNotebookEntry (App.js:14:22)
at Navbar.svelte:19:9
at untrack (runtime.js:732:10)
at $effect (index-client.js:100:20)
at update_reaction (runtime.js:292:16)
at update_effect (runtime.js:472:18)
at flush_queued_effects (batch.js:606:4)
at _Batch.process (batch.js:233:4)
at flush_effects (batch.js:561:10)
at _Batch.flush (batch.js:381:4)
GetNotebookEntry @ App.js:14
(anonymous) @ Navbar.svelte:19
untrack @ runtime.js:732
$effect @ index-client.js:100
update_reaction @ runtime.js:292
update_effect @ runtime.js:472
flush_queued_effects @ batch.js:606
process @ batch.js:233
flush_effects @ batch.js:561
flush @ batch.js:381
(anonymous) @ batch.js:460
dequeue @ batch.js:69
error-handling.js:36 Uncaught TypeError: Cannot read properties of undefined (reading 'main')
at GetConfig (App.js:6:22)
at Settings.svelte:11:9
at untrack (runtime.js:732:10)
at $effect (index-client.js:100:20)
at update_reaction (runtime.js:292:16)
at update_effect (runtime.js:472:18)
at flush_queued_effects (batch.js:606:4)
at _Batch.process (batch.js:233:4)
at flush_effects (batch.js:561:10)
at _Batch.flush (batch.js:381:4)
GetConfig @ App.js:6
(anonymous) @ Settings.svelte:11
untrack @ runtime.js:732
$effect @ index-client.js:100
update_reaction @ runtime.js:292
update_effect @ runtime.js:472
flush_queued_effects @ batch.js:606
process @ batch.js:233
flush_effects @ batch.js:561
flush @ batch.js:381
(anonymous) @ batch.js:460
dequeue @ batch.js:69
settings:1 [Intervention] Slow network is detected. See https://www.chromestatus.com/feature/5636954674692096 for more details. Fallback font will be used while loading: http://wails.localhost:34115/src/assets/font.ttfThe only way to make the error disappear is to either reload the entire application or modify the go code. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Hi @ezek-iel! I'm Dosu and I’m helping the wails team. This error happens because Wails only regenerates the JS bindings in Workarounds include: manually running There isn't a documented way to avoid this entirely yet, but these workflow tweaks can reduce the pain. If you hit persistent "undefined" errors, a full reload or touching Go code to retrigger bindings generation is still the most reliable fix. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
Hi @ezek-iel! I'm Dosu and I’m helping the wails team.
This error happens because Wails only regenerates the JS bindings in
wailsjswhen Go/backend code changes or when you manually trigger a bindings generation. If you change frontend code that relies on those bindings, but the bindings themselves are out of sync or missing, you'll see errors like "Cannot read properties of undefined (reading 'main')" until you reload the app or touch Go code to force a rebuild. This is a known friction point and is not currently addressed by any built-in hot-reload or watcher for frontend-only changes—there's no runtime hook or config to force regeneration automatically [source].Workarounds include: m…