Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork4.6k
-
I can't open an issue without a reproduction case, so starting discussion here hopefully for suggestions on how to debug an issue, because neither myself, our engineering team, or our QA team can replicate an issue that several of our end users are having, and which rollbar is getting reports for. In short, we have something like is based off this structure: parent.svelte <script>importChildfrom'./child.svelte'let { item }=$props()</script><Childplaceholders={item.placeholders?? []} /> child.svelte <script>let { placeholders }=$props()</script>{placeholders} Very occasionally, a user visiting the page will trigger a JS error, that contains:
We cannot understand why calling Anyone have any suggestions or encountered something like this before? |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 1 comment
-
I have vague memories of also running into something where the a prop should not have possibly been undefined and yet it was, but as I recall (vaguely) we dealt with it by just using As for a repro, if it is a race condition my best suggestion would be to create a repro test case, either on the svelte.dev playground or on StackBlitz if SvelteKit is involved, similar to the pared-down example you put in this discussion. Then stick logs of console.log calls in there (yes, printf-style debugging is still all too necessary sometimes, sigh...) and write a script that will load the page repeatedly until it manages to trigger the bug. (With an appropriate pause between runs so you don't look like you're trying to DOS the Svelte playground or StackBlitz...) Then capture the logs from the one failed run. Who knows how many runs you'll have to make before triggering the race condition, but if you can manage to trigger the race condition, that should be enough to qualify as a minimal repro for reporting the issue. |
BetaWas this translation helpful?Give feedback.