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
{{ message }}
Repository navigation
Timeout after update to 3.0.0-beta.76 and next 15.0.0-canary.104 #7578
After updating from payload beta 74 and next canary 86 to Payload beta 76 and Next Canary 104, the admin panel can no longer be accessed and results in a timeout. The login page does not render.
Before the update, everything was working perfectly.
The problem occurs only in a production build. Everything continues to work fine in development mode.
Reproduction Steps
Update to the payload 3.0.0-beta.76 and next canary 104. Create a and run a production build. Then try to access the payload login page.
Adapters and Plugins
db-mongodb, storage-vercel-blob, form-builder, nested-docs, seo, live-previewrichtext-lexical,
TypeError: Cannot read properties of undefined (reading 'query')
at tV (/home/dovchik/source/payload-play/.next/server/chunks/8447.js:193:1420)
at async Object.tz [as findGlobal] (/home/dovchik/source/payload-play/.next/server/chunks/8447.js:193:4292)
at async l (/home/dovchik/source/payload-play/.next/server/chunks/8447.js:266:102390)
at async f (/home/dovchik/source/payload-play/.next/server/chunks/6310.js:1:16628) {
digest: '3855654830'
}
TypeError: Cannot read properties of undefined (reading 'query')
at tV (/home/dovchik/source/payload-play/.next/server/chunks/8447.js:193:1420)
at runNextTicks (node:internal/process/task_queues:60:5)
at listOnTimeout (node:internal/timers:540:9)
at process.processTimers (node:internal/timers:514:7)
at async Object.tz [as findGlobal] (/home/dovchik/source/payload-play/.next/server/chunks/8447.js:193:4292)
at async l (/home/dovchik/source/payload-play/.next/server/chunks/8447.js:266:102390)
at async f (/home/dovchik/source/payload-play/.next/server/chunks/6310.js:1:16628) {
digest: '343576256'
}
On production builds only - i.e., pnpm build && pnpm start - the Payload admin app will not load if there is more than one collection with a richText field (they don't have to be nested in a block).
For example - we created test Foo and Bar collections - based on the built-in Lexical richtext editor and in each there are only two fields: title (text) and content as (richText).
Foo and Bar collections each have the following richtext field definition:
We can compile and load the admin dashboard if we load just the Foo collection or just the Bar collection - but not both. We can only load both along with the admin dashboard in development. :-(
In a production build - the request for the /admin URL remains stuck at 'pending' (with zero output - errors or other).
Here's a link to a reproducible repo - a fork of Demo 3 repo.
pnpm install && pnpm build && pnpm start - should reproduce the problem. All that's changed is another collection with a richText field was added to payload.config.ts. Navigating to /admin will fail on 'pending' indefinitely.
Hope this helps.
Reacted by AlSherif Khalaf
Reacted by Marc, Volodymyr Lisovskyi, Grzegorz Bialy, Wilson, Timothy, AlSherif Khalaf and Clover_Midori
For us, everything works fine on payload 3.0.0-beta.77 and (!) next 15.0.0-canary.87.
So it seems like an issue with the next >15.0.0-canary.87 (or newer).
For us, everything works fine on payload 3.0.0-beta.77 and (!) next 15.0.0-canary.87. So it seems like an issue with the next >15.0.0-canary.87 (or newer).
I can confirm. The admin panel works for us with 3.0.0-beta.78 and next 15.0.0-canary.87. Won’t work with next versions higher than that. We also have multiple richText fields in various places.
I recommend either staying on an older payload & Next.js version, or attaching an editor to every richtext field causing this issue for now. This issue has been introduced by the recent Next.js update - if objects with same references are passed down as props to 2+ components, Next.js started hanging like this. For richText fields, this issue can appear because they reference the same root richText editor.
TypeError: Cannot read properties of undefined (reading 'query')
at tV (/home/dovchik/source/payload-play/.next/server/chunks/8447.js:193:1420)
at async Object.tz [as findGlobal] (/home/dovchik/source/payload-play/.next/server/chunks/8447.js:193:4292)
at async l (/home/dovchik/source/payload-play/.next/server/chunks/8447.js:266:102390)
at async f (/home/dovchik/source/payload-play/.next/server/chunks/6310.js:1:16628) {
digest: '3855654830'
}
TypeError: Cannot read properties of undefined (reading 'query')
at tV (/home/dovchik/source/payload-play/.next/server/chunks/8447.js:193:1420)
at runNextTicks (node:internal/process/task_queues:60:5)
at listOnTimeout (node:internal/timers:540:9)
at process.processTimers (node:internal/timers:514:7)
at async Object.tz [as findGlobal] (/home/dovchik/source/payload-play/.next/server/chunks/8447.js:193:4292)
at async l (/home/dovchik/source/payload-play/.next/server/chunks/8447.js:266:102390)
at async f (/home/dovchik/source/payload-play/.next/server/chunks/6310.js:1:16628) {
digest: '343576256'
}
@AlessioGr
I'm still getting the same bunch of errors with build and start and admin panel not loading with [email protected] and [email protected]
Also, I'm using postgres adapter
Activity
Dovchik commentedon Aug 8, 2024
Encountering the same problem, runtime error:
remarcable commentedon Aug 8, 2024
This might be the same issue: https://discord.com/channels/967097582721572934/1215659716538273832/1271103045908037672
Here is a reproduction of this issue: https://github.com/payloadcms/payload-3.0-demo/compare/main...remarcable:payload-3.0-demo:admin-panel-loading-repro?expand=1
The reason seems to be
richTextfields nested insideblocks.jomapps commentedon Aug 9, 2024
I just created another bug, which I will delete. Same error. Just upgraded from beta.36 though
vuquangpham commentedon Aug 10, 2024
I got the same issue now, but when I downgrade the next.js version to 15.0.0-canary.77, it works fine again?? What's going on here?
58bits commentedon Aug 11, 2024
Hi all - we're seeing a similar issue:
On production builds only - i.e.,
pnpm build && pnpm start- the Payload admin app will not load if there is more than one collection with a richText field (they don't have to be nested in a block).For example - we created test Foo and Bar collections - based on the built-in Lexical richtext editor and in each there are only two fields: title (text) and content as (richText).
Foo and Bar collections each have the following richtext field definition:
{
type: 'richText',
name: 'richText',
label: 'RichText',
required: true,
},
We can compile and load the admin dashboard if we load just the Foo collection or just the Bar collection - but not both. We can only load both along with the admin dashboard in development. :-(
In a production build - the request for the /admin URL remains stuck at 'pending' (with zero output - errors or other).
Here's a link to a reproducible repo - a fork of Demo 3 repo.
https://github.com/infonomic/payload-3.0-demo
pnpm install && pnpm build && pnpm start- should reproduce the problem. All that's changed is another collection with a richText field was added topayload.config.ts. Navigating to /admin will fail on 'pending' indefinitely.Hope this helps.
BohdanK-W32 commentedon Aug 13, 2024
For us, everything works fine on payload 3.0.0-beta.77 and (!) next 15.0.0-canary.87.
So it seems like an issue with the next >15.0.0-canary.87 (or newer).
mednet-ecrep commentedon Aug 13, 2024
Just updated to v3.0.0-beta.78 and still getting a timeout when loading the admin login page.
robinscholz commentedon Aug 13, 2024
I can confirm. The admin panel works for us with
3.0.0-beta.78andnext 15.0.0-canary.87. Won’t work with next versions higher than that. We also have multiple richText fields in various places.AlessioGr commentedon Aug 13, 2024
I recommend either staying on an older payload & Next.js version, or attaching an
editorto every richtext field causing this issue for now. This issue has been introduced by the recent Next.js update - if objects with same references are passed down as props to 2+ components, Next.js started hanging like this. For richText fields, this issue can appear because they reference the same root richText editor.We will fix this once we're done with #7620
robinscholz commentedon Aug 13, 2024
@AlessioGr attaching an editor to every richtText field does not seem to work for us. Tried both:
Tried invoking the editor separately and passing it:
And tried setting it manually:
Running
3.0.0-beta.78andnext 15.0.0-canary.104AlessioGr commentedon Aug 13, 2024
@robinscholz make sure you're using a uniquely initialized
editorfor every field, without sharing theeditorobject between fieldsAlessioGr commentedon Aug 13, 2024
Fixed by #7620
Dovchik commentedon Aug 15, 2024
@AlessioGr
I'm still getting the same bunch of errors with
build and startand admin panel not loading with[email protected]and[email protected]Also, I'm using postgres adapter
Dovchik commentedon Aug 15, 2024
Okay, that seems to be related to how I passed
payloadinstance aroundSeems that
getPayloadHMRin root level of a document was breaking it alledtorba commentedon Aug 26, 2024
It is still happening, running on next: 15.0.0-canary.128, payload: 3.0.0-beta.91, node: 20.9.0.
Only after dropping lexical (which was used in just one collection) did things start working again.
github-actions commentedon Sep 6, 2024
This issue has been automatically locked.
Please open a new issue if this issue persists with any additional detail.