jerboa
jerboa copied to clipboard
Automatically sign out non supported accounts
if u were logged in with a account from 0.17.X. And updated to 0.35 you could see the feed and open posts. Now in 0.37 It causes a crash as it doesn't default anymore. Which is inline with the current vision as it is not supported. So we need to sign out non supported accounts on startup. And possible give a reason for signing them out in the form of a dialog/toast/snackbar.
I believe this is the root cause for the many crashes and not the missing sort types.
See #920 see #911
I'm wondering if signing out might be excessive. Perhaps simply not sending the authentication information when an unsupported server version is detected would suffice. This way, once the server is updated, the account will be signed in again.
Doing your way would require huge changes to the codebase. Currently all checks that require auth just check if there is account. Which would have to change. And we would have to make sure the user knows that the account that is currently selected is outdated and thus can't do any auth actions. So essentially they would be just a anon user. Might aswell make them actual anon user. And this would tie in with another issue i am thinking of might be the cause of these "I am logged in but none of the actions work" And i think this is because the jwt has expired. To solve that i would have to detect if the jwt is expired on all auth calls response. And then ill sign them out automatically and ask them to login again.
In understand where you are coming from. Its just really unfortunate when an app takes permanent action (logging you out) when the problem is transient (unsupported server version).
But yeah, if its not feasible to solve it like that, and if support for outdated servers is equally hard then I guess logging out is the way forward.
Support for outdated servers is not hard for 0.17.X. But a proper one is. Like described in here https://github.com/dessalines/jerboa/pull/908#discussion_r1246175005 . Dessalines doesn't want the current "hack" that would allow backwards compatibility.
This would probably be a good idea. Later on if we support more versions, then any one that's not supported, we could sign out of.
I'm really not a fan of the idea of forcefully signing people out of their accounts. Frankly it also feels overly aggressive and unnecessary, since there's probably an easier fix for the crashing problem than to sign people out.
The error that occurs seems to be minor, I know this because I patched the app to ignore crashes and inhibit self exiting in AppCloner and it didn't freeze, even though it sent crash notifications. This indicates that it isn't a major problem because if it was the app would freeze.
I can already hear the excuse from the Lemmy/Jerboa developers about how the server software is outdated and we need to go pester instance operators to update their software, honestly Jerboa is the only app I've used which has had this issue, at least noticably. So if I'm going to blame anything I'm not going to blame instance operators for outdated software I'm going to blame Jerboa for not being able to handle it in an acceptable way and instead either crashing/exiting or forcefully logging me out of my accounts.
I think I saw this fixed in the code.
Not really, atm i'm not fully sure what happens when you swap or start the app with a account that is on a version that is no longer supported. I believe it will try to use a version of the fallback default lemmyapi.
Maybe we should at least pop up toast warning like, 'Lemmy version not supported, things may not work as expected'
That would work.