Comments (21)
Ok i made a way to log out by copying the log out btn from user settings onto the loading view.
from swiftcord.
So the error is not related to server folders, ill try my best to solve it but its here if anyone is able to help.
from swiftcord.
@bentettmar, these warnings are due to me trying out a performance optimization, and do not impact functionality (you can just ignore them, in my testing). Swiftcord simply ignores server folders, so that shouldn't cause problems. To help me debug this issue, could you send more of the logs?
Also, you might want to try the newly-created native-urlsession-websocket
branch which contains fixes for the warnings, and potentially has performance increases. Reconnection is not implemented yet, so if you disconnect the Gateway will never reconnect until you restart Swiftcord.
from swiftcord.
It's quite puzzling that the socket is closing with code 1000, since discord close codes usually are in the range 400x. I'll need more of the log to debug this, up to and after the close code error. Please also try the new branch, that might be easier to debug
from swiftcord.
It closes after a while of receiving discord's gateway message events.
heres the full log: https://pastebin.com/R8NETuKW
from swiftcord.
I will try out the native-urlsession-websocket
branch
from swiftcord.
It seems to me that the gateway is being terminated because no heartbeats were received within the tolerance. You could try the other branch, which might fix this issue.
from swiftcord.
After updating to the new branch, i get this error being spammed in the console.
<D> [DiscordGateway] Resume called
<E> [DiscordGateway] Connection error: Optional(Error Domain=NSPOSIXErrorDomain Code=57 "Socket is not connected" UserInfo={NSErrorFailingURLStringKey=https://gateway.discord.gg/?v=9&encoding=json, NSErrorFailingURLKey=https://gateway.discord.gg/?v=9&encoding=json})
I did also enable incoming connections but that didnt seem to do anything.
from swiftcord.
Ok, I'm seeing a common trend of issues here: nothing is received by the WebSocket, so it eventually kills the connection.
from swiftcord.
What were the messages before that error gets spammed in the console?
from swiftcord.
I did also enable incoming connections but that didnt seem to do anything.
Was it not already enabled? If it wasn't, I think I see the issue now. But still, please send me the log before the error starts spamming.
from swiftcord.
Heres the full log: https://pastebin.com/XaWTLeHF
It also spams this as well:
from swiftcord.
It seems like the gateway is randomly disconnecting. Do you have a stable internet connection?
from swiftcord.
Yes, my internet is fine and i can connect to Discord's gateway because my bots run fine and i can load the original client.
from swiftcord.
Yeah, the spamming is a side-effect of my incorrect handling of close events. The only conclusion I can get is the websocket disconnects randomly, and without any reason. What you could try to do, is to log the receive closure to get a better idea of the messages coming in
from swiftcord.
Ok ill take a look at it next time i have time. Thanks for the input.
from swiftcord.
Ok, hopefully you can sort out this issue :D. This is a weird case I've never met before, after testing it on numerous accounts and different network conditions.
from swiftcord.
god I wish I knew I how to code, this stuff is awesome I'll pitch in during summer when school is over for sure! love your work
from swiftcord.
Hey, @bentettmar, I completely rewrote the underlying WebSocket wrapper class, which should hopefully increase its reliability. You could try pulling the latest commits from the native-urlsession-websocket
branch and building it again, and seeing if the issue persists.
from swiftcord.
I pulled the native-urlsession-websocket
branch but during build i get this error
error: Build input file cannot be found: '/Macintosh HD/Users/vinkwok/XcodeProjects/Swiftcord/Swiftcord/Utils/LoggerInit.swift' (in target 'Swiftcord' from project 'Swiftcord')
from swiftcord.
Fixed in discord.
from swiftcord.
Related Issues (20)
- [Enhancement]: Ventura-styled Settings
- [Bug]: Opening Settings crashes Swiftcord HOT 1
- [Bug]: Drag and Drop doesn't work HOT 1
- [Enhancement]: Clean cache feature in Settings HOT 4
- [Bug]: Channel list scrollbar too large HOT 1
- [Bug]: in app update doesn't find latest release HOT 3
- [Bug]: Uploads above 8MB not accepted HOT 1
- [Enhancement]: Option to display server name alongside the icon HOT 7
- [Bug] Folder popover opening cancels server mask animation HOT 4
- [Bug]: Settings icons and search bar are cut-off HOT 5
- [Bug]: the <New> red line in DM's pops up when I message. HOT 2
- [Enhancement]: Render Mentions HOT 2
- [Bug]: Stuck logging in HOT 22
- [Enhancement]: missing shift+enter functionality HOT 1
- [Bug]: Stuck after login - Nitro Basic HOT 3
- [Enhancement]: iOS port HOT 2
- [Bug]: Having UI layout overlaps HOT 1
- [Bug]: Won't load HOT 13
- [Bug]: Window caption bar layout broken HOT 5
- [Bug]: Loads infinitely after logging in HOT 27
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swiftcord.