Closed
Description
Hi all,
after logging in, my application throws this error:
core.js:4061 ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: '%2F'
Error: Cannot match any routes. URL Segment: '%2F'
at ApplyRedirects.push../node_modules/@angular/router/fesm5/router.js.ApplyRedirects.noMatchError (router.js:2471)
at CatchSubscriber.selector (router.js:2452)
at CatchSubscriber.push../node_modules/rxjs/_esm5/internal/operators/catchError.js.CatchSubscriber.error (catchError.js:34)
at MapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber._error (Subscriber.js:79)
at MapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.error (Subscriber.js:59)
at MapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber._error (Subscriber.js:79)
at MapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.error (Subscriber.js:59)
at MapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber._error (Subscriber.js:79)
at MapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.error (Subscriber.js:59)
at ThrowIfEmptySubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber._error (Subscriber.js:79)
at resolvePromise (zone.js:832)
at resolvePromise (zone.js:784)
at zone.js:894
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421)
at Object.onInvokeTask (core.js:27791)
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:420)
at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:188)
at drainMicroTaskQueue (zone.js:601)
at push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask (zone.js:507)
at ZoneTask.invoke (zone.js:492)
I already set initialNavigation to false and tried the steps proposed here:
My auth config (if this matters) looks like this, by usage of implicit flow:
authConfig: {
issuer: 'https://localhost:5001',
redirectUri: 'http://localhost:4200/',
postLogoutRedirectUri: 'http://localhost:4200/',
clientId: 'api-client',
responseType: 'id_token token',
silentRefreshRedirectUri: 'http://localhost:4200/silent-refresh.html',
showDebugInformation: false,
scope: 'openid api',
silentRefreshTimeout: 25000,
timeoutFactor: 0.75,
sessionChecksEnabled: true,
clearHashAfterLogin: false
},
My application routes are like that:
const routes: Routes = [
// { path: 'home', component: BoxesPanelComponent, canActivate: [LoginAuthGuard] },
{ path: 'login', component: LoginComponent },
{ path: '', component: BoxesPanelComponent, canActivate: [LoginAuthGuard] },
];
Do you have any hints, how I can fix that exception?
Thanks in advance,