error component not receiving the error on page change
Hi, I'm trying to contribute to the docs by moving the start react supabase example to solidjs but I ran into some bug. Essentially during page transition, the error prop isn't being passed to the error component, but on refresh it works. so what this means is that going to /posts from / doesn't correctly redirect but hard refreshing /posts works. anyone that can take a look?
the error component is running, but its not being passed in the error prop which it needs in order to check the type of error.
on going from / to /posts, gives this error in browser
Paused on exception
handleError - dev.js:1110:12
TypeError: (destructured parameter) is undefined
(which is the destructed error prop in the errorcomponent), using non destructed didnt fix as would just say prop wasnt defined.
19 Replies
flat-fuchsiaOP•2mo ago
you need SUPABASE_URL and SUPABASE_ANON_KEY for example to work, just make new supabase project and copy keys
idk if it matters but i also tried both ways of defining error component as the react example does like this
whilst solid is like this
sunny-green•2mo ago
@brenelz
flat-fuchsiaOP•2mo ago
@brenelz can you take a look. on initial page load ssr the error component works, on transition between pages isn't being passed the prop (in solid, works in react)
extended-salmon•2mo ago
Are you using the latest version. We made lots of updates recently
flat-fuchsiaOP•2mo ago
ill test it again no worries
extended-salmon•2mo ago
We haven't looked at this specifically so it might still be an issue
flat-fuchsiaOP•2mo ago
was on 1.132.49 testing 1.133.24 now
extended-salmon•2mo ago
I'm pretty much done for the day. Will look at tomorrow if still an issue
flat-fuchsiaOP•2mo ago
now im getting issue "Warning: useRouter must be used inside a <RouterProvider> component!" which breaks everything because im calling useRouter in defaultcatchboundary without wrapping the root app in RouterProvider (which shouldn't be needed since its tanstack start?)
page is fine on 1.132.49 so no idea, so weird
extended-salmon•2mo ago
So its working?
I don't think the useRouter would have changed
flat-fuchsiaOP•2mo ago
no its not working its diff error that breaks the entire app, im looking through releases to see where something might have changed
extended-salmon•2mo ago
There was lots of changes to the root
Can look at the examples
flat-fuchsiaOP•2mo ago
breaks using 1.133.0 as well, so somewhere betwee 1.132.49 and 1.33.0 something happened

flat-fuchsiaOP•2mo ago
so on 1.32.49 the error boundary isn't being passed prop, and on 1.133.x just completely wont render
also have some issue (related to solid) where I can't define the body tag element or throws error "template2 is not a function" so in the root have to not define html or body and just wrap in fragment. maybe using solid is not the best idea 🤦♂️
I was just trying to contribute some docs man...
extended-salmon•2mo ago
I believe this pr fixes the error prop not passing
https://github.com/TanStack/router/pull/5597
GitHub
fix missing props lazy compoonent by brenelz · Pull Request #5597 ...
Summary by CodeRabbit
Refactor
Optimized lazy route component rendering to improve prop passage and dynamic loading behavior during resource initialization.
flat-fuchsiaOP•2mo ago
ok, when it gets merged ill test
still have the other issue where it completely won't render but I'll spend some time on it and just try not using useRouter
extended-salmon•2mo ago
maybe update your router fork to main?
Merged
flat-fuchsiaOP•2mo ago
example is now working, will make PR. ty for help
extended-salmon•2mo ago
thanks!