Bug 492295

Summary: Sign-in required after quitting application (accounts not saved)
Product: [Applications] Tokodon Reporter: Chris Coetzee <chriscz93>
Component: generalAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: carl, josh
Priority: NOR    
Version First Reported In: 24.05.2   
Target Milestone: ---   
Platform: Flatpak   
OS: Linux   
Latest Commit: Version Fixed In: 24.12
Sentry Crash Report:

Description Chris Coetzee 2024-08-28 02:59:21 UTC
SUMMARY
Requires me to sign-in to my accounts after closing and reopening Tokodon.

STEPS TO REPRODUCE
1.  Install the flatpak image: 
    flatpak install flathub org.kde.tokodon
2. Open Tokodon: 
   flatpak run org.kde.tokodon
3. Sign in
4. Close application
5. Re-open the application

OBSERVED RESULT
Need to sign into account again after closing the application

EXPECTED RESULT
Stay signed in when reopening the application

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora Linux 36 KDE Plasma (Kernel 6.2.15-100.fc36.x86_64)
KDE Plasma Version: 5.27.4
KDE Frameworks Version:  5.104.0
Qt Version: 5.15.8

POSSIBLY RELATED TICKETS
- https://bugs.kde.org/show_bug.cgi?id=488391
- https://bugs.kde.org/show_bug.cgi?id=491930

ADDITIONAL INFORMATION
=== Logs before clicking Sign In ===
Qt: Session management error: Could not open network socket
kf.config.core: Migrating old staterc "" -> "/home/user/.local/state/tokodonstaterc"
QFile::rename: Empty or null file name
kf.config.core: Failed to migrate "" -> "/home/user/.local/state/tokodonstaterc"
qrc:/qt/qml/org/kde/kirigami/dialogs/Dialog.qml:344:18: QML ScrollView: Binding loop detected for property "calculatedImplicitHeight"
qrc:/qt/qml/org/kde/kirigami/dialogs/Dialog.qml:401:33: QML Binding: Binding loop detected for property "value"
qrc:/qt/qml/org/kde/tokodon/content/ui/LoginFlow/WelcomePage.qml:14:1: QML WelcomePage: Created graphical object was not placed in the graphics scene.
kf.config.core: Migrating old staterc "" -> "/home/user/.local/state/tokodonstaterc"
QFile::rename: Empty or null file name
kf.config.core: Failed to migrate "" -> "/home/user/.local/state/tokodonstaterc"
qrc:/qt/qml/org/kde/tokodon/content/ui/Main.qml:482: TypeError: Cannot read property 'followRequestCount' of null
kf.config.core: Migrating old staterc "" -> "/home/user/.local/state/tokodonstaterc"
QFile::rename: Empty or null file name
kf.config.core: Failed to migrate "" -> "/home/user/.local/state/tokodonstaterc"

=== Logs after clicking Sign in ===
qrc:/qt/qml/org/kde/tokodon/content/ui/LoginFlow/LoginPage.qml:15:1: QML LoginPage: Created graphical object was not placed in the graphics scene.
qrc:/qt/qml/org/kde/tokodon/content/ui/LoginFlow/BrowserAuthorization.qml:17:1: QML BrowserAuthorization: Created graphical object was not placed in the graphics scene.
qrc:/qt/qml/org/kde/tokodon/content/ui/LoginFlow/BaseAuthorization.qml:43: ReferenceError: pageStack is not defined
Comment 1 Chris Coetzee 2024-10-30 03:11:22 UTC
This is still occurring after a recent update of the flatpak.

When I run

```
flatpak run org.kde.tokodon --version
```

I see

```
Qt: Session management error: Could not open network socket
tokodon 24.08.2
```
Comment 2 Joshua Goins 2024-10-30 15:50:58 UTC
Thanks for the update, at least according to your most recent logs it's not related to the share -> state location change in Frameworks so it's probably just Tokodon's fault.
Comment 3 Joshua Goins 2024-12-01 00:20:55 UTC
I believe to have fixed this, and asked one of the Flatpak maintainers to backport a fix. Please re-open if it's not fixed in 24.12, which is not released yet. Otherwise the Tokodon Flatpak will be bumped with the fix.