Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI state changes when going back to free edition and doesn't get changed back when logging back in #8095

Open
skymen opened this issue Jun 30, 2024 · 7 comments

Comments

@skymen
Copy link

skymen commented Jun 30, 2024

Problem description

If I have a UI layout with paid features in it (like the Z order bar), logging out removes them from my layout, but logging back in doesn't add them back

Attach a .c3p

n/a

Steps to reproduce

  1. Add z order bar
  2. log out
  3. log back in

Observed result

z order bar doesn't get added again

Expected result

the layout should be back to what I have it set up to

More details

This is painful because account disconnects happen all the time in C3 when opening different versions and so it makes it very painful to setup custom UI layouts because if I use any of the bars that are hidden by default, they will get randomly reset whenever C3 decides I'm not logged in anymore.

Affected browsers/platforms:

First affected release:

System details

View details

PASTE HERE

@Kashin-Ginn
Copy link

+1

@F3der1co
Copy link

F3der1co commented Jul 1, 2024

hot take: to fix this you could just remove the ui restrictions from the free versions, I don't really think they are relevant as they wouldn't allow you to suddenly make games in the free version, but instead would be a selling point as the person trying might really like and need that feature in case they go for the subscription.

@AshleyScirra
Copy link
Member

AshleyScirra commented Jul 2, 2024

Why are you getting logged out? Switching versions of Construct should not cause your login to be forgotten. It's all on the same origin so if your login is remembered for one version, it should be remembered for all versions. This works for me - I can switch between r388.2 and r397 for example, and it remembers my login whichever one I'm on.

I'm not sure this will be feasible to fix - if you have the Z order bar docked somewhere, log out, rearrange the panes, and then log in, I don't think it's reasonable for the editor to know how to put the Z order back, unless it completely changes your UI, which I don't think it should do either. Meanwhile the Z order bar being a subscription-only feature means it is not displayed to free edition users, unless we completely overhaul the way the free edition restrictions work, which I don't think is feasible to do in response to a relatively minor issue like this, as such overhauls usually just end up running in to some other issue. So the easiest approach is to make sure you stay logged in.

@F3der1co
Copy link

F3der1co commented Jul 2, 2024

I often accidentally log myself out as I use c3 both on my desktop PC and Laptop.
There is also the 7 day log-out which might be an issue for people not using c3 super regularly.

@skymen
Copy link
Author

skymen commented Jul 2, 2024

Why are you getting logged out?

This has always been an issue, switching from beta to stable will almost always log me out in the process, and logging into the other branch updates which branch I'm logged into, I've just gotten used to it at this point, but I've had the issue for the past 3 or 4 years, and I remember the issue being reported multiple times in the past including by me.

IIRC, back in the days the bug would happen when switching from any version to any other version, but nowadays it only happens when changing from beta branch to stable branch or vice-versa.

Here's a video, it happens almost every single time:

chrome_PuyqCkypkN.mp4

if you have the Z order bar docked somewhere, log out, rearrange the panes, and then log in, I don't think it's reasonable for the editor to know how to put the Z order back

I agree with the reasoning and I'm not asking for the Z order bar to get added back in case I make changes to the editor layout while in free version. Just in case I don't change it at all and all I do is log out and log back in. Here is a video showing the problem:

chrome_jf2iRoFKUh.mp4

Since I work on stable when possible, this mostly means that just checking out the new weekly beta update would affect my UI. I've experimented with new UI layouts, but I've always given up in the end in big part due to this bug. However, this is now very important since I really really want the new Instance bar to always be open, but I can't if it's gonna disappear at least once a week.

EDIT:

More info about the branch switching log in state.

I think, the two branches hold log in info separately, because when I log out of a branch and log into another branch, I'm still logged out of the first branch. Now in theory what this would mean is that I should just stay logged in on both branch and I'll be fine, however I'm pretty sure there is a timeout and it feels like the timeout is pretty short, because after a few days (or maybe even a few hours? I can't really tell), the last branch I logged into will stay logged in, but the other one logs out, and so when I go back to it, it'll ask me to log back in, even though I'm logged in on the other branch.

Anyway, I don't know exactly why this happens and how the issue works, but it's been happening very consistently for years, and I know it happens to other people who also switch back and forth between beta and stable a lot.

@skymen
Copy link
Author

skymen commented Jul 3, 2024

Dug some more, and yeah it's normal that it's holding login info separately, because it is.

Main branch logs in through https://account.construct.net and beta branch logs in through https://accountbeta.construct.net, and so the keyvaluepair for each domain is not shared

It's all on the same origin so if your login is remembered for one version, it should be remembered for all versions.

Maybe your account goes through a different thing, but on my end it's not shared.

Reading through the auto login code, since the storage is not shared, the only thing that can trigger the autologin to fail on a branch but not the other is for the server to reject the token on one of them.

A few guesses:

  • 7 day refresh clause, the token wasn't used in a week and the server decides the login isn't valid anymore. However, I have no idea how that could happen to me since I use Construct very often on both branches and this bug happens to me very often.

  • Since auto login refreshes the token, maybe the server keeps track of a list of valid tokens per account, and discards the oldest one after an arbitrary limit. Say I login on C3 enough times on a given branch, maybe the next time I switch to the other branch, its token that hasn't been updated is no longer valid because it has been popped off the list. If an arbitrary value does exist, it might be pretty high, but since I refresh C3 very often, and every refresh counts as a new login, even if the limit is something like 100 tokens, all it takes is for me to work on an addon for a day or two and I'm pretty sure I can refresh C3 about 100 times.

Anyway, I've set a debugger on the piece of code that fails auto login, hoping I'll get some more info in the future. If I manage to reproduce this and have a server error message, I'll send it over as well

@XHXIAIEIN
Copy link

XHXIAIEIN commented Aug 16, 2024

same, stay logged in never works for me, every time I open C3 it is not logged in, Maybe it stays logged in for 1-2 hours? I didn't pay close attention, but I remember more often it wasn't logged in, over the course of a day. I'm pretty sure I don't have any settings to auto clean the cache. which is very strange.

image

I seem to have gotten used to this sort of thing because I have my passwords auto-saved and it just takes a few extra seconds for me to click login.

If, as skymen said, switching between different versions will cause the login status to be lost, then yes, I frequently switch between the official version and the beta version, and between the English version and the Chinese version every day.

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

No branches or pull requests

5 participants