Ghost icon indicating copy to clipboard operation
Ghost copied to clipboard

Ghost installation locking out user

Open matthojo opened this issue 13 years ago • 33 comments

I'm opening this issue due to several forum topics stating that installations are 'locking' out their users, due to the users emails "no longer existing".

This seems to only be mainly on the Digital Ocean service at the moment, however I'm raising the issue on here first just incase it is a genuine Ghost bug.

Scenario

  • Create blog
  • Signup
  • Play with Ghost
  • Go to login with Ghost again once logged out
  • "No user with this email exists"
  • Go to signup
  • "You can only have one user"

Solution found

  • Fresh installation (I cannot fathom this explanation unless it's related to a database change)

Forum topics possibly related

  • https://ghost.org/forum/using-ghost/2209-can-t-log-back-into-blog
  • https://ghost.org/forum/installation/2713-can-t-log-in-to-my-ghost-blog/
  • https://ghost.org/forum/installation/2397-error-there-is-no-user-with-that-email-address-and-a-user-is-already-registered-only-one-user-for-now/

Possible causes (a.k.a guesses)

  • Custom themes interfering somehow?
  • Host configuration

I'll update this with any more information as it comes in.

matthojo avatar Nov 13 '13 16:11 matthojo

I have no clue how to reproduce this. Just created a new Droplet, played around with the posts, changed almost all settings, zero issues. It would be helpful to get a complete dump of one's Ghost folder that demonstrates the problem.

jgillich avatar Nov 13 '13 18:11 jgillich

I'm going to guess that this is due to case sensitivity in many cases - the email address is case sensitive. We need to get someone who is reporting this bug to go into their database and verify what email is in there and if it is the same as the one they are typing in.

Instructions are:

Login to your DO command line.

Type apt-get install sqlite3 to install the sqlite3 command line client Type cd /var/www/ghost/content/data to go to the data directory (assuming they followed my instructions for setting up) Type sqlite3 ghost.db Type select * from users;

Compare the email address

Type .exit to exit sqlite3

ErisDS avatar Nov 13 '13 20:11 ErisDS

@ErisDS Are the email addresses case sensitive by design? It would cause much less confusion if they weren't because I can't think of a single (popular) email provider that handles them case sensitive.

jgillich avatar Nov 13 '13 20:11 jgillich

No, it's an oversight which we need to fix, but we need to verify that that is definitely the problem for these users as well.

ErisDS avatar Nov 13 '13 20:11 ErisDS

would be great if there was a sign in debug mode so we can view what the Ghost install does/sees when signin doesn't work as expected

centminmod avatar Nov 17 '13 12:11 centminmod

Agreed, I can't login either and the only error it throws at me is "Unknown Error" on Digital Ocean. I did check the database and the email is correct. It's a wee bit annoying, hah.

sondr3 avatar Nov 17 '13 17:11 sondr3

Got this error as well on an installation shared with other nginx/apache/etc configs. Ended up setting ghost up in another clean instance on digital ocean and it works fine now. Also put it into a dokku container for vetter isolation.

Never did find out why it freaked out and didn't let me login though. Ghost needs a good deal more debug info/responses.

Wing

On Sunday, November 17, 2013, sondr3 wrote:

Agreed, I can't login either and the only error it throws at me is "Unknown Error" on Digital Ocean. I did check the database and the email is correct. It's a wee bit annoying, hah.

— Reply to this email directly or view it on GitHubhttps://github.com/TryGhost/Ghost/issues/1469#issuecomment-28653009 .

Wing Wong [email protected] http://about.me/wingtangwong https://www.facebook.com/wingedpower

WingTangWong avatar Nov 17 '13 19:11 WingTangWong

My installation is running nginx version: nginx/1.4.3 from the Dotdeb repo on Ubuntu 12.04 with two Ghost installations. Everything is working besides the Unknown Error popping up every time I try to log in, I am going to try to install a clean slate again but it was working earlier, not sure when the bug hit as I've been away for over a week. Nothing should've happened on the server while I was away.

sondr3 avatar Nov 17 '13 19:11 sondr3

@sondr3 can we have a look at what is happening on your install before you start with a new installation? The 'unknown error' is probably caused by the server, so there is a good chance you found a bug :-).

sebgie avatar Nov 18 '13 08:11 sebgie

@sondr3 @WingTangWong "Unknown Error" is different to what other people have experienced. Can we try to debug it a little before you install clean again? "Unknown error" is basically Ghost's last ditch attempt at giving you an error message - it means it has fallen through every other piece of error handling that gives a sensible error message - Ghost.

Ghost sends all it's logging info to stdout - have you got nginx setup to do something with this info? Can you try to login again and take a look at the output from Ghost, rather than what's in the UI?

ErisDS avatar Nov 18 '13 08:11 ErisDS

I have my Nginx configured to output errors and access logs, however my error log is empty for both Nginx and the specific configuration for the websites. The access logs show's that I'm accessing the site at least. I'm a bit green when it comes to configuring Nginx and stuff, how would I make sure that I capture the stdout output correctly?

sondr3 avatar Nov 18 '13 18:11 sondr3

Depends on how you are running Ghost. If you use npm start, they should appear on the same console. If you use forever, it has an log file option.

jgillich avatar Nov 18 '13 18:11 jgillich

Here's at least what I did copy from my latest attempt at logging in on my Ghost install: http://pastebin.com/Sv1WZW9z. Doubt it's incredibly useful because I can't find any errors logged anywhere, which is weird.

sondr3 avatar Nov 18 '13 18:11 sondr3

For mine, when I was attempting to login and it failed, I saw the page load of the /ghost/signin in the nginx logs, but not the attempt to login.

From the npm start console screen logs, I was seeing that the Ghost/NodeJS was issuing 500 errors on each attempt.

No other logging was generated. Basically, it was the same as what sondr3 posted in the pastebin.

It should be noted that when I blew it away, I had re-attempted to install Ghost fresh on the same box that shares nginx/apache/etc configs with other sites I hosted and it continued to fail after that one time. I changed the config.js to listen to the public IP and tried that and it failed as well, so it was not an nginx proxy/config issue.

I'll re-install Ghost on the box I was having problems with later today and see if the error is evident again.

Wing.

On Mon, Nov 18, 2013 at 10:41 AM, sondr3 [email protected] wrote:

Here's at least what I did copy from my latest attempt at logging in on my Ghost install: http://pastebin.com/Sv1WZW9z. Doubt it's incredibly useful because I can't find any errors logged anywhere, which is weird.

— Reply to this email directly or view it on GitHubhttps://github.com/TryGhost/Ghost/issues/1469#issuecomment-28725153 .

WingTangWong avatar Nov 18 '13 18:11 WingTangWong

Out of curiosity, is there anything you want me to do or check before I reinstall Ghost and stuff? I'm not really in a rush to install it but it would be nice to be able to move on, hah.

sondr3 avatar Nov 23 '13 18:11 sondr3

Would it be possible for one of the Ghost team to login and attempt to figure out what's going on?

ErisDS avatar Nov 23 '13 20:11 ErisDS

Sure, I don't think that should be a major problem. Whoever wants to do give it a crack can just shoot me a message and we'll try to figure it out. No promises on my configuration being correct though, haha.

sondr3 avatar Nov 24 '13 18:11 sondr3

I will take a look, your GitHub account does not have an email address though, can you email me? hannah[at]ghost[dot]org

ErisDS avatar Nov 24 '13 18:11 ErisDS

To follow up, it seems the problem with sondr3's site is to do with nginx not passing through the required cookies.

I am reasonably certain that Ghost is not locking users out.

There are a few things happening which can cause it to look that way:

  • users getting confused about the signup process, and using the wrong email address to login... or just plain forgetting how they signed up we address that in #1499
  • email addresses were case sensitive, that is now fixed in master #1498
  • server misconfigurations, we can address this by providing additional documentation.

I am now closing this issue, unless we are able to determine a case where Ghost has locked a user out.

ErisDS avatar Nov 25 '13 11:11 ErisDS

Updating to 0.4 locked me out. I'm pretty sure my login is correct, but now I'm getting "Unknown Error".

POST https://jakobgillich.com/ghost/signin/ [HTTP/1.1 403 Forbidden 11ms]

The frontend works fine. Also no error on the server, but I noticed that the user check is not even called. Will try to figure out where it fails exactly tomorrow.

jgillich avatar Jan 13 '14 21:01 jgillich