-
Notifications
You must be signed in to change notification settings - Fork 27.5k
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
null is not an object (evaluating 't.parallelRoutes.get') #67730
Comments
At the same time as this error I get the: But im not using async client components, im using async in a server component as shown in the repro. But is there some caveats to that that im not aware of? I am calling a server action from the client component that renders. But the next.js error is always coupled with this react error, so maybe theres a connection? |
Looking into the breadcrumbs of what the user did, its not on navigating to the page, its when they submit the server action, but they did it 3 times successfully and then on the 4th time it caused these errors. |
This comment has been minimized.
This comment has been minimized.
I'm also encountering this issue in production. It seems to be coming from one of the static chunk files. Below is a code snippet where the error is being triggered: function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}),
Object.defineProperty(t, "fillCacheWithNewSubTreeData", {
enumerable: !0,
get: function() {
return function e(t, n, s, u) {
let l = s.length <= 5
, [c,f] = s
, d = (0,
a.createRouterCacheKey)(f)
, p = n.parallelRoutes.get(c);
if (!p)
return;
let h = t.parallelRoutes.get(c);
h && h !== p || (h = new Map(p),
t.parallelRoutes.set(c, h));
let m = p.get(d)
, g = h.get(d);
if (l) {
if (!g || !g.data || g === m) {
let e = s[3]
, t = e[2];
g = {
status: r.CacheStates.READY,
data: null,
subTreeData: t,
parallelRoutes: m ? new Map(m.parallelRoutes) : new Map
},
m && (0,
o.invalidateCacheByRouterState)(g, m, s[2]),
(0,
i.fillLazyItemsTillLeafWithHead)(g, m, s[2], e, s[4], u),
h.set(d, g)
}
return
}
g && m && (g === m && (g = {
status: g.status,
data: g.data,
subTreeData: g.subTreeData,
parallelRoutes: new Map(g.parallelRoutes)
},
h.set(d, g)),
e(g, m, s.slice(2), u))
}
}
}); This error surfaces with the message: "null is not an object (evaluating 't.parallelRoutes.get')". Has anyone found a workaround or fix for this yet? Any insights would be appreciated. Thanks! Edit by maintainer bot: Comment was automatically minimized because it was considered unhelpful. (If you think this was by mistake, let us know). Please only comment if it adds context to the issue. If you want to express that you have the same problem, use the upvote 👍 on the issue description or subscribe to the issue for updates. Thanks! |
Also seeing this issue a lot in Sentry. We are not using parallel routes at all. |
We cannot recreate the issue with the provided information. Please add a reproduction in order for us to be able to investigate. Why was this issue marked with the
|
Im wondering if it's something to do with deployment skew, I got a lot of errors just after I deployed a new version - though I cant replicate :( |
I asked a few users that experienced this error about how they use the web app, and they all said that they tend to keep a tab with the app open for a very long time (i.e. many hours/days) and go back to it. So I think that's a pretty good theory. |
Link to the code that reproduces this issue
https://github.com/JClackett/next-reproduction-app
To Reproduce
So, I literally have no idea how to reproduce this consistently yet, but will keep trying.
I'm getting this error semi-often in production only and only sometimes for certain users, most of the time it's working.
Looking at the stack trace (which is limited), it's due to some call to a
<cache>.parallelRoutes.get
. Searching the next code base with https://github.com/search?q=repo%3Avercel%2Fnext.js%20parallelRoutes.get&type=codeshows all the times this method is called.
It seems that one of the cache objects is null for me? How would I go about creating a repro for that. Or does anyone have any idea why this cache object would be null in the first place. The page this is erroring on is nothing special, it's just a async server component that fetches data and renders few components, one being a client component, so I dont see (yet) how this is something strange with my setup. Only thing of note is that im using react suspense to handle the fallback because the loading.tsx pages dont work as id like (they dont trigger on search param changes).
Current vs. Expected behavior
Doesn't crash
Provide environment information
Which area(s) are affected? (Select all that apply)
Navigation, Runtime
Which stage(s) are affected? (Select all that apply)
Vercel (Deployed)
Additional context
Only in production on vercel
The text was updated successfully, but these errors were encountered: