Skip to content
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

Next 13 [Fetching non-iso urls] #42398

Closed
1 task done
asimMoh opened this issue Nov 3, 2022 · 5 comments · Fixed by #42823
Closed
1 task done

Next 13 [Fetching non-iso urls] #42398

asimMoh opened this issue Nov 3, 2022 · 5 comments · Fixed by #42823
Labels
area: Routing Routing (next/router, next/navigation, next/link) bug Issue was opened via the bug report template.

Comments

@asimMoh
Copy link

asimMoh commented Nov 3, 2022

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Arch: x64
Version: Windows 10 Pro
Binaries:
Node: 16.17.0
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant packages:
next: 13.0.2-canary.2
eslint-config-next: 13.0.1
react: 18.2.0
react-dom: 18.2.0

What browser are you using? (if relevant)

106.0.5249.119 (Official Build) (64-bit) (cohort: Stable)

How are you deploying your application? (if relevant)

No response

Describe the Bug

I think this error is related to the new Router, when prefetching links with Arabic/Persian.
PREFETCH ERROR TypeError: Failed to execute 'fetch' on 'Window': Failed to read the 'headers' property from 'RequestInit': String contains non ISO-8859-1 code point.

Expected Behavior

It should work like in Next 12.

Link to reproduction

https://github.com/asimMoh/non-iso

To Reproduce

add some links with non-iso url

<Link href="/مرحبا">Non ISO</Link>
<Link href="ecodeURIComponent('/مرحبا')">Non ISO</Link>

@asimMoh asimMoh added the bug Issue was opened via the bug report template. label Nov 3, 2022
@Marcus-Rise
Copy link
Contributor

Marcus-Rise commented Nov 3, 2022

same issue in this repo

https://github.com/Marcus-Rise/knitting-blog/blob/refactor/src/post/components/card/post-card.component.tsx#L27

example /джемпер-вечерние-флоксы

@timneutkens timneutkens added the area: Routing Routing (next/router, next/navigation, next/link) label Nov 6, 2022
Marcus-Rise added a commit to Marcus-Rise/next.js that referenced this issue Nov 8, 2022
@Marcus-Rise
Copy link
Contributor

Marcus-Rise commented Nov 8, 2022

reproduced in this test: 268c230

image

@Marcus-Rise
Copy link
Contributor

think, that problem is hiding here https://github.com/vercel/next.js/blob/canary/packages/next/client/components/app-router.tsx#L68

Marcus-Rise added a commit to Marcus-Rise/next.js that referenced this issue Nov 8, 2022
Marcus-Rise added a commit to Marcus-Rise/next.js that referenced this issue Nov 8, 2022
@Marcus-Rise
Copy link
Contributor

Marcus-Rise commented Nov 8, 2022

just coded a recursive function, that escapes router app segment value #42626

Marcus-Rise added a commit to Marcus-Rise/next.js that referenced this issue Nov 8, 2022
Marcus-Rise added a commit to Marcus-Rise/next.js that referenced this issue Nov 8, 2022
Marcus-Rise added a commit to Marcus-Rise/next.js that referenced this issue Nov 8, 2022
Marcus-Rise added a commit to Marcus-Rise/next.js that referenced this issue Nov 12, 2022
Marcus-Rise added a commit to Marcus-Rise/next.js that referenced this issue Nov 12, 2022
Marcus-Rise added a commit to Marcus-Rise/next.js that referenced this issue Nov 15, 2022
ijjk added a commit that referenced this issue Nov 18, 2022
Fix: #42398

relates to
#42626 (review)

<!--
Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change that you're making:
-->

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [x] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)

Co-authored-by: JJ Kasper <jj@jjsweb.site>
@github-actions
Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: Routing Routing (next/router, next/navigation, next/link) bug Issue was opened via the bug report template.
Projects
None yet
3 participants