Members can't sign in, "Please enter a valid email address"

My issue is that some members superlevel.de can’ sign in. The problem only affects some users who get the “Please enter a valid email address!” error message. They also don’t receive the login mail.

The site is running Ghost Version 3.37.1 on a self hosted Ubuntu 20.04.1 LTS server by Hetzner with a MySQL database (Ver 8.0.21). Node is v12.18.3.

The theme is a slightly customized version of Lyra. Paid members are activated, free members are deactivated. We’re managing payments via Steady (a service similar to Patreon) and manuelly enter them with name and mail address.

Some of our first members reported that they received “Please enter a valid email address!” errors. Their addresses are set up in the members area in the backend. After the latest update introducing the portal the error is still there, but saying “Failed to log in, please try again”.

I can reproduce the error myself when I enter their mail adresses in multiple browsers. We tested the feature with @gmail.com and @posteo.de mail addresses without issues, that worked then and still works now.

Curiously, entering completely random mail addresses like “asd@asdasdasd.asd” seems to produce a success message. So far I’ve only seen the error with addresses who are members in the backend.

I made some changes to the signup.hbs0 file, mostly translation, redirecting the “Signup” button to our external payment provider, but nothing huge. Is it possible I might’ve broken something here?

Since fake mail addresses work, I suspect that it has something to do with however the address is verified. Where can I check these settings? Are there logs that might help with figuring out the issue?

Hey @sofakissen,

Are you still seeing the same Portal error in the latest version ? “Failed to log in, please try again” error is shown when server is unable to send the email to address for any reason, so server logs are a good place to check for more error details on why its failing in this particular case. Also, can you share what kind of email address are getting this failure, maybe they have something in common where your Mail provider is unable to send emails to them ?

1 Like

I realize this is a bit old, but at least one of our members is currently getting this same error.

Very similar circumstances: we manually added this member in the backend, the theme is a customized version of Casper, and we recently added Portal. We haven’t made any edits to the signup file, however, and we’re currently on 3.40.5.

I was able to use the link generated by “Impersonate” to bypass the error and allow them to log in, but now the problem is that they don’t seem to be able to access paid posts, despite their complimentary premium plan.

I had the same issue. For some reason, the generic Mailgun set up worked for a while and then stopped. Editing the config.production.json file fixed it.

Details: Signup/login fails in Dawn theme with Portal (Beta)

1 Like

Hey, sorry for not replying sooner! Last year and early 2021 have been busy, busy, busy. Now I’ve finally gotten around setting up Mailgun as @Dinakar describes in another post. At an first attempt at logging in, I still got the same error.

I’ll now update to Ghost 4.0 (if I can), maybe the new portal fixes the issue.

I’ve checked https___www_superlevel_de_production.error.log and it says “Failed to send email” after attempting to login into the members area with my mail address, but I really lack the knowledge to understand where to fix this problem…

{"name":"Log","hostname":"superlevel-ghost","pid":27341,"level":50,"err":{"id":"0954be20-8f01-11eb-a280-6b89976328a4","domain":"https://www.superlevel.de","code":"ERR_SSL_WRONG_VERSION_NUMBER","name":"EmailError","statusCode":500,"level":"normal","message":"Failed to send email. Reason: 139680810170240:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:\n.","help":"\"Please see https://ghost.org/docs/config/#mail for instructions on configuring email.\"","stack":"EmailError: Failed to send email. Reason: 139680810170240:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:\n.\n    at EmailError.GhostError (/var/www/ghost/versions/3.42.4/node_modules/@tryghost/errors/lib/errors.js:10:26)\n    at new EmailError (/var/www/ghost/versions/3.42.4/node_modules/@tryghost/errors/lib/errors.js:34:20)\n    at createMailError (/var/www/ghost/versions/3.42.4/core/server/services/mail/GhostMailer.js:52:12)\n    at MailComposer.returnCallback (/var/www/ghost/versions/3.42.4/core/server/services/mail/GhostMailer.js:95:28)\n    at SMTPConnectionPool._onConnectionError (/var/www/ghost/versions/3.42.4/node_modules/simplesmtp/lib/pool.js:334:17)\n    at SMTPClient.emit (events.js:315:20)\n    at SMTPClient.EventEmitter.emit (domain.js:483:12)\n    at SMTPClient._onError (/var/www/ghost/versions/3.42.4/node_modules/simplesmtp/lib/client.js:373:10)\n    at TLSSocket.emit (events.js:315:20)\n    at TLSSocket.EventEmitter.emit (domain.js:483:12)\n    at emitErrorNT (internal/streams/destroy.js:92:8)\n    at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)\n    at processTicksAndRejections (internal/process/task_queues.js:84:21)\n\nError: 139680810170240:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:\n"},"msg":"Failed to send email. Reason: 139680810170240:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:\n.","time":"2021-03-27T13:33:37.930Z","v":0}`

I managed to update Ghost to 4.1.2 (after solving some issues with Ghost-CLI). The login still does not seem to work.

Even when I try to use the new portal login I only get “Failed to log in, please try again” when entering mail addresses that definitely belong to members. It’s a problem with custom domains as well as big hosts like Gmail, but it also seems to be quite randomly.

Could there be any settings with the members causing this issue?

I went back to Ghost 3.42.4 because 4.1.2 went to 502 Bad Gateway errors after a restart and I have to figure out this login issue first.

I googled for the ERR_SSL_WRONG_VERSION_NUMBER error I found in the log. While just trying things I removed "secureConnection": true from the config and now it works! Jeez… that’s a different problem now, but at least members will finally be able to log in to our site.

A weird thing is that Ghost still shows the same success-message when entering a totally random mail address not connected to a user. But Mailgun doesn’t seem to send them out so that’s a smaller problem I guess.