I use "@supabase/ssr": "^0.3.0"
in my application, when I try to navigate to a route with dynamic parameters I do get:
app.config.ts:9 ERROR Error: ASSERTION ERROR: Unable to retrieve
hydration info from the TransferState. [Expected=> null != undefined
<=Actual]
at throwError2 (core.mjs:543:11)
at assertDefined (core.mjs:539:9)
at retrieveHydrationInfoImpl (core.mjs:8555:26)
at retrieveHydrationInfo (core.mjs:8603:12)
at createRootComponentView (core.mjs:16998:25)
at ComponentFactory.create (core.mjs:16887:39)
at _ApplicationRef.bootstrap (core.mjs:32549:42)
at core.mjs:36613:32
at _ZoneDelegate.invoke (zone.js:369:9)
at Object.onInvoke (core.mjs:15931:33)
All other static routes do not have that issue.
Here is my app.config.ts
:
export const appConfig: ApplicationConfig = {
providers: [
provideRouter(APP_ROUTES, withPreloading(PreloadAllModules)),
provideClientHydration(),
provideHttpClient(withFetch())
]
};
And the app.routes.ts
:
export const APP_ROUTES: Routes = [
{
path: '',
canActivate: [redirectGuard],
loadComponent: () =>
import('./features/login/login.component').then((m) => m.LoginComponent),
},
{ // The hydration issue is here
path: 'invite/:id',
loadComponent: () =>
import('./features/invite/invite.component').then((m) => m.InviteComponent),
},
{
path: 'reset',
loadChildren: () =>
import('./features/reset/reset.routes').then((m) => m.RESET_ROUTES),
},
{
path: 'error',
loadComponent: () =>
import('./features/error/error.component').then((m) => m.ErrorComponent),
},
];
And the RESET_ROUTES
that has the same issue:
export const RESET_ROUTES: Routes = [
{
path: '',
loadComponent: () => import('./pages/sender/sender.component').then((m) => m.SenderComponent)
},
{ // The hydration issue is here
path: ':id',
loadComponent: () => import('./pages/reset/reset.component').then((m) => m.ResetComponent)
},
];