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 }}
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.
When attempting to use email notifications after sending, the API outputs an error.
The admin had previously received their welcome mail, which suggests that transport is working as expected.
Also sign up mails are delivered.
Expected behavior
Email notifications are being sent.
Actual behavior
When finishing a submission, no error is thrown for the user, but the API shows:
{"level": 50,"time": 1646183135643,"pid": 35,"hostname": "5177d2cc673f","req": {"id": 13,"method": "POST","url": "/graphql","query": {},"params": {"0": "graphql"},"headers": {"host": "forms.example.com","user-agent": "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:97.0) Gecko/20100101 Firefox/97.0","content-length": "243","accept": "*/*","accept-encoding": "gzip, deflate, br","accept-language": "de,en-US;q=0.7,en;q=0.3","content-type": "application/json","dnt": "1","origin": "https://forms.example.com","referer": "https://forms.example.com/form/jP5Nn3","sec-fetch-dest": "empty","sec-fetch-mode": "cors","sec-fetch-site": "same-origin","sec-gpc": "1","te": "trailers","x-forwarded-for": "redacted","x-forwarded-host": "forms.example.com","x-forwarded-port": "443","x-forwarded-proto": "https","x-forwarded-server": "efd9aa5bde2d","x-real-ip": "redacted"},"remoteAddress": "::ffff:172.19.0.2","remotePort": 56098},"context": "SubmissionNotificationService","form": 1,"submission": 13,"notification": 1,"error": {"name": "TypeError","message": "Cannot read property 'id' of undefined","stack": "TypeError: Cannot read property 'id' of undefined\n at /usr/src/app/dist/service/submission/submission.notification.service.js:35:75\n at Array.map (<anonymous>)\n at SubmissionNotificationService.process (/usr/src/app/dist/service/submission/submission.notification.service.js:30:57)\n at SubmissionSetFieldService.finishSubmission (/usr/src/app/dist/service/submission/submission.set.field.service.js:75:28)\n at processTicksAndRejections (internal/process/task_queues.js:95:5)\n at async SubmissionFinishMutation.submissionFinish (/usr/src/app/dist/resolver/submission/submission.finish.mutation.js:32:9)\n at async target (/usr/src/app/node_modules/@nestjs/core/helpers/external-context-creator.js:77:28)\n at async Object.submissionFinish (/usr/src/app/node_modules/@nestjs/core/helpers/external-proxy.js:9:24)"},"msg": "failed to process notification"}
TypeError: Cannot read property 'id' of undefined
at /usr/src/app/dist/service/submission/submission.notification.service.js:35:75
at Array.map (<anonymous>)
at SubmissionNotificationService.process (/usr/src/app/dist/service/submission/submission.notification.service.js:30:57)
at SubmissionSetFieldService.finishSubmission (/usr/src/app/dist/service/submission/submission.set.field.service.js:75:28)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async SubmissionFinishMutation.submissionFinish (/usr/src/app/dist/resolver/submission/submission.finish.mutation.js:32:9)
at async target (/usr/src/app/node_modules/@nestjs/core/helpers/external-context-creator.js:77:28)
at async Object.submissionFinish (/usr/src/app/node_modules/@nestjs/core/helpers/external-proxy.js:9:24)
{"level": 50,"time": 1646183135643,"pid": 35,"hostname": "5177d2cc673f","req": {"id": 13,"method": "POST","url": "/graphql","query": {},"params": {"0": "graphql"},"headers": {"host": "forms.example.com","user-agent": "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:97.0) Gecko/20100101 Firefox/97.0","content-length": "243","accept": "*/*","accept-encoding": "gzip, deflate, br","accept-language": "de,en-US;q=0.7,en;q=0.3","content-type": "application/json","dnt": "1","origin": "https://forms.example.com","referer": "https://forms.example.com/form/jP5Nn3","sec-fetch-dest": "empty","sec-fetch-mode": "cors","sec-fetch-site": "same-origin","sec-gpc": "1","te": "trailers","x-forwarded-for": "redacted","x-forwarded-host": "forms.example.com","x-forwarded-port": "443","x-forwarded-proto": "https","x-forwarded-server": "efd9aa5bde2d","x-real-ip": "redacted"},"remoteAddress": "::ffff:172.19.0.2","remotePort": 56098},"context": "SubmissionSetFieldService","submission": 13,"form": 1,"error": {"name": "TypeError","message": "Cannot read property 'id' of undefined","stack": "TypeError: Cannot read property 'id' of undefined\n at /usr/src/app/dist/service/submission/submission.notification.service.js:35:75\n at Array.map (<anonymous>)\n at SubmissionNotificationService.process (/usr/src/app/dist/service/submission/submission.notification.service.js:30:57)\n at SubmissionSetFieldService.finishSubmission (/usr/src/app/dist/service/submission/submission.set.field.service.js:75:28)\n at processTicksAndRejections (internal/process/task_queues.js:95:5)\n at async SubmissionFinishMutation.submissionFinish (/usr/src/app/dist/resolver/submission/submission.finish.mutation.js:32:9)\n at async target (/usr/src/app/node_modules/@nestjs/core/helpers/external-context-creator.js:77:28)\n at async Object.submissionFinish (/usr/src/app/node_modules/@nestjs/core/helpers/external-proxy.js:9:24)"},"msg": "failed to send notifications"}
TypeError: Cannot read property 'id' of undefined
at /usr/src/app/dist/service/submission/submission.notification.service.js:35:75
at Array.map (<anonymous>)
at SubmissionNotificationService.process (/usr/src/app/dist/service/submission/submission.notification.service.js:30:57)
at SubmissionSetFieldService.finishSubmission (/usr/src/app/dist/service/submission/submission.set.field.service.js:75:28)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async SubmissionFinishMutation.submissionFinish (/usr/src/app/dist/resolver/submission/submission.finish.mutation.js:32:9)
at async target (/usr/src/app/node_modules/@nestjs/core/helpers/external-context-creator.js:77:28)
at async Object.submissionFinish (/usr/src/app/node_modules/@nestjs/core/helpers/external-proxy.js:9:24)
Then, no notifications are being sent.
This is verifiable at the email server, where no connection attempt is recorded.
Steps to reproduce
Create a public form.
Finish a submission.
Environment
This is the Docker setup using individual containers rolling from latest behind a Traefik proxy:
Also it seems it's not clear which fields are required to be filled in a notification, which are optional, and which are mutually exclusive, because the red stars just appear and disappear seemingly randomly when selecting certain settings. This is eventually related to using a hidden form field that is set to a default value, which can be witnessed in #163, and used for determining the target address of a selected notification. The default value of the hidden form field is not present in the export, nor in the expanded submissions in their overview listing.
What's this issue about?
When attempting to use email notifications after sending, the API outputs an error.
The admin had previously received their welcome mail, which suggests that transport is working as expected.
Also sign up mails are delivered.
Expected behavior
Email notifications are being sent.
Actual behavior
When finishing a submission, no error is thrown for the user, but the API shows:
Then, no notifications are being sent.
This is verifiable at the email server, where no connection attempt is recorded.
Steps to reproduce
Environment
This is the Docker setup using individual containers rolling from
latest
behind a Traefik proxy:docker-compose.yml
Plus the Dockerfile from ohmyform/ui#72 in
./ui/Dockerfile
.The text was updated successfully, but these errors were encountered: