Closed paulsnar closed 7 years ago
Are you able to replicate this? I just tried an incognito window and it was fine - so it's either the mongo server bailing as a one off or something else.
I can't actually replicate this at all at the moment… is there anything else perhaps?
I can replicate 100% (or so it seems). That's exactly why I mentioned a different account - this particular error appears to be tied to mine.
Okay, I've got the error in a loggly log. I'll debug later this afternoon. It's trying to re-insert a record for you.
I don't have a full solution just yet, but if you can repeat your test, I can capture a bit more debugging to help me understand how it's throwing the error.
The logic in the code looks fine, but obviously there's an edge case that I can't see.
Just tried once again, and also the error is now complete:
{
"message": "E11000 duplicate key error index: jsonbin.users.$username_1 dup key: { : \"paulsnar\" }",
"status": 500
}
Ta!
I should have added that the detailed logging was in loggly (obviously I don't want to expose any internals).
Can you give it another try now? I've made a change to your db record which I think is the cause (I think somehow your githubId got stored as an int instead of string, so it tries to re-insert it after failing to find you, but then throws the dup key error).
Appears to be fixed!
Sweet. I found two other users with the same problem, I've pushed a change that always ensures the user's github id is always stored as a string.
So I think I logged in probably once or twice a while ago with this Github account, although on a different machine. Now I'm trying to log on via this machine, and the Github flow goes through successfully (i.e. it redirects right past it), but then I'm presented with this:
The response seems to be streamed partially and then failing somewhere in the middle. Here are the headers.
Authenticating with a different account seems to go through fine, both first and recurring logins. I can try discarding the existing Github authentication later, if that might help.