Failed to load resource: the server responded with a status of 500 ()

If you’re looking for help, please provide information about your environment. If you delete this template and don’t provide any information, your topic will be automatically closed.

If you aren’t running the latest version of Ghost, the first thing we’ll ask you to do is update to the latest version of Ghost.

And

  • How was Ghost installed and configured? Fly.io, Mailgun
  • What Node version, database, OS & browser are you using? No
  • What errors or information do you see in the console? Failed to load resource: the server responded with a status of 500 () https://public-blog.fly.dev/members/api/send-magic-link/
  • What steps could someone else take to reproduce the issue you’re having? Try to login / subscribe and you’ll see the error in the console. Rest of the blog works fine, it seems.

Your site is in private mode. If you take it out of private mode, does it still throw the error?

500 indicates a server error.

SSH to the server and use `journalctl-u 'ghost’ to review recent logs from your Ghost instance.

Yes. It happens when you try to login, I think it’s related to emails.

Here’s what I got frorm fly.io:

2023-02-14T05:37:44.187 app[e10e2834] lax [info] Error ID:

2023-02-14T05:37:44.187 app[e10e2834] lax [info] b4973b40-ac29-11ed-9c10-a9caadea8ae9

2023-02-14T05:37:44.187 app[e10e2834] lax [info] ----------------------------------------

2023-02-14T05:37:44.187 app[e10e2834] lax [info] Error: Sending failed

2023-02-14T05:37:44.187 app[e10e2834] lax [info] at createMailError (/var/lib/ghost/versions/5.33.6/core/server/services/mail/GhostMailer.js:68:12)

2023-02-14T05:37:44.187 app[e10e2834] lax [info] at DirectMailer.<anonymous> (/var/lib/ghost/versions/5.33.6/node_modules/nodemailer-direct-transport/lib/direct-transport.js:157:41)

2023-02-14T05:37:44.187 app[e10e2834] lax [info] at DirectMailer.<anonymous> (/var/lib/ghost/versions/5.33.6/node_modules/nodemailer-direct-transport/lib/direct-transport.js:228:30)

2023-02-14T05:37:44.187 app[e10e2834] lax [info] at /var/lib/ghost/versions/5.33.6/node_modules/nodemailer-direct-transport/lib/direct-transport.js:350:28

2023-02-14T05:37:44.187 app[e10e2834] lax [info] at callback (/var/lib/ghost/versions/5.33.6/node_modules/smtp-connection/lib/smtp-connection.js:374:14)

2023-02-14T05:37:44.187 app[e10e2834] lax [info] at SMTPConnection.<anonymous> (/var/lib/ghost/versions/5.33.6/node_modules/smtp-connection/lib/smtp-connection.js:385:20)

2023-02-14T05:37:44.187 app[e10e2834] lax [info] at SMTPConnection._actionRCPT (/var/lib/ghost/versions/5.33.6/node_modules/smtp-connection/lib/smtp-connection.js:1313:20)

2023-02-14T05:37:44.187 app[e10e2834] lax [info] at SMTPConnection.<anonymous> (/var/lib/ghost/versions/5.33.6/node_modules/smtp-connection/lib/smtp-connection.js:1273:22)

2023-02-14T05:37:44.187 app[e10e2834] lax [info] at SMTPConnection._processResponse (/var/lib/ghost/versions/5.33.6/node_modules/smtp-connection/lib/smtp-connection.js:669:16)

2023-02-14T05:37:44.187 app[e10e2834] lax [info] at SMTPConnection._onData (/var/lib/ghost/versions/5.33.6/node_modules/smtp-connection/lib/smtp-connection.js:493:10)

2023-02-14T05:37:44.187 app[e10e2834] lax [info] at TLSSocket.emit (node:events:513:28)

2023-02-14T05:37:44.187 app[e10e2834] lax [info] at addChunk (node:internal/streams/readable:315:12)

2023-02-14T05:37:44.187 app[e10e2834] lax [info] at readableAddChunk (node:internal/streams/readable:289:9)

2023-02-14T05:37:44.187 app[e10e2834] lax [info] at TLSSocket.Readable.push (node:internal/streams/readable:228:10)

2023-02-14T05:37:44.187 app[e10e2834] lax [info] at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23)

2023-02-14T05:37:44.187 app[e10e2834] lax [info]

Share your config.production.json. Looks like email sending isn’t set up right.

{
  "url": "http://localhost:2368",
  "server": {
    "port": 2368,
    "host": "::"
  },
  "mail": {
    "transport": "Direct"
  },
  "logging": {
    "transports": [
      "file",
      "stdout"
    ]
  },
  "process": "systemd",
  "paths": {
    "contentPath": "/var/lib/ghost/content"
  }
}

This indicates you are attempting to send email through a local SMTP server on the same host. Have you set up and tested that one is present and works outside of ghost?

You need to configure a valid SMTP server.