Skip to content
New issue

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

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

Already on GitHub? # to your account

email sending stop working #373

Closed
jcgarcia opened this issue Dec 28, 2017 · 5 comments
Closed

email sending stop working #373

jcgarcia opened this issue Dec 28, 2017 · 5 comments
Labels

Comments

@jcgarcia
Copy link

Hello,
I have installed alf.io on Heroku and it's been working well for a couple of months but suddenly the app stopped sending emails. I've made no changes to configuration and I have already checked that my mail server is working properly and I can send and receive emails.

I have already notified to Heroku support but they say the problem is in the code of the application since they have detected this error: IllegalArgumentException: Illegal base64 character 2d

Any idea which can be the cause of the error and the app stop sending emails?

The version I am using is Alf.io v.1.12.1

Thanks in advance,

Julio Garcia
jcgarcia@ingasti.com

@cbellone
Copy link
Member

cbellone commented Dec 28, 2017

Hi @jcgarcia

could you please share the complete stack trace?
I am afraid the message
IllegalArgumentException: Illegal base64 character 2d
is not enough to understand where is the problem.

you can find it in the application logs: heroku logs --source app --tail

I also have a couple of questions:

  1. is the event date in the future? Currently messages are only sent for events with expiration date > now

  2. did you customize the PDF templates? (ticket, receipt, ...)

  3. which kind of mail sender are you using? Smtp/Smtps? Mailjet? Mailgun? And, if Smtps, which provider?

thanks
Celestino

@jcgarcia
Copy link
Author

Thanks for the answer Celestino

The event will be on 31st Dec, There are no customizations on the templates, nor ticket neither recipt.
The app was working properly and sending emails with the reservations confirmations, and the tickets after the payment was confirmed, but suddenly the app stop sending emails on 19th Dec after noon.

I am using smtp mail with my own hosting provider (justhost) and I have already checked that the service is working and I am able to send and receive emails.

I asked Heroku about any possible change in their servers but they insist there's not been any change that could affect my app and that the error is in the app itself. They have reviewed the logs and found that error so they say that's the cause of the app stop sending emails.

I am attaching the logs.
Thanks for your help.

legevents-logs-1514481676281.txt

Actually, this is their complete answer:

Sorry for the frustration. Just to confirm, it is extremely unlikely that anything we would have done on the heroku platform would result in your application throwing the error: IllegalArgumentException: Illegal base64 character 2d which seems to be the root cause of emails not being sent out (because the application is crashing before it gets to send an email). While you mentioned that you haven't changed any code, it's quite possible there is a configuration or database value that is being read and is causing an issue (perhaps someone entered an email address with an invalid character.

As a developer, my first step would be to write some debugging statements around the error to try and see which values are being passed around to try and find the source. If you're not comfortable with making that change, it might be helpful to open an issue on the alf.io issue tracker in order to see if they can provide assistance.

I wish I could be of more assistance here, but I can't see anything from our side that is causing the problem.

@jcgarcia jcgarcia reopened this Dec 28, 2017
@jcgarcia
Copy link
Author

Sorry, I close it by error (wrong button)

@cbellone
Copy link
Member

cbellone commented Dec 28, 2017

Thanks for the log, I found the problem :-)

byte[] keystoreRaw = Base64.getDecoder().decode(pbookConf.get(ConfigurationKeys.PASSBOOK_KEYSTORE).orElseThrow(IllegalStateException::new));

you have an invalid value in the Passbook Keystore

image

you should delete all the configurations for "passbook" by clicking on the "trash" icon:

image

please check admin, organization and event configuration and let me know.

In any case, we will improve the error handling for this case in the next release

Celestino

@cbellone cbellone added the bug label Dec 28, 2017
@jcgarcia
Copy link
Author

Thank you so much Celestino.
The app is sending emails again.
Happy New Year btw.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants