openSUSE / osem

Open Source Event Manager. An event management tool tailored to Free and Open Source Software conferences.
http://osem.io
MIT License
878 stars 494 forks source link

User model cannot be created for new users to OSEM #1493

Open TheRealBro opened 7 years ago

TheRealBro commented 7 years ago

PLACEHOLDER issue for @darix (please add your information)

darix commented 7 years ago
  1. new user authenticates
  2. user model gets set up for the user
  3. when osem tries to save it, mysql reports "duplicate email address"
  4. User.find(email: 'email from user') throws RecordNotFound error

smells like trying to save twice within a transaction?

differentreality commented 6 years ago

This is an isolated case, and I haven't seen it be reproduced. The error in errbit is no longer available, the email which I still have says:

`ERROR MESSAGE: Mysql2::Error: Duplicate entry 'user_email_here' for key 'index_users_on_email'

WHERE: conference#show

app/models/user.rb:100`

In events.o.o that line of code corresponds to https://github.com/openSUSE/osem/blob/master/app/models/user.rb#L137

In https://github.com/openSUSE/osem/blob/master/app/models/user.rb#L132 the user is found by the username. Also this particular user has 2 accounts on events.o.o. I wonder if there is a mixup with username and email between those accounts, but I cannot confirm what is being sent through ichain.

Perhaps if we can re-trigger the error we can take a look at the parameters.

bear454 commented 6 years ago

Closing, as it hasn't been reproduced.

TheRealBro commented 6 years ago

Seems like it's time to move to pretalx or frab o.O - are there any logs or information from the "trying to reproduce but didn't work"? Are there any questions we could maybe help with?

hennevogel commented 6 years ago

This happens if MF-IT changes peoples email addresses. The whole authorization logic is build around that this never happens. But it does some times.

hennevogel commented 6 years ago

@darix is there a particular user that is affected by this?

darix commented 6 years ago

no this has nothing to do with MFIT changing email addresses. this happened to myself or a friend when trying to sign up for the first time. that's why the find by email reported not found.

hennevogel commented 6 years ago

@darix when and where?

differentreality commented 6 years ago

I know of 2 times this happened, if I am not mistaken it was around oSC17 and oSC16. This happened specifically in openSUSE OSEM instance - it uses ichain so it is not possible to duplicate without a SUSE account.

Please also note that the user did already have some account on the OSEM instance.

hennevogel commented 6 years ago

@differentreality I guess we have two issues here. One when all of the sudden there is a new user in ichain with the same email address. And the other one @darix has seen.