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
URI malformed with dynamic route #5827
Comments
Better to leave this open until the issue has been fixed in vue-router |
As far as I understand, this affects URLs containing a (properly escaped) I'm experiencing a similar issue where the |
@ThomasR not sure, could you show an example of what happens in your case? |
What happens is that in
I get different log outputs server-side and client-side: Server
Browser
However, I can't reproduce this bug when creating a new Nuxt app, so it must have something to do with my application config. (Can't publish that; it's not Free Software). I'll try and come up with a minimal example, and file a new ticket. Editturns out this was a problem with my app where sometimes URLs were manually escaped before passing them to |
Thanks for your contribution to Nuxt.js!
Issues that are labeled as |
Still the problem with Nuxt last version, url with Example url : https://zqxk0lw813.sse.codesandbox.io/?p=test%3Q It's a big problem because sometimes Nuxt application stops |
I still experience this problem in Nuxt v2.10.2, which uses vue-router ~3.0.7 as a dependency (in @nuxt/vue-app). According to this issue vuejs/vue-router#2708, the vue-router double DecodeURI that was apparently causing this issue, was already fixed in vue-router v3.0.4. Is this then an issue unique to Nuxt? |
I tried to trace back the error and I believe the crash happens in nuxt.js/packages/server/src/middleware/nuxt.js:14 on The Nevertheless, removing the Since the function |
@eddybrando Yes, it could be a vue-server-render issue then I guess. Can you reproduce it with "just" the vue server renderer? (Example reproduction of another problem: vuejs/vue#10733) |
I can reproduce the error in both SSR and SPA rendering. The SPA rendering just fails silently with a browser error log whilst the SSR returns the full error debug page. I'm looking at the renderContext in vue-renderer to see if there is something there that could be fixed... So far I found that But I'm still debugging... |
I encounter this problem too. Have you got a solution? |
Not really, I just avoided it by changing the way I constructed the URLs in my applications. Do you encounter this still in the newest Nuxt version? Because I believe this is indeed a bug that should be addressed then. If that's the case, we should probably open a new ticket and reference this there. |
i do this to solve my problem: url.replace('%', '%25%25') |
This is my current solution if you use a custom router: In {root}/router.js: export function createRouter(ssrContext) {
if (ssrContext) {
ssrContext.url = ssrContext.url.replace(/%(?![0-9A-F]{2})/g, '%25')
}
...
} |
Heey, I'm using the version I already try some aproaches by using My url: I'm getting the URI malformed error.. by adding this serverMiddleware on
but when gets to the client side I get the URI malformed on the browser console... thanksss! |
Maybe you can change your route to https://localhost:3000/my-route/my-name/100%2525-vote/ |
@maunier I'm trying something like that. I already saw that this is really a vue-router issue vuejs/vue-router#2725 |
我遇到了相同的问题,当url中包含%时,将出现URI malformed |
I ran into that problem today. Nuxt Version was 2.14.11. Solving the problem with updating to 2.14.12. |
Version
2.7.1
Reproduction link
https://codesandbox.io/s/examplehelloworld-quzpq
Steps to reproduce
Navigate with dynamic route to:
https://quzpq.sse.codesandbox.io/90%25
What is expected ?
Getting welcome page
What is actually happening?
Getting server error page with URI malformed error
The text was updated successfully, but these errors were encountered: