I encountered the same problem as the closed issue #652 . That issue was closed when the reporter seems to have avoided the problem, but it still exists. Any action that leads to an email being sent, like inviting a user or an invited user trying to get a verification code, can result in an exception:
pangolin | ⨯ unhandledRejection: TypeError: Converting circular structure to JSON
pangolin | --> starting at object with constructor 'Object'
pangolin | --- property 'issuerCertificate' closes the circle
pangolin | at JSON.stringify (<anonymous>)
pangolin | at Printf.template (server/logger.ts:14:28)
pangolin | 12 | }
pangolin | 13 | if (Object.keys(metadata).length > 0) {
pangolin | > 14 | msg += ` ${JSON.stringify(metadata)}`;
pangolin | | ^
pangolin | 15 | }
pangolin | 16 | return msg;
pangolin | 17 | }
This appears to be an error encountered when trying to log a more useful message, which is the first thing that could be fixed. In practice, this behavior seems to indicate a problem with verifying the TLS certificate of the mail server (in my situation, it's sending a cert with the wrong domain name due to a split-horizon DNS situation which should be addressed but it is what it is).
It states that "smtp_tls_reject_unauthorized" means "Do not fail if the server certificate cannot be verified." However, it's actually the opposite - "true" means it will fail if the server cannot be verified, "false" will allow a connection even with an invalid certificate. Perhaps for the same reason, it also gives the wrong default - it says that the default is "false", but testing shows that the default is "true".
If you encounter the above exception, try setting smtp_tls_reject_unauthorized to false. If that fixes the error, check out the TLS certificate presented by your mail server.
Originally created by @jcrawfordor on GitHub (Jun 18, 2025).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/934
Originally assigned to: @miloschwartz on GitHub.
I encountered the same problem as the closed issue #652 . That issue was closed when the reporter seems to have avoided the problem, but it still exists. Any action that leads to an email being sent, like inviting a user or an invited user trying to get a verification code, can result in an exception:
```
pangolin | ⨯ unhandledRejection: TypeError: Converting circular structure to JSON
pangolin | --> starting at object with constructor 'Object'
pangolin | --- property 'issuerCertificate' closes the circle
pangolin | at JSON.stringify (<anonymous>)
pangolin | at Printf.template (server/logger.ts:14:28)
pangolin | 12 | }
pangolin | 13 | if (Object.keys(metadata).length > 0) {
pangolin | > 14 | msg += ` ${JSON.stringify(metadata)}`;
pangolin | | ^
pangolin | 15 | }
pangolin | 16 | return msg;
pangolin | 17 | }
```
This appears to be an error encountered when trying to log a more useful message, which is the first thing that could be fixed. In practice, this behavior seems to indicate a problem with verifying the TLS certificate of the mail server (in my situation, it's sending a cert with the wrong domain name due to a split-horizon DNS situation which should be addressed but it is what it is).
Validating the cause/fix was additionally complicated by what I believe to be an error in the documentation at https://docs.fossorial.io/Pangolin/Configuration/config
It states that "smtp_tls_reject_unauthorized" means "Do not fail if the server certificate cannot be verified." However, it's actually the opposite - "true" means it *will* fail if the server cannot be verified, "false" will allow a connection even with an invalid certificate. Perhaps for the same reason, it also gives the wrong default - it says that the default is "false", but testing shows that the default is "true".
If you encounter the above exception, try setting smtp_tls_reject_unauthorized to false. If that fixes the error, check out the TLS certificate presented by your mail server.
Thanks- just checked and looks like the default is true in nodemailer. I'll update the docs!
<!-- gh-comment-id:2989087806 -->
@miloschwartz commented on GitHub (Jun 19, 2025):
Thanks- just checked and looks like the default is true in nodemailer. I'll update the docs!
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @jcrawfordor on GitHub (Jun 18, 2025).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/934
Originally assigned to: @miloschwartz on GitHub.
I encountered the same problem as the closed issue #652 . That issue was closed when the reporter seems to have avoided the problem, but it still exists. Any action that leads to an email being sent, like inviting a user or an invited user trying to get a verification code, can result in an exception:
This appears to be an error encountered when trying to log a more useful message, which is the first thing that could be fixed. In practice, this behavior seems to indicate a problem with verifying the TLS certificate of the mail server (in my situation, it's sending a cert with the wrong domain name due to a split-horizon DNS situation which should be addressed but it is what it is).
Validating the cause/fix was additionally complicated by what I believe to be an error in the documentation at https://docs.fossorial.io/Pangolin/Configuration/config
It states that "smtp_tls_reject_unauthorized" means "Do not fail if the server certificate cannot be verified." However, it's actually the opposite - "true" means it will fail if the server cannot be verified, "false" will allow a connection even with an invalid certificate. Perhaps for the same reason, it also gives the wrong default - it says that the default is "false", but testing shows that the default is "true".
If you encounter the above exception, try setting smtp_tls_reject_unauthorized to false. If that fixes the error, check out the TLS certificate presented by your mail server.
@miloschwartz commented on GitHub (Jun 19, 2025):
Thanks- just checked and looks like the default is true in nodemailer. I'll update the docs!