JSON parse error when sending email with SparkPost

(山) #1

I have repeatedly installed, removed, re-installed Discourse, and I come up with the same error regarding email activation.

Yes, I troubleshoot already.

Logs show no errors.

$ tail shared/standalone/log/rails/production.log

Processing by ExceptionsController#not_found as */*
  Rendered exceptions/not_found.html.erb within layouts/no_ember (4.7ms)
  Rendered layouts/_head.html.erb (0.3ms)
  Rendered common/_special_font_face.html.erb (0.2ms)
  Rendered common/_discourse_stylesheet.html.erb (0.1ms)
  Rendered application/_header.html.erb (0.2ms)
  Rendered text template (0.0ms)
Completed 404 Not Found in 20ms (Views: 0.3ms | ActiveRecord: 6.5ms)

Sent mail to yautweh@gmail.com (1137.3ms)

That ms readout worries me.

My smtp port is open and connectable. I did the telnet test; it worked.

Sparkpost did have an error for me earlier, which no longer registers. Sparkpost receives nothing now.

550 5.6.0 JSON parsing error in {hash}: continue at offset 0

My email is also correctly stated in app.yml ‘as requested with single quotes’. No yml errors either from random whitespaces.

SMTP address, username and password fields are correct. SPF and DKIM records are set up and active/validated. The hostname is also correct.

Everything is “correct” except the if -> then outcome.

No emails are sent.

Thank you for your time.

Discourse setup with Digital Ocean - Not sending SparkPost activation email
(Eric Au) #2

Me too. Exactly the same error like you. Also using SparkPost. Cannot send email.

(Stefan Kasberger) #3

same here. never seen this before. any ideas what it is about?

(Jeff Atwood) #4

Have you customized anything? This looks like a customization error, or possibly a localization bug related to a non-English language being selected?

(山) #5

Nope and nope.

Completely clean install. Mucked with absolutely nothing.

(Régis Hanol) #7

I think I know what it is. Let me fix it (it’s probably my fault)

(Jay Pfaffman) #8

Old @zogstrip must have been pretty quick on the draw! The install I just did worked fine and sent me the activation email through mailgun. For kicks, I opened another account and it worked too.

I don’t see a commit on github, though.

(Régis Hanol) #9

Haven’t fixed it yet. But it will only break if you use SparkPost.

(Danilo) #10

Exactly the same issue here, also on Sparkpost. Happened after I installed Discourse on a new server and restored everything from a week old backup.

(Régis Hanol) #11

This should be fixed now :cow2:

(Jake Hower) #12

What do we need to do to apply the fix?

(cpradio) #13

Visit /admin/upgrade or ./launcher rebuild app

(Jake Hower) #14

Worked a treat. Thanks for the speedy fix team.

(Jeff Atwood) #15