#error component not receiving the error on page change

28 messages · Page 1 of 1 (latest)

limber tangle
#

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.

#

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

  errorComponent: (props) => {
    return (
      <RootDocument>
        <DefaultCatchBoundary {...props} />
      </RootDocument>
    )
  },

whilst solid is like this

errorComponent: DefaultCatchBoundary,
sage flame
#

@dapper remnant

limber tangle
#

@dapper remnant 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)

dapper remnant
#

Are you using the latest version. We made lots of updates recently

limber tangle
dapper remnant
limber tangle
#

was on 1.132.49 testing 1.133.24 now

dapper remnant
#

I'm pretty much done for the day. Will look at tomorrow if still an issue

limber tangle
#

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

dapper remnant
#

So its working?

#

I don't think the useRouter would have changed

limber tangle
#

no its not working its diff error that breaks the entire app, im looking through releases to see where something might have changed

dapper remnant
#

There was lots of changes to the root

#

Can look at the examples

limber tangle
#

breaks using 1.133.0 as well, so somewhere betwee 1.132.49 and 1.33.0 something happened

#

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...

dapper remnant
limber tangle
#

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

dapper remnant
#

maybe update your router fork to main?

dapper remnant
#

Merged

limber tangle
#

example is now working, will make PR. ty for help

dapper remnant
#

thanks!