Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when notifications are triggered #7352

Open
darkcherrycreative opened this issue May 16, 2024 · 1 comment
Open

Error when notifications are triggered #7352

darkcherrycreative opened this issue May 16, 2024 · 1 comment

Comments

@darkcherrycreative
Copy link

System information

Medusa version (including plugins):1.10.0
Node.js version: 18.17
Database: postgres 15
Operating system: ubuntu (WSL)

Steps to reproduce the behavior

An event is fired and the following message appears on the terminal:

EntityPropertyNotFoundError: Property "valid_for" was not found in "DiscountRule". Make sure your query is correct.
at /mnt/g/xampp/htdev//node_modules/typeorm/query-builder/SelectQueryBuilder.js:2270:23
at Array.forEach ()
at SelectQueryBuilder.buildRelations (/mnt/g/xampp/htdev/
/node_modules/typeorm/query-builder/SelectQueryBuilder.js:2262:32)
at /mnt/g/xampp/htdev//node_modules/typeorm/query-builder/SelectQueryBuilder.js:2305:26
at Array.forEach ()
at SelectQueryBuilder.buildRelations (/mnt/g/xampp/htdev/
/node_modules/typeorm/query-builder/SelectQueryBuilder.js:2262:32)
at /mnt/g/xampp/htdev//node_modules/typeorm/query-builder/SelectQueryBuilder.js:2305:26
at Array.forEach ()
at SelectQueryBuilder.buildRelations (/mnt/g/xampp/htdev/
/node_modules/typeorm/query-builder/SelectQueryBuilder.js:2262:32)
at SelectQueryBuilder.applyFindOptions (/mnt/g/xampp/htdev//node_modules/typeorm/query-builder/SelectQueryBuilder.js:1758:22)
at SelectQueryBuilder.setFindOptions (/mnt/g/xampp/htdev/
/node_modules/typeorm/query-builder/SelectQueryBuilder.js:71:14)
at EntityManager.find (/mnt/g/xampp/htdev//node_modules/typeorm/entity-manager/EntityManager.js:522:14)
at Repository.find (/mnt/g/xampp/htdev/
/node_modules/typeorm/repository/Repository.js:197:29)
at Repository. (/mnt/g/xampp/htdev//node_modules/@medusajs/medusa/dist/repositories/order.js:125:68)
at step (/mnt/g/xampp/htdev/
/node_modules/@medusajs/medusa/dist/repositories/order.js:33:23)
at Object.next (/mnt/g/xampp/htdev/***/node_modules/@medusajs/medusa/dist/repositories/order.js:14:53)
warn: An error occured while nodemailer was processing a notification for order.updated: Property "valid_for" was not found in "DiscountRule". Make sure your query is correct.

Expected behavior

There are no discounts set up, and none were applicable to this order anyway. Event should fire and email sent.

@darkcherrycreative
Copy link
Author

Update on this issue, i've just installed a fresh version of Medusa (latest) and added the nodemailer plugin.

I get the exact same error when a notification is triggered:

warn: An error occured while nodemailer was processing a notification for order.updated: Property "valid_for" was not found in "DiscountRule". Make sure your query is correct.

There is an additional warning when starting the dev environment though too, this is:

warn: The subscriber in /mnt/g/xampp/htdev/**/test-store/node_modules/medusa-plugin-nodemailer/subscribers/index.js is missing a config.

What config is this actually looking for?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant