-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SSR request raises error 500 after upgrade to vue-router 3.3.0 on beforeEach redirection #7152
Comments
This also means that your route is not correct. |
@rstoenescu thank you for the quick response! Here is a git repo with reproduction of this issue: If you go to the /auth (http://localhost:8080/auth) path, it will not work and results in 404 with:
If you try the same on the client you will see it works, it just redirects to root URI. |
This sure seems like something that's been missed on the design of the new errors in regards to SSR. Hope I'll have some bandwith to report this issue to vue-router. Their docs should get updated, including the SSR example on ssr.vuejs.org. Meanwhile, the catch() block should be there regardless of vue-router 3.2 or 3.3. So added it for "@quasar/app" v1.9.6 -- and also temporarily downgraded vue-router to 3.2 cause on 3.3 even if we catch the error, the router.onReady hook does not matches any components and so it generates a 404 error anyway. |
@rstoenescu thank you for the quick response as always! Your are doing a really nice software and product! |
Running on SSR if you have
router.beforeEach
in boot and it redirects vianext({name: 'path'})
anywhere, with newvue-router
sincev3.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#3047To prevent from this issue
catch
should be added to therouter.push(url)
in theserver-entry.js
.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
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
The text was updated successfully, but these errors were encountered: