Fetch failed loading: GET
Unanswered
African Slender-snouted Crocodil… posted this in #help-forum
African Slender-snouted CrocodileOP
Hi,
I created a brand new Next.js 14 app using
Is this a Chrome or a Next.js issue?
I created a brand new Next.js 14 app using
npx create-next-app@latest (using all the defaults; including the new app router), added two pages with some <Link> components so that I can navigate back and forth between the pages and Chrome complains about "Fetch failed loading: GET" when navigating between them.Is this a Chrome or a Next.js issue?
49 Replies
American Crow
You have to import the
<Link> from next/navigation in the App routerAfrican Slender-snouted CrocodileOP
@American Crow Not according to the docs: https://nextjs.org/learn/dashboard-app/navigating-between-pages#the-link-component
@African Slender-snouted Crocodile <@240974567730970625> Not according to the docs: https://nextjs.org/learn/dashboard-app/navigating-between-pages#the-link-component
American Crow
You right, i got it mixed up it's the other way round.
I am sorry for adding more confusing. This issue is so common that in 90% of the cases its the wrong import. I answered too fast not paying enough attention
I am sorry for adding more confusing. This issue is so common that in 90% of the cases its the wrong import. I answered too fast not paying enough attention
Do you have a
<Link> in your app with an empty href? href=""African Slender-snouted CrocodileOP
NP. What's in that screenshot is literally all there is.
American Crow
Nothing inside blog/page.tsx ?
I am blind you have split screen both
African Slender-snouted CrocodileOP
American Crow
Let me just do the same on my machine with a fresh create next app
African Slender-snouted CrocodileOP
Here's an updated version. The other one was wrong.
@American Crow Let me just do the same on my machine with a fresh create next app
African Slender-snouted CrocodileOP
okay, that would be great.
American Crow
Hm I don't get any of these.
I am on node 20, ubuntu chromium. You said it is chrome specifically ? Did you try an other browser on your machine?
I am on node 20, ubuntu chromium. You said it is chrome specifically ? Did you try an other browser on your machine?
African Slender-snouted CrocodileOP
yes, Safari and Firefox.
Only Chrome gives me this error.
Only Chrome gives me this error.
I disabled all extensions. Restarted process.
American Crow
What system are you on
African Slender-snouted CrocodileOP
I will try the same on my Windows machine.
Mac OS
node 19
American Crow
19 could be a problem only full versions are supported by next afaik
African Slender-snouted CrocodileOP
node v20.9.0
sorry
American Crow
20 is okay
African Slender-snouted CrocodileOP
im runnin v20.9.0
American Crow
yea it looks like your rsc payload gets called twice
does it still happen when you disable strict mode in tsconfig ?
African Slender-snouted CrocodileOP
let me check
yes same thing
maybe i have some weird setup
i disabled chrome extensions
all of them
quit all chrome windows
restarted it
cant think of anything else that might interfere
im running nvm btw
American Crow
I can also produce two rsc calls when hard refreshign but both are 200 in my network tab
i am running nvm too
African Slender-snouted CrocodileOP
what version of chrome are you on?
American Crow
African Slender-snouted CrocodileOP
this is mine:
Chrome is up to date
Version 124.0.6367.119 (Official Build) (arm64)
Chrome is up to date
Version 124.0.6367.119 (Official Build) (arm64)
American Crow
yea thats not it they are super close
Do you get any info in the network tab on the failed fetch ?
African Slender-snouted CrocodileOP
If I click on the failed link it takes me to the line that is highlighted. And it's a 200. So it doesnt make any sense.
American Crow
Hm i am at the end with my knowledge i have to admit. Looks like some console log nonsense but maybe someone else reading this thread can shed some light. Again, Sorry for the initial confusion
African Slender-snouted CrocodileOP
I did the exact same thing on my Windows machine (same node version, same chrome version) and get the same problem.
African Slender-snouted CrocodileOP
@African Slender-snouted Crocodile I submitted a github issue:
https://github.com/vercel/next.js/issues/65387
Japanese flying squid
I used the fetch api to fetch data from tmdb which also said fetch failed error but when i used use client directive it worked on client afterwards when I use one of my custom json apis on server side then it worked but it doesnt works with tmdb api
American Crow
Well there is not even a fetch in the repo