Next.js Discord

Discord Forum

Is it just us or is the AppRouter incredibly buggy for everyone?

Unanswered
Broad-snouted Caiman posted this in #help-forum
Open in Discord
Broad-snouted CaimanOP
I'm writing this message in complete desperation and disbelief. We adopted the App Router late last year when it was tagged stable in Next v14 and ever since then we've started running into incredible problems with pretty much all aspects of caching and navigation. We have built 10+ apps on top of the pages router over the course of 4+ years and we've never had so many problems that we have right now. What's worse is that the challenges we're facing do not seem to be easily debuggable unlike in previous implementations. I don't know what's causing this and whether our app is somehow misconfigured but I'm starting to lose faith in the whole idea and just looking for help from the community. Let me outline some of the issues below:

- on mobile (mainly iOS but also other devices) clicking links that use next/link triggers a fetch of the RSC for the target page but often does not trigger the navigation event itself, there are no errors in the console or the terminal, there are no elements sitting on top of buttons, there are no rogue event listeners preventing the default action - we checked all that. it just doesn't work. we went ahead and disabled prefetching which significantly improved the experience but some clicks are still not registered. we had to add an explicit ontouchstart and ontouchend event listeners and use router.push to make the app go to target page which works a lot more reliablly but introduces unnecessary complexity. i feel like there's a race condition in the implementation of the Link but couldn't find any related issues in the issue tracker on GH

- we were forced to use force-static to make the app perform well on Vercel. the moment we remove it, our latency goes up to almost 1s which is completely ridiculous, we do make a few GraphQL requests but they're all made in parallel which worked very well with the pages router (even in SSR mode). we explicitly overrode the cache settings to make sure the cache was on for all these requests but no dice

1 Reply

Broad-snouted CaimanOP
I'll add that on mobile, double tapping the links usually helps which is kinda crazy. We had some animations there also via Framer Motion and we disabled all of them at some point to make sure those animations weren't the root cause.