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

Tweak staging/local dev to not fail for scheduled task 'Sending Count Notification Daily Emails' #1143

Open
ljdelight opened this issue Aug 13, 2024 · 0 comments

Comments

@ljdelight
Copy link
Contributor

ljdelight commented Aug 13, 2024

Staging was running the scheduled task 'Sending Count Notification Daily Emails' and it failed. This is because staging, and local dev, is not configured to use an email provider to send real emails.

For local dev and staging: the playframework conf needs to be configured to log the email which would have been sent, that should resolve the injection issue. Eg set play.mailer.mock to true in application.conf.

20:11:50.528 INFO  [][application-akka.actor.default-dispatcher-24][org.maproulette.jobs.SchedulerActor] - Scheduled Task 'Sending Count Notification Daily Emails': Starting run
20:11:50.570 ERROR [][application-akka.actor.default-dispatcher-24][org.maproulette.jobs.SchedulerActor] - Failed to send count email: com.google.inject.ProvisionException: Unable to provision, see the
 following errors:

1) [Guice/ErrorInCustomProvider]: RuntimeException: host needs to be set in order to use this plugin (or set play.mailer.mock to true in application.conf)
  while locating SMTPConfigurationProvider
  while locating SMTPConfiguration

Learn more:
  https://github.com/google/guice/wiki/ERROR_IN_CUSTOM_PROVIDER

1 error

======================
Full classname legend:
======================
SMTPConfiguration:         "play.api.libs.mailer.SMTPConfiguration"
SMTPConfigurationProvider: "play.api.libs.mailer.SMTPConfigurationProvider"
========================
End of classname legend:
========================

@ljdelight ljdelight changed the title Tweak staging/local dev to not fail for scheduled task 'Sending Count Notification Daily Emails' Tweak staging/local dev to not fail for scheduled task 'Sending Count Notification Daily Emails' Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant