Skip to content
This repository was archived by the owner on Jun 13, 2023. It is now read-only.

LiveQuery doesn't repsond to networking changes #248

Closed
JoeSzymanski opened this issue Apr 28, 2021 · 5 comments · Fixed by #250
Closed

LiveQuery doesn't repsond to networking changes #248

JoeSzymanski opened this issue Apr 28, 2021 · 5 comments · Fixed by #250

Comments

@JoeSzymanski
Copy link
Contributor

With the change to the newest version of Starscream, LiveQuery doesn't appear to have any logic to detect, handle, or pass to integrators information about network status changes.

At least on iOS 13+, this appears to result in the fact that, if the network status changes at all (temporary network drop, losing WiFi and switching to cellular, etc), LiveQuery will lose its connection entirely and be unable to recieve any messages.

I'm in the process of confirming if this issue also impacts iOS 12 or iOS 11 or less (since there are multiple engines that are used by Starscream now).

I'm not sure if the LiveQuery client should be handling these event types directly, or if they should be raising them up a layer to allow the applicatoin to handle the events.

@JoeSzymanski
Copy link
Contributor Author

In some quick testing, this appears to be related to changes in Starscream, where the newer version of Starscream doesn't report a lost network connection as a disconnection event anymore, but rather uses the viability callback (at least in some cases).

@JoeSzymanski
Copy link
Contributor Author

Another option here would be to force WebSocket to use the legacy engine implementation:

let socket = WebSocket(request: request, engine: WSEngine(transport: FoundationTransport(), certPinner: FoundationSecurity(), compressionHandler: nil))

@JoeSzymanski
Copy link
Contributor Author

This is still blocking us from updating ParseLiveQuery, which also means we are blocked from updating Starscream. Is there anyone that might be able to look into this issue?

@rostopira
Copy link
Contributor

Are there any workarounds available? Or is there are old version which is reliable?

@JoeSzymanski
Copy link
Contributor Author

If you do not need functionality like proxy support, we have continued to use the previous versions of Parse Live Query (2.7.3) and Parse (1.19.0) without any major issues.

@cbaker6 cbaker6 linked a pull request Sep 21, 2021 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants