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
Next.js 15.0-canary.104 Causes an "Error: Maximum call stack size exceeded" in the Nodemailer adapter #7580
After adding a nodemailer Adapter and clicking some pages the site crashes with "Error: Maximum call stack size exceeded". Removing the NodeMailer Adapter solves this problem.
I am not sure if this is related, but I am experiencing a similar error type but caused by node_modules/deepmerge lib. Everything was working fine until versions higher than 3.0 beta 67. For me, the error occurs in dev mode as soon as I start the server and save any file in my IDE. If I don't trigger a server reload, everything operates normally.
Here is the error message I am receiving:
RangeError: Maximum call stack size exceeded
at Array.filter (<anonymous>)
at getEnumerableOwnPropertySymbols (webpack-internal:///(rsc)/./node_modules/deepmerge/dist/cjs.js:54:42)
.....
52 | function getEnumerableOwnPropertySymbols(target) {
53 | return Object.getOwnPropertySymbols
> 54 | ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
| ^
55 | return Object.propertyIsEnumerable.call(target, symbol)
56 | })
57 | : []
⨯ node_modules/deepmerge/dist/cjs.js (54:1) @ getEnumerableOwnPropertySymbols
⨯ RangeError: Maximum call stack size exceeded
at Array.filter (<anonymous>)
at Array.forEach (<anonymous>)
......
Forgive me if my case is not related. I will create a new issue if needed.
I guess this is a Next.js problem in the later versions. For me it only affects the dev server. The prod build runs smooth.
Update: I don't have the problem with the dev server anymore with 15.0.0-canary.108 instead of 104
Update 2 : I still have the problem after some code changes the problem re-appeared
changed the title [-]3.0 Beta 76 - Nodemailer adapter causes Error: Maximum call stack size exceeded[/-][+]Next.js 15.0-canary.104 Causes an "Error: Maximum call stack size exceeded" in the Nodemailer adapter[/+]on Aug 8, 2024
For interest, commenting out the email and nodemailerAdapter configuration also seems to prevent Maximum call stack size exceeded for us.
However, on the latest beta 77 and Next canary.104 ., I'm seeing another (possibly related?) problem. 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.
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).
If this is totally unrelated to this issue, I'll go ahead and raise a separate issue with a demo 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
@remarcable - thanks - I've just looked at #7578 - and their description is similar - but in the reproducible repo above richtext does not have to appear in a block although I'll post my comment above and link there.
This is now fixed and will be released shortly. Thank you everyone!
The Lexical / Rich Text issues are going to be addressed separately via #7620.
That should hopefully be merged tomorrow!
For anyone running into issues like @58bits I believe if you instantiate a new Lexical editor for each field that causes you problems, that will fix it in the meantime. When the above PR lands, you won't need to do that anymore.
Activity
tomekwlod commentedon Aug 8, 2024
I am not sure if this is related, but I am experiencing a similar error type but caused by
node_modules/deepmergelib. Everything was working fine until versions higher than 3.0 beta 67. For me, the error occurs in dev mode as soon as I start the server and save any file in my IDE. If I don't trigger a server reload, everything operates normally.Here is the error message I am receiving:
Forgive me if my case is not related. I will create a new issue if needed.
rainer-friederich commentedon Aug 8, 2024
It is related
rainer-friederich commentedon Aug 8, 2024
I guess this is a Next.js problem in the later versions. For me it only affects the dev server. The prod build runs smooth.
Update: I don't have the problem with the dev server anymore with 15.0.0-canary.108 instead of 104Update 2 : I still have the problem after some code changes the problem re-appeared
[-]3.0 Beta 76 - Nodemailer adapter causes Error: Maximum call stack size exceeded[/-][+]Next.js 15.0-canary.104 Causes an "Error: Maximum call stack size exceeded" in the Nodemailer adapter[/+]talpha14 commentedon Aug 8, 2024
I'm not sure where the error comes from
jomapps commentedon Aug 9, 2024
I can second this issue. Happening to me.
58bits commentedon Aug 10, 2024
Also seeing this...
credli commentedon Aug 10, 2024
.
paulpopus commentedon Aug 10, 2024
Hey all, we're going to take a look at this ASAP
58bits commentedon Aug 11, 2024
Hi @paulpopus - thanks for the quick response.
For interest, commenting out the email and nodemailerAdapter configuration also seems to prevent
Maximum call stack size exceededfor us.However, on the latest beta 77 and Next canary.104 ., I'm seeing another (possibly related?) problem. 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.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).
If this is totally unrelated to this issue, I'll go ahead and raise a separate issue with a demo repo.
58bits commentedon Aug 11, 2024
@paulpopus @denolfe - here's a forked Demo 3 repo with the admin dashboard problem above:
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.tsremarcable commentedon Aug 11, 2024
@58bits you might be referring to this bug: #7578
58bits commentedon Aug 11, 2024
@remarcable - thanks - I've just looked at #7578 - and their description is similar - but in the reproducible repo above richtext does not have to appear in a block although I'll post my comment above and link there.
rainer-friederich commentedon Aug 12, 2024
Any update on this? Any hint on how to mitigate this without sacrificing the ability to send emails would be greatly appreciated.
jmikrut commentedon Aug 12, 2024
Actively looking into this now!
fix: #7580, unsafely deep merges config
fix: #7580 config deepmerge (#7639)
jmikrut commentedon Aug 12, 2024
This is now fixed and will be released shortly. Thank you everyone!
The Lexical / Rich Text issues are going to be addressed separately via #7620.
That should hopefully be merged tomorrow!
For anyone running into issues like @58bits I believe if you instantiate a new Lexical editor for each field that causes you problems, that will fix it in the meantime. When the above PR lands, you won't need to do that anymore.
denolfe commentedon Aug 13, 2024
Released in https://github.com/payloadcms/payload/releases/tag/v3.0.0-beta.78
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.