Edge runtime breaks revalidateTag on Vercel #57493
Labels
bug
Issue was opened via the bug report template.
Pages Router
Related to Pages Router.
stale
The issue has not seen recent activity.
Link to the code that reproduces this issue
https://github.com/matthewwilson/nextjs-boilerplate
To Reproduce
It consists of 3 pages
All pages make the same API call.
A healthy output should look like this:
In this scenario everything will revalidate as expected by POSTing to the revalidate endpoint (/api/revalidate).
This is unhealthy output:
As soon as we start getting different timestamps (meaning that the API call isn't being memoized/cached) then revalidateTag will only revalidate one of the pages (home or child). No matter how many times revalidateTag is called, only one page will update.
Current vs. Expected behavior
I expect revalidateTag to work reliably when revalidating an API call that is used across multiple pages.
The sample app here is a simple reproduction, but we are seeing this same issue in production.
Removing the edge page fixes the issue. But this is not an option for us.
Everything works when running locally, but breaks on Vercel.
Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.6.0: Fri Sep 15 13:41:28 PDT 2023; root:xnu-8796.141.3.700.8~1/RELEASE_ARM64_T6000 Binaries: Node: 18.18.0 npm: 9.8.1 Yarn: 1.22.19 pnpm: 8.8.0 Relevant Packages: next: 13.5.7-canary.35 eslint-config-next: 13.5.4 react: 18.2.0 react-dom: 18.2.0 typescript: 5.2.2 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Data fetching (gS(S)P, getInitialProps)
Additional context
This issue has existed across multiple Next.js versions.
We have tested it from 13.4.13 to 13.5.7-canary.35
The text was updated successfully, but these errors were encountered: