-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crashes in NWWebsocket #439
Comments
Hey @theolampert , I'm unfamiliar with the problem but I'd be happy to review and test your changes. Please go ahead open the PR (it might take some time to get released due to the holidays but I'll also send it to the rest of the team to review). Thank you 🙏 |
@aonemd No worries, I'll draft something up in the next week, and we'll also test this ourselves internally. |
We're still testing internally, we found another area in our code that might be responsible and are testing this. I'll open a draft PR if we're able to narrow this down. |
So, we eventually deployed my fork on both apps and aren't seeing the crash anymore, they've been running for about a week, I've also been leaving one client open for long periods and periodically testing and don't seem to have any of the reconnection issues mentioned in other issues. See #442 and let me know your thoughts. |
We're seeing intermittent crashes in production in both our iOS and macOS clients that use this library. The majority of them look something like the following:
It looks as if they happen after a certain period of time. We see them much more frequently on macOS where the client is left open for hours or days. They appear to be originating from the underlying NWWebsocket library.
Is there a reason to manage the websocket connection manually anymore with the introduction of URLSessionWebSocketTask?
I have been experimenting with a fork of the library that switches this out and was able to get the pusher-websocket-swift library passing all its tests with a few changes:
pusher/NWWebSocket@main...theolampert:NWWebSocket:main
https://github.com/theolampert/pusher-websocket-swift/tree/nwwebsocket-fork
Would moving to URLSessionWebSocketTask be of interest to this library? If so I could prepare a draft PR here. The client becomes small enough that it could even be inlined into this package, making contributions easier and I feel like it might avoid a whole host of issues with managing the connection manually.
The text was updated successfully, but these errors were encountered: