Bug 491252 - neochat stuck loading active connection on welcome screen
Summary: neochat stuck loading active connection on welcome screen
Status: RESOLVED UPSTREAM
Alias: None
Product: NeoChat
Classification: Applications
Component: General (show other bugs)
Version: 24.05.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Tobias Fella
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-04 10:22 UTC by daan.j.demeyer@gmail.com
Modified: 2024-12-02 21:32 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
screenshot showing the issue (26.32 KB, image/png)
2024-08-04 10:22 UTC, daan.j.demeyer@gmail.com
Details

Note You need to log in before you can comment on or make changes to this bug.
Description daan.j.demeyer@gmail.com 2024-08-04 10:22:12 UTC
Created attachment 172267 [details]
screenshot showing the issue

SUMMARY

After logging in, quitting NeoChat and restarting it, NeoChat remains stuck at the welcome screen trying to load the active connection.

STEPS TO REPRODUCE
1. Log in to Matrix account with NeoChat
2. Quit NeoChat
3. Restart NeoChat

OBSERVED RESULT

After logging in, quitting NeoChat and restarting it, NeoChat remains stuck at the welcome screen trying to load the active connection.

EXPECTED RESULT

NeoChat loads the active connection.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora 40
KDE Plasma Version: 6.1.3
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.2

ADDITIONAL INFORMATION
Comment 1 Tobias Fella 2024-08-04 14:10:44 UTC
Something weird seems to be going on here. Apparently, neochat has stored your matrix id as "@daandemeyer" (notably without a server), which would explain why it can't reach the server. I have no idea how it would get to this state, though...

Can you check ~/.config/KDE/neochat.conf whether your user id is also stored wrong there? also, if you delete your account from that file and log in again, does the same problem appear again?
Comment 2 daan.j.demeyer@gmail.com 2024-08-05 06:00:55 UTC
These are the contents of neochat.conf:

```
➜  systemd git:(main) cat ~/.config/KDE/neochat.conf 
[Accounts]
%40daandemeyer\%3Amatrix.org\device_id=RZDBUZRLJD
%40daandemeyer\%3Amatrix.org\device_name=NeoChat daandemeyer-fedora-PC1EV17T fedora 40 x86_64
%40daandemeyer\%3Amatrix.org\homeserver=https://matrix-client.matrix.org
%40daandemeyer\%3Amatrix.org\keep_logged_in=true
```

I've deleted that file, logged in again and I have the same issue.
Comment 3 Neal Gompa 2024-09-24 11:37:16 UTC
(In reply to Tobias Fella from comment #1)
> Something weird seems to be going on here. Apparently, neochat has stored
> your matrix id as "@daandemeyer" (notably without a server), which would
> explain why it can't reach the server. I have no idea how it would get to
> this state, though...
> 
> Can you check ~/.config/KDE/neochat.conf whether your user id is also stored
> wrong there? also, if you delete your account from that file and log in
> again, does the same problem appear again?

Could this have something to do with the fact his MXID is actually "@daandemeyer/:matrix.org" (note the forward slash!)?
Comment 4 daan.j.demeyer@gmail.com 2024-09-24 11:37:43 UTC
This is still an issue on 24.08.0 on Fedora 40
Comment 5 Tobias Fella 2024-09-24 11:40:05 UTC
(In reply to Neal Gompa from comment #3)
> (In reply to Tobias Fella from comment #1)
> > Something weird seems to be going on here. Apparently, neochat has stored
> > your matrix id as "@daandemeyer" (notably without a server), which would
> > explain why it can't reach the server. I have no idea how it would get to
> > this state, though...
> > 
> > Can you check ~/.config/KDE/neochat.conf whether your user id is also stored
> > wrong there? also, if you delete your account from that file and log in
> > again, does the same problem appear again?
> 
> Could this have something to do with the fact his MXID is actually
> "@daandemeyer/:matrix.org" (note the forward slash!)?

that's quite possible, thanks for pointing it out. I'll need to check the code since I'm not sure how the / would break it, but it seems plausible.
Comment 6 Josh 2024-11-18 20:36:15 UTC
Hi, I have the same issue on the Neochat snap version 24.08.2. 

I can add an account to a fresh install of Neochat but if I relaunch Neochat it stays on the 'Welcome to NeoChat' page with 'Loading' next to my username.  

This is my redacted neochat.conf:

[Accounts]
%40MyUserName%3Amatrix.org\device_id=DeviceIdRemoved
%40MyUserName%3Amatrix.org\device_name=NeoChat MyHostname ubuntu-core 22 x86_64
%40MyUserName%3Amatrix.org\homeserver=https://matrix-client.matrix.org
%40MyUserName%3Amatrix.org\keep_logged_in=true

I'm running Kubuntu 23.10.
Comment 7 Tobias Fella 2024-12-02 21:01:01 UTC
Just got around to testing this - yep, the problem is the forward slash in the user id
Comment 8 Josh 2024-12-02 21:10:22 UTC
My neochat.conf doesn't have forward slashes but I'm stuck at 'loading':

[Accounts]
%40MyUserName%3Amatrix.org\device_id=DeviceIdRemoved
%40MyUserName%3Amatrix.org\device_name=NeoChat MyHostname ubuntu-core 22 x86_64
%40MyUserName%3Amatrix.org\homeserver=https://matrix-client.matrix.org
%40MyUserName%3Amatrix.org\keep_logged_in=true

This looks like my username is @MyUserName:matrix.org.
Comment 9 Tobias Fella 2024-12-02 21:32:48 UTC
This boils down to a problem in how libquotient stores logged-in accounts. I have created an issue at https://github.com/quotient-im/libQuotient/issues/842 and will follow up with the other maintainers there. I'm thus closing this ticket as RESOLVED UPSTREAM