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
Describe the bug
When attempting to send certain emails in v3.1.0, a circular JSON error is thrown by the EmailPlugin on the server, preventing the email from getting sent.
To Reproduce
Steps to reproduce the behavior:
With a standard installation
Go through a regular checkout flow and complete the order
When the order confirmation email is triggered, you will see the following error:
[server] error 16/12/24, 12:01 - [EmailPlugin] Converting circular structure to JSON
[server] TypeError: Converting circular structure to JSON
[server] --> starting at object with constructor 'Object'
[server] | property 'sessionCacheStrategy' -> object with constructor 'DefaultSessionCacheStrategy'
[server] | property 'cacheService' -> object with constructor 'CacheService'
[server] | ...
[server] | property 'activeConfig' -> object with constructor 'Object'
[server] --- property 'authOptions' closes the circle
[server] at JSON.stringify (<anonymous>)
[server] at Job.asJSON (C:\Development\vendure\vendure\node_modules\bullmq\src\classes\job.ts:446:18)
[server] at Job.addJob (C:\Development\vendure\vendure\node_modules\bullmq\src\classes\job.ts:1175:26)
[server] at Function.create (C:\Development\vendure\vendure\node_modules\bullmq\src\classes\job.ts:227:24)
[server] at processTicksAndRejections (node:internal/process/task_queues:95:5)
[server] at async Queue.add (C:\Development\vendure\vendure\node_modules\bullmq\src\classes\queue.ts:209:19)
[server] at async BullMQJobQueueStrategy.add (C:\Development\vendure\vendure\packages\job-queue-plugin\src\bullmq\bullmq-job-queue-strategy.ts:162:25)
[server] at async JobQueue.add (C:\Development\vendure\vendure\packages\core\src\job-queue\job-queue.ts:102:30)
[server] at async EmailPlugin.handleEvent (C:\Development\vendure\vendure\packages\email-plugin\src\plugin.ts:426:17)
Expected behavior
No error and the email gets sent
Environment (please complete the following information):
Yes - good detective work. The root cause is indeed the shipping method serialization. I'm adding a suite of tests on entity serialization that will address this and catch any similar regressions in the future.
Describe the bug
When attempting to send certain emails in v3.1.0, a circular JSON error is thrown by the EmailPlugin on the server, preventing the email from getting sent.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No error and the email gets sent
Environment (please complete the following information):
Additional context
Discussion on Discord: https://discord.com/channels/1100672177260478564/1316447090142085222/1316447090142085222
The text was updated successfully, but these errors were encountered: