You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"description": "Route "/error" used \`Math.random()\` outside of \`"use cache"\` and without explicitly calling \`await connection()\` beforehand. See more info here: https://nextjs.org/docs/messages/next-prerender-random",
18
-
"environmentLabel": "Server",
19
-
"label": "Console Error",
20
-
"source": "app/error/page.tsx (2:23) @ Page
21
-
> 2 | const random = Math.random()
22
-
| ^",
23
-
"stack": [
24
-
"Page app/error/page.tsx (2:23)",
25
-
"JSON.parse <anonymous> (0:0)",
26
-
"LogSafely <anonymous> (0:0)",
27
-
],
28
-
}
29
-
`)
16
+
{
17
+
"description": "Route "/error" used \`Math.random()\` outside of \`"use cache"\` and without explicitly calling \`await connection()\` beforehand. See more info here: https://nextjs.org/docs/messages/next-prerender-random",
18
+
"environmentLabel": "Server",
19
+
"label": "Console Error",
20
+
"source": "app/error/page.tsx (2:23) @ Page
21
+
> 2 | const random = Math.random()
22
+
| ^",
23
+
"stack": [
24
+
"Page app/error/page.tsx (2:23)",
25
+
"JSON.parse <anonymous> (0:0)",
26
+
"JSON.parse <anonymous> (0:0)",
27
+
"LogSafely <anonymous> (0:0)",
28
+
],
29
+
}
30
+
`)
30
31
})
31
32
32
33
it('should show a red box error on client navigations',async()=>{
"description": "Route "/error" used \`Math.random()\` outside of \`"use cache"\` and without explicitly calling \`await connection()\` beforehand. See more info here: https://nextjs.org/docs/messages/next-prerender-random",
44
-
"environmentLabel": "Server",
45
-
"label": "Console Error",
46
-
"source": "app/error/page.tsx (2:23) @ Page
47
-
> 2 | const random = Math.random()
48
-
| ^",
49
-
"stack": [
50
-
"Page app/error/page.tsx (2:23)",
51
-
"JSON.parse <anonymous> (0:0)",
52
-
"LogSafely <anonymous> (0:0)",
53
-
],
54
-
}
55
-
`)
43
+
{
44
+
"description": "Route "/error" used \`Math.random()\` outside of \`"use cache"\` and without explicitly calling \`await connection()\` beforehand. See more info here: https://nextjs.org/docs/messages/next-prerender-random",
45
+
"environmentLabel": "Server",
46
+
"label": "Console Error",
47
+
"source": "app/error/page.tsx (2:23) @ Page
48
+
> 2 | const random = Math.random()
49
+
| ^",
50
+
"stack": [
51
+
"Page app/error/page.tsx (2:23)",
52
+
"JSON.parse <anonymous> (0:0)",
53
+
"JSON.parse <anonymous> (0:0)",
54
+
"LogSafely <anonymous> (0:0)",
55
+
],
56
+
}
57
+
`)
56
58
})
57
59
58
60
it('should not log unhandled rejections for persistently thrown top-level errors',async()=>{
"description": "Route "/no-accessed-data": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a "use cache" above it. We don't have the exact line number added to error messages yet but you can see which component in the stack below. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense",
104
-
"environmentLabel": "Server",
105
-
"label": "Console Error",
106
-
"source": null,
107
-
"stack": [
108
-
"Page [Server] <anonymous> (1:22)",
109
-
"main <anonymous> (1:13)",
110
-
"body <anonymous> (1:13)",
111
-
"html <anonymous> (1:13)",
112
-
"Root [Server] <anonymous> (1:22)",
113
-
"JSON.parse <anonymous> (0:0)",
114
-
"LogSafely <anonymous> (0:0)",
115
-
],
116
-
}
117
-
`)
104
+
{
105
+
"description": "Route "/no-accessed-data": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a "use cache" above it. We don't have the exact line number added to error messages yet but you can see which component in the stack below. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense",
106
+
"environmentLabel": "Server",
107
+
"label": "Console Error",
108
+
"source": null,
109
+
"stack": [
110
+
"Page [Server] <anonymous> (1:22)",
111
+
"main <anonymous> (1:13)",
112
+
"body <anonymous> (1:13)",
113
+
"html <anonymous> (1:13)",
114
+
"Root [Server] <anonymous> (1:22)",
115
+
"JSON.parse <anonymous> (0:0)",
116
+
"JSON.parse <anonymous> (0:0)",
117
+
"LogSafely <anonymous> (0:0)",
118
+
],
119
+
}
120
+
`)
118
121
})
119
122
120
123
it('should clear segment errors after correcting them',async()=>{
0 commit comments