S
SolidJS7mo ago
alloyed

stack overflow internal to solidjs?

Exception has occurred: RangeError: Maximum call stack size exceeded
at runUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:896:5)
at completeUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:942:17)
at runUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:891:5)
at completeUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:942:17)
at runUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:891:5)
at completeUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:942:17)
at runUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:891:5)
at completeUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:942:17)
at runUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:891:5)
at completeUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:942:17)
Exception has occurred: RangeError: Maximum call stack size exceeded
at runUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:896:5)
at completeUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:942:17)
at runUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:891:5)
at completeUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:942:17)
at runUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:891:5)
at completeUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:942:17)
at runUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:891:5)
at completeUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:942:17)
at runUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:891:5)
at completeUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:942:17)
This occurs in dev mode but not in production? I still need to narrow down what is causing this / make a minimal repro, but the stack here isn't super helpful in doing that :/
10 Replies
REEEEE
REEEEE7mo ago
might be somewhere you are reading and writing a signal in an effect
alloyed
alloyed7mo ago
the problem being "reading and writing to the same signal in a single effect"? or so cause that'd make sense, i guess the clue for that would be at the very bottom of the stack tho
REEEEE
REEEEE7mo ago
does it happen at a certain point or when an action is made on the site? Maybe you can track it through that
alloyed
alloyed7mo ago
happens at startup; this is the first time I've tried to run it after porting; the mistake could be anywhere in my ported code I can just go caveman mode and start throwing console.log()s at the start of every effect
REEEEE
REEEEE7mo ago
so possibly in the root route assuming you're using a router or the App.tsx and/or possibly in a context
alloyed
alloyed7mo ago
okok, back from investigating! the approach that was the most fruitful was dropping console.log() calls right at the top of each createEffect() or set() call that i suspected could've been an issue. the ones in the loop then megaspammed, which made it easy to pinpoint. unfortunately for me, it's in highly generic library code so I've got more investigating to do on my end. Right now, swapping the offending effect for createRenderEffect() seems to make the problem go away, but that isn't really a solution, so back into the debugging mines for me. thank you~
REEEEE
REEEEE7mo ago
if you could show the code for the effect, maybe we can come up with a different solution
alloyed
alloyed7mo ago
so this isn't a repro but it gives a good vibe for what's actually going on. createRemoteDataStoreSignal is the thing I swapped with a render effect. If this screams to you "this should be a resource", that's because it did for me too! but the promise-based nature of resources make it bad for subscription-based APIs like this. I at least wanted to get the signal-only version working before playing with weird stuff like a promise that never completes or something like that
alloyed
alloyed7mo ago
Solid Playground
Quickly discover what the solid compiler will generate from your JSX template
alloyed
alloyed7mo ago
the way this actually is breaking down i think i just a loop between the key we use to query the data and the data itself somewhere, but if there's a less error-prone way of doing the same thing I'd rather do that ofc
Want results from more Discord servers?
Add your server
More Posts
confused on rendering issue```tsx const [selectedFile, setSelectedFile] = createSignal<File | null>(null) return ( <No known conditions for "./browser" specifier in "msw" packageI'm trying to setup msw with my test environment in vitest and solid. Any idea why is this caused? Checking if children exists breaks refsThis has been driving me insane, but I just figured out that if you do something like this : https:/Confusion with signal not updating the domI am not sure what to make of this other than the fact that I am confused, but the filename() signalThis expression is not callable. Type 'Number' has no call signatures.Hey! I added typescript to my project and now one of my `createSignal` isn't working properly and I SyntaxError: The requested module 'solid-js/web' does not provide an export named 'classList'I am getting this error when using the solid-slider library in my code during SSR. I am using Solid Unrecoverable Hydration Mismatch error when trying to implement pagination on a custom tableI am relatively new to Solid, and I am running into an error that I don't quite understand.. I am iHow to set a store back to a default state at the top level (or clear it)?Hi, I'm trying to use a store to represent the state of a dynamic number of inputs, where the inputsHow to fetch chunks of data with createResouce?How can I use `createResource` to fetch chunks of data from a paginated API endpoint? I need to fetcHow to use async functions inside of synchronous components?I tried await for a fetch inside my App component, but it went all wazoo and said promise is not val