400 and 500 errors with member subscribe form on local

I’m trying to get the member stuff working on my theme on my local machine. I’m using a theme from scratch vs. casper. I’ve set up mailgun, have entered by domain and API key, and have the following in my config.development.json file:

  "mail": {
    "transport": "SMTP",
    "options": {
      "service": "Mailgun",
      "host": "smtp.mailgun.org",
      "port": 587,
      "secureConnection": true,
      "auth": {
        "user": "MY USERNAME",
        "pass": "MY PASSWORD"

(I read a different thread on here with an alternative port number, which I also tried).

Rather than using the portal button on the bottom, I’m trying to embed a form inline, with the following code:

<form data-members-form="subscribe">
  <input data-members-email type="email" required="true" placeholder="Your Email Address" />
  <button type="submit">Sign Me Up</button>

When the page currently loads, I’m getting the following error:

portal.min.js:3 GET http://localhost:2368/members/api/member/ 400 (Bad Request)

When I press submit on the form, I get the following error:

POST http://localhost:2368/members/api/send-magic-link/ 500 (Internal Server Error)

When I’ve tried re-enabling the portal button on the bottom, and then submitting the form from the modal, I get the same error above in the console, and the following error in the UI:

Failed to sign up, please try again

When I try to update the support and/or newsletter email addresses in the settings, I get a retry error.

Any idea what I’m doing wrong here?

1 Like

I’m seeing this as well on my local. Have you had any luck resolving this? I’d love to be able to fully test Ghost locally before migrating to a Ghost(Pro) instance…