SwiftcordApp / Swiftcord

A fully native Discord client for macOS built 100% in Swift!
https://swiftcordapp.github.io/Swiftcord/
GNU General Public License v3.0
1.85k stars 84 forks source link

[Bug]: Won't load #176

Closed The-Ducktor closed 10 months ago

The-Ducktor commented 11 months ago

Describe the Bug

Bug Description won't load when opening app after app login Actual Behaviour stuck in loop Expected Behavior go to main screen and finish animation

Reproducing the Bug

  1. Login 2 wait/open app

Version

7.0

Category

Connection

Relevant Log Output

No response

Screenshots

No response

Additional Info

No response

ShikiSuen commented 11 months ago

I met this issue, too.

hayd1n commented 11 months ago
Screenshot 2023-10-10 at 12 34 26 AM

Same here.

thuvasooriya commented 11 months ago
drawing drawing

Same Here :( I was pretty excited to try it but it won't work 😢

khurshid-alam commented 11 months ago

Same here. It seems it is broken on Ventura.

mgidding commented 11 months ago

I am encountering this error both on 0.6.1 and 0.7.0. This is the CLI output for 0.6.1:


2023-10-12T13:36:43+0200 warning RobustWebSocket : error=dataCorrupted(Swift.DecodingError.Context(codingPath: [], debugDescription: "The given data was not valid JSON.", underlyingError: Optional(Error Domain=NSCocoaErrorDomain Code=3840 "Unexpected character '' around line 1, column 1." UserInfo={NSDebugDescription=Unexpected character '' around line 1, column 1., NSJSONSerializationErrorIndex=0}))) [DiscordKitCore] Error decoding message
2023-10-12T13:36:47+0200 warning RobustWebSocket : timeout=4.0 [DiscordKitCore] Connection timed out
2023-10-12T13:36:47+0200 warning RobustWebSocket : [DiscordKitCore] Forcibly closing connection
2023-10-12T13:36:47+0200 info RobustWebSocket : [DiscordKitCore] [RECONNECT] Preemptively attempting reconnection
2023-10-12T13:36:47+0200 info RobustWebSocket : attempt=1 connectIn=3.8000000000000003 [DiscordKitCore] Retrying connection
2023-10-12T13:36:47+0200 warning RobustWebSocket : [DiscordKitCore] Already reconnecting, not reconnecting
2023-10-12T13:36:47+0200 warning RobustWebSocket : [DiscordKitCore] [WS CLOSED] closeCode: 1006
2023-10-12T13:36:47+0200 error RobustWebSocket : [DiscordKitCore] [WS CLOSED] closed with error: no error description
2023-10-12T13:36:47+0200 warning RobustWebSocket : [DiscordKitCore] Already reconnecting, not reconnecting
2023-10-12T13:36:51+0200 info RobustWebSocket : version=9 ws=wss://gateway.discord.gg/?v=9&encoding=json&compress=zlib-stream [DiscordKitCore] [CONNECT]
2023-10-12T13:36:51+0200 info RobustWebSocket : [DiscordKitCore] [CONNECTED]```
nnzo commented 11 months ago

I've never built with xCode before but I've managed to fix the bug causing this.. it's only a temporary fix as I've disabled stream compression and Swiftcord will run a lot slower than usual, but nevertheless it's still a fix.

If you'd like to fix the bug yourself and build it, follow these steps: (otherwise at the bottom of this comment you can find my built version).

  1. Download both Swiftcord and DiscordKit from Github
  2. Open the Swiftcord project in xCode and drag your local DiscordKit into the project navigator
  3. Find DiscordKit > Sources > DiscordKitCore > DiscordKitConfig and modify line 182 from streamCompression: Bool = true to streamCompression: Bool = false
  4. Build for your mac

Let me know if the below binary works! Swiftcord.zip

khurshid-alam commented 11 months ago

@nnzo

Yes!. That seems to work. Logged in now. Thanks.

nnzo commented 11 months ago

@khurshid-alam Another update - a proper fix has been pushed to the DiscordKit repo and a full fix will be on the way shortly according to @cryptoAlgorithm in the Discord.

Make sure to switch over to the proper version instead of mine because it sounds like it'll run a lot faster.

toshmukhamedov commented 11 months ago

+1

image
Duskiee commented 11 months ago

there is currently an updated package on the discord server https://cdn.discordapp.com/attachments/964741354339057689/1162599122365337620/Swiftcord_2.zip?ex=653c85ce&is=652a10ce&hm=3f995664004fdfbb026fd1a7189b9c7a8d5895fd1c584cd063b284c5521ab03b&

Kusanalee commented 10 months ago

Swiftcord 2.zip here's a more permanent copy of that since discord is killing off permanent cdn links soon (i.e. making it temporary which makes it expire after 24 hours)

cryptoAlgorithm commented 10 months ago

Thanks everyone, sorry I had not been able to partake in this discussion as my schedule was quite messed up the past few month. I will be publishing an official release to GitHub soon, containing a fix for this issue. Once again apologies this took so long!

cryptoAlgorithm commented 10 months ago

Hi everyone, https://github.com/SwiftcordApp/Swiftcord/releases/tag/v0.7.1 I've made a release incorporating this patch, as well as some other fixes I had previously worked on. Hope this works, feel free to reopen if there are any related concerns!