Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Uncaught Svelte error: effect_update_depth_exceeded #976

Closed
5 tasks done
bmschmidt opened this issue Nov 17, 2024 · 3 comments · Fixed by #978
Closed
5 tasks done

Uncaught Svelte error: effect_update_depth_exceeded #976

bmschmidt opened this issue Nov 17, 2024 · 3 comments · Fixed by #978
Assignees
Labels
bug Something isn't working released

Comments

@bmschmidt
Copy link

Thanks for your work on this repo.

I'm having trouble getting version 3.0.0 to work reactively in a sveltekit app.

The initial load works fine, but then it goes into an infinite loop with the message below in the console.

The trace in the first line shows that the first $effect in the Embed component seems to be retriggering endlessly on a shallowEqual check.

I haven't been able to make this work in the demo repo (which still seems to be on version 1.2.0, but even after upgrading to 3.0.0) but with a fresh sveltekit and almost no edits I can reproduce.

One possibly related note: I also need to install fast-deep-equal to get the basic app to run.

To reproduce:

git clone https://github.com/bmschmidt/svelte-vega-test; cd svelte-vega-test; npm i ; npm run dev
hook.js:608 Last ten effects were:  (10) [ƒ, ƒ, ƒ, ƒ, ƒ, ƒ, ƒ, ƒ, ƒ, ƒ]
overrideMethod @ hook.js:608
infinite_loop_guard @ chunk-BWDDQV5P.js?v=30770dcb:1845
flush_queued_root_effects @ chunk-BWDDQV5P.js?v=30770dcb:1863
process_deferred @ chunk-BWDDQV5P.js?v=30770dcb:1904
Show 4 more frames
Show lessUnderstand this error
chunk-BWDDQV5P.js?v=30770dcb:173 Uncaught Svelte error: effect_update_depth_exceeded
Maximum update depth exceeded. This can happen when a reactive block or effect repeatedly sets a new value. Svelte limits the number of nested updates to prevent infinite loops
effect_update_depth_exceeded @ chunk-BWDDQV5P.js?v=30770dcb:173
infinite_loop_guard @ chunk-BWDDQV5P.js?v=30770dcb:1840
flush_queued_root_effects @ chunk-BWDDQV5P.js?v=30770dcb:1863
process_deferred @ chunk-BWDDQV5P.js?v=30770dcb:1904
Show 4 more frames
Show lessUnderstand this error
chunk-BWDDQV5P.js?v=30770dcb:173 Uncaught (in promise) Svelte error: effect_update_depth_exceeded
Maximum update depth exceeded. This can happen when a reactive block or effect repeatedly sets a new value. Svelte limits the number of nested updates to prevent infinite loops

Please:

  • Check for duplicate issues. Please file separate requests as separate issues on GitHub.
  • Describe how to reproduce the bug.
  • Use the latest Svelte-Vega version, if possible. Always indicate which version you are using.
  • Include error messages or gifs/screenshots of problematic behavior, if applicable.
  • Provide an example specification and accessible data. Try to provide the simplest specification that reproduces the problem. To share a specification, use the Vega-Editor and click "Share" to embed a working link, or provide an example spec in JSON, wrapped by triple backticks like this:
@bmschmidt bmschmidt added the bug Something isn't working label Nov 17, 2024
@domoritz
Copy link
Member

@Sparkier have you seen this issue before?

@Sparkier
Copy link
Collaborator

Yes, but I thought it was fixed. Let me check.

@vega-org-bot
Copy link
Collaborator

🎉 This issue has been resolved in version 3.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants