SwiftcordApp/Swiftcord

Stuck on "Loading channels"

Closed this issue · 12 comments

Hello, I love the concept of your app (it's beautiful ❤️) BUT I'm stuck on this screen:
Screenshot 2022-04-30 at 18 57 54

(I'm connected, the "preferences" menu works)
Screenshot 2022-04-30 at 18 58 35

Here are the errors in Xcode :

Screenshot 2022-04-30 at 18 59 35

Screenshot 2022-04-30 at 18 59 26

Thank you in advance for your response

Hi! thanks for trying Swiftcord, every tester counts! From what I can gather from the screenshots, you aren't running the latest version of the source code. This was a bug a few commits back when I was trying out some optimisations. Try pulling the latest commits and building it. Looking forward to hearing how it goes 🙂

Now i'm running the latest version of the source code, and i'm always stuck on this screen (i don't have the same errors...)
Screenshot 2022-05-01 at 14 09 24
Screenshot 2022-05-01 at 14 11 11

Could you run the app for a few minutes, and send me most of the logs thru pastebin? To further debug, you can force the opacity of the LoadingView to be 0 all the time, to see where it's actually getting stuck.

First, congratulations ! What a nice project ! :))) I tried to connect to my account but got the same issue : stuck on "Loading channels".
Here are the logs (the app has run for about 10min) :

Hope it may help you ! :)

Ok, @theolecoutre, what I gather from your logs is that you were initially logged in, then logged out and logged in again. Then, it reconnected and eventually got stuck loading channels. From the logs, I see a request was made to get your DMs, but a response was never received.

What I would recommend is to force it to load an existing guild instead of DMs, since I haven't fully figured out how the official client does that. To do that, ensure you're logged in then quit Swiftcord. Then, run the following command in the terminal: defaults write com.cryptoalgo.swiftcord lastSelectedGuild <guild ID>, replacing with the id of a server that you're in. Here's the guild ID of the Swiftcord Discord: 964741354112577557

Please keep me updated on how this goes! (@CodingForAddicts can also try this out to see if it fixes the problem)

PS: @theolecoutre, your Discord token is present in your pastebin logs. I would not misuse it, but others might. Please redact the token in the future (and delete the current paste)

@cryptoAlgorithm It worked fine, thanks ! Indeed, DM can't be fetched currently.

DM fetching seems very flaky in my (and other's experiences). I'll have to do more research on how the official Discord client actually fetches DMs, which seems different from how bots do it.

I'll mark this issue as closed for now, @CodingForAddicts feel free to reopen it if the current workaround doesn't fix the issue for you.

I just had this issue trying the latest release. I was getting stuck on loading channels. I went to clone the repository and tried running it from Xcode. Still the same issue. It was stuck on Loading Channels for hours. I found this issue in the closed section and tried your tip of forcing the LoadingView opacity to 0. I could see that my DMs were selected and once I selected a different channel, it now loads right away.
Should we put in another measure for skipping past loading if DMs are selected, while DMs have not been implemented yet?

The issue here is Discord doesn't respond to the request to get DMs sometimes. I think the API is only for bots, but it works most of the time for me. It's very weird, and I think I'll remove DMs entirely while I sort this out.

I'm reopening and pinning this issue until I've implemented a temporary fix that doesn't involve a terminal command

This issue has been finally resolved once and for all by commit 882ae76. I'm finally closing this issue and editing the README to reflect this!