Skip to content

SSR request raises error 500 after upgrade to vue-router 3.3.0 on beforeEach redirection #7152

Closed
@dmitry

Description

@dmitry

Running on SSR if you have router.beforeEach in boot and it redirects via next({name: 'path'}) anywhere, with new vue-router since v3.3.0 it will raise error on the server. It happens because with this release of vue-router special error are thrown: vuejs/vue-router#3047

To prevent from this issue catch should be added to the router.push(url) in the server-entry.js.

router.push(url).catch(() => {})

Probably it should be solved somehow without even catching errors at all, but for now I know the only one way how to solve that. As this file is generated automatically and it has comments

 * THIS FILE IS GENERATED AUTOMATICALLY.
 * DO NOT EDIT.

There are no real solution to that issue, except rollback to vue-router v3.2.0.

quasar/app: 1.9.5
mode: ssr
vue-router: 3.3.2

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions