Skip to content
This repository has been archived by the owner on Oct 29, 2020. It is now read-only.

Unable to login on staging. #7438

Open
DFurnes opened this issue Jul 10, 2017 · 11 comments
Open

Unable to login on staging. #7438

DFurnes opened this issue Jul 10, 2017 · 11 comments

Comments

@DFurnes
Copy link
Contributor

DFurnes commented Jul 10, 2017

INVESTIGATION

Current Behavior

It seems like people are unable to login on staging, and same has been reported on Thor as well. It's coming from this line, which checks if the current access token has expired (and if it has, then fetches a new one & updates the user's "last accessed" time in Northstar).

screen shot 2017-07-10 at 5 03 39 pm

Desired Behavior

Logging in should work!

🕵️

@DFurnes
Copy link
Contributor Author

DFurnes commented Jul 10, 2017

My staging user reliably gets the above error message when trying to log in. I checked out that user's fields in Sequel Pro & my field_access_token, field_access_token_expiration, and field_refresh_token all look to be set correctly, so I should have an access token.

@DFurnes
Copy link
Contributor Author

DFurnes commented Jul 10, 2017

I also checked the logs and this error has occurred 10 times in production over the last week, so it's not necessarily a new bug... although weird to surface now. We haven't made any changes to Northstar or Phoenix's authentication implementation lately either.

@DFurnes
Copy link
Contributor Author

DFurnes commented Jul 10, 2017

I just did a fresh build from the latest dev branch, and pulled down a copy of the current staging database and I still can't reproduce on my local. Not sure what else would be different. 😕

@DFurnes
Copy link
Contributor Author

DFurnes commented Jul 10, 2017

Confirmed that null is being returned for those three fields on staging, here's the watchdog from where we catch the exception in dosomething_user_get_field:

screen shot 2017-07-10 at 5 52 05 pm

And just confirming I'm not crazy, the data for user 18 (me) in field_data_field_access_token:

screen shot 2017-07-10 at 5 58 08 pm

Will continue investigating this 👻 tomorrow.

@DFurnes
Copy link
Contributor Author

DFurnes commented Jul 11, 2017

I'm now unable to reproduce this on staging (returning to the borked session above now works fine, and so does logging out/in). Never fear though, it's now happening to me and @chloealee on Thor.

@sbsmith86
Copy link
Contributor

Not sure if this helps or not but I am seeing this issue on Thor now. Except it didn't show when I first logged in on Thor. Overview of what happened to me:

  • Visited thor and was already logged in as an admin
  • logged out to create a new account, was logged in and taken to my new user page.
  • logged back out and logged back in to my admin account to turn on rogue.
  • logged out of my admin account
  • Created another new account successfully and was taken to the user page
  • Tried to visit the "explore campaigns" page and got the northstar error.

@DFurnes
Copy link
Contributor Author

DFurnes commented Jul 11, 2017

Interesting… thanks for the detailed write up @sbsmith86!

@DFurnes
Copy link
Contributor Author

DFurnes commented Jul 11, 2017

And seeing those same field errors now on Thor for me and @chloealee:

screen shot 2017-07-11 at 10 58 51 am

@chloealee
Copy link
Contributor

chloealee commented Jul 11, 2017

I was testing at the same time as @sbsmith86 (sorry I should have waited until you were done!) and flushed cache. Right when I did that, I got the error page and Thor broke.

I'm not sure if this matters either but I flushed cache by going up to the home screen at the top left corner and pushed the button Flush all cache instead of drush cc all

@DFurnes
Copy link
Contributor Author

DFurnes commented Jul 11, 2017

Here's a Drupal.org thread discussing the EntityMetadataWrapperException that we're catching and logging here. Looks like some people had luck updating uuid module... other people suggest disabling the module with the field and re-enabling, but not sure if that'll lose data?

@DFurnes
Copy link
Contributor Author

DFurnes commented Jul 11, 2017

And another Drupal StackExchange question with the same suggestion. For what it's worth, it looks like we're pinned to an alpha version. Let's try updating that?

/cc @mirie for Drupal smarts

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants