RolePlayGateway / roleplaygateway

source code for roleplaygateway.com
GNU General Public License v3.0
8 stars 8 forks source link

Users spontaneously being logged out #192

Closed lostamongtrees closed 4 years ago

lostamongtrees commented 4 years ago

Bug initially reported in the chat by Wolf's Bane109

everytime I try to submit a post I keep getting logged out. Anyone know why that is? It's a glitch with tagging characters. i was able to submit it fine without tagging characters. that's just annoying for people that make long posts and don't copy their posts. Thankfully I did.

going to attempt to replicate

Current Possibilities:

Other information:

lostamongtrees commented 4 years ago

i was unable to replicate the issue

lostamongtrees commented 4 years ago

Might have something to do with #195

Lady-Awinita commented 4 years ago

Random logouts still occur for me when doing the following

End result however redirects on login to the main forums page instead of the page visited forcing me to go back to said page instead of logging back in and refreshing back to where I was

EDIT: Tagging characters in posts now works, albiet the site is slow on the loading the page {it does get to the "You have Replied to this roleplay" page just fine but once past that it takes a few secnds longer than it should to load the newest post in the place {logout does not occur}}

shentino commented 4 years ago

Same happening here

martindale commented 4 years ago

Same happening here

What is "same"? What specific action caused your most recent logout, and can you replicate the issue? Please see instructions for helping in this thread on the forum...

martindale commented 4 years ago

@shentino do you mind checking in on the case reported in #218?

Lady-Awinita commented 4 years ago

For me my exact actions was the following path.

This has begun to become a nightly thing every 24 hours or so for me around the time between 7-10PM eastern american time

martindale commented 4 years ago

Awi, does the logout happen every time you do this most recent step, or only during those specific times? If you can duplicate it reliably outside of those hours, we can save a lot of time.

Alternatively, help us out with a screenshot of the "Cookies" section in your browser inspector's "Resources" tab via the beta channel on RPG Chat. Thanks!

P.S., it's usually CTRL+SHIFT+I to launch the inspector, but only do so whilst first logged in on RPG's front page. You can DuckDuckGo "viewing site cookies" + your browser name for more detailed instructions.

On Wed, Jan 15, 2020, 9:45 PM Lady Awinita notifications@github.com wrote:

For me my exact actions was the following path.

  • Character Management --> Drop down menu link COMMUNITY -resulted in getting logged out enroute to the main forums page for Community.

This has begun to become a nightly thing every 24 hours or so for me around the time between 7-10PM eastern american time

β€” You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/RolePlayGateway/roleplaygateway/issues/192?email_source=notifications&email_token=AAA7VYPP5VPEGVOZE3YBNTDQ57C3BA5CNFSM4JQXPFSKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJCSCHQ#issuecomment-574955806, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA7VYNED7GQXQJPVMAPIBTQ57C3BANCNFSM4JQXPFSA .

Lady-Awinita commented 4 years ago

Tried that and got lost because its not the same as it used to be. I cant make head or tail of what I am supposed to look for however Chrome is throwing a warning that a cookie was blocked. Apparently the cookies now require SameSite to be enabled

Lady-Awinita commented 4 years ago

Awi, does the logout happen every time you do this most recent step, or only during those specific times? If you can duplicate it reliably outside of those hours, we can save a lot of time.

It seems to happen mostly between those times stated, but next time it happens I will post here letting you know

Lady-Awinita commented 4 years ago

Current report; it has been 48 hours since my last logout. this was the steps taken for the logout to occur

Lady-Awinita commented 4 years ago

Just got logged out when reloading a page, and instead of reloading the place page I was at, it redirects to the main forums when it SHOULD just reload the place page I was at

Lady-Awinita commented 4 years ago

And now I am logged ourt when trying to post.

Lady-Awinita commented 4 years ago

Because I was asked list my currently active extensions I shall do so here

lostamongtrees commented 4 years ago

I've noticed that in the explorer, 401 's pop up very consistently. i suspect the log out bug has something to do with the cache cache-control no-cache, no-store, must-revalidate

401 Happening every 7-9 rows in the inspector (sprinkled between 304 and 200 with every now and again a 502 showing up

lostamongtrees commented 4 years ago

I think it has something to do with bandwidth?

I noticed a few things

also

I was trying to load https://www.roleplaygateway.com/universes/the-multiverse/map

at the same time as https://www.roleplaygateway.com/ Which loaded fine. I logged in, and went straight to characters , clicked play and was instantly whitescreened. https://www.roleplaygateway.com/explorer/?characterID=262372&roleplayID=1

Checking with another tab, I had been logged out. Coincidentally, /maps decided to load in the moments between me loading the characters page and me clicking play.

cache acting funky?

shentino commented 4 years ago

Why is the cache even affecting things in the first place?

Shouldn't session information be stored in a cookie or in an sid parameter?

shentino commented 4 years ago

As a design principle, anything variant shouldn't be cacheable. The only things that should be cached are static assets like avatars, media, maps, and the like. Text content, and especially login credentials, should not be cached.

lostamongtrees commented 4 years ago

Had an experiment, on if logging in was impacted by increased activity in another tab

and then

Lady-Awinita commented 4 years ago

CURRENTLY EXP{ERIMENTING but so far things are working, I havent been logged out in 6 days now since disabling Dark Reader

HOWEVER

I am not the only one who was having this logout issue constantly, Ritnio cant do anything on the site, page to page, vidst his control panel, anything, without getting logged out. He is constantly logging back in. he reported no extensions active

lostamongtrees commented 4 years ago

Barney_Fife noticed that it is nearly impossible to stay logged in via mobile

@Lady-Awinita is Ritnio a mobile user?

lostamongtrees commented 4 years ago

i notice i dont get logged out when using my mobile hotspot nearly as much as when connected to different wifis.

LawOfTheLand commented 4 years ago

Workaround as reported by Ritnio:

If you're getting logged out while trying to post forum style, do this:

Post If asked to log in, do so Hit back twice Select character tags, then post

This not only lets the post go through, but avoids mandating Tag All.

Lady-Awinita commented 4 years ago

Workaround as reported by Ritnio:

If you're getting logged out while trying to post forum style, do this:

Post If asked to log in, do so Hit back twice Select character tags, then post

This not only lets the post go through, but avoids mandating Tag All.

What about characters not PHYSICALLY in that location ? typing in their name when making the post will the post go through without getting logged out ?

EDIT: This is one of the reasons why I ghyavent posted in so long also burnout is affecting me at this moment too

lostamongtrees commented 4 years ago

Was logged out on tab while submitting a private message in another tab. Replicated the issue

Kura-Ravengade commented 4 years ago

Does anyone know when this will be fixed??

martindale commented 4 years ago

Rough times tracking this down, having spent many hours trying to isolate replicable cases β€” it seems almost entirely random, and since the code to manage user sessions hasn't been touched in more than a decade, I'm leaning towards this being a more complicated database issue (sessions corrupted due to FPM aborting requests? Session table exceeding quota?) rather than a specific bug in the code.

We're still working on it, but without any way to replicate it on demand, it's like finding a needle in a haystack.

partially-stars commented 4 years ago

Just wanted to update- a lot of users are still reporting issues with being logged out. Tagging characters still seems to be an issue, after writing posts and tagging characters I have to make sure I’m logged in from a different tab because the vast, vast majority of times I will have been logged out. Other users have reported having to log in multiple times for the log in to stick, and being logged out just when moving between sites. The issues raised above still seem to apply, i.e. they’re not as bad on mobile and iPad, and having multiple tabs open seems to worsen the issue.

martindale commented 4 years ago

Thanks for reporting this, @partially-stars! We're focusing in on character tagging and posting from the main site (as opposed to the Explorer). No clear leads as of yet, but I'll report back as soon as I have something!

martindale commented 4 years ago

As reported on tonight's call, I've made another internal change w.r.t. "debug" being enabled on various pages; this may or may not resolve the issue, but I've got my fingers crossed that my hunch was correct. Please report back if the issue has resolved itself (i.e., actions which previously reliably logged you out no longer do so) or if it happens to you again!

martindale commented 4 years ago

Thanks to @partially-stars in RPG Chat, it looks like we've fixed the issue for at least one person:

Yep, managed to tag and post in one of my RPs without being logged out!

If we can get a few confirmations from the others who were experiencing this issue that it is indeed fixed, I'll close this issue and throw a little party. πŸŽ‰

For those of you who were able to reliably reproduce the logout issue, if you could please test it now and let us know that'd be πŸ”₯ β€” thanks to everyone who helped us get to this point! πŸ™‡πŸ™‡πŸ™‡

martindale commented 4 years ago

We've got confirmations from multiple people that actions which would previously log them out are no longer doing so. Thanks to everyone who helped troubleshoot this! Closing and organizing a party.

lostamongtrees commented 4 years ago

YAAAAAAAAAAAS