Parse-SDK-iOS-OSX
Parse-SDK-iOS-OSX copied to clipboard
Live Query Not Working Properly
New Issue Checklist
- [x] I am not disclosing a vulnerability.
- [x] I am not just asking a question.
- [x] I have searched through existing issues.
- [x] I can reproduce the issue with the latest versions of Parse Server and the Parse ObjC SDK.
Issue Description
Live query Added. Subscription for all parse classes needed to listen for live data updates added. Live query sometimes works and sometime did not.
Steps to reproduce
- Add live query to some classes
- Test
- It will some time work and sometime did not
Actual Outcome
Live query not listening for live query events frequently
Expected Outcome
Expected to listen for all events for all classes
Environment
Client
- Parse ObjC SDK version:
2.7.3
Server
- Parse Server version:
4.5.0 - Operating system:
iOS - Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc):
Remote
Database
- System (MongoDB or Postgres):
MongoDB - Database version:
n/a - Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc):
Remote
Thanks for opening this issue!
- 🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.
This is difficult to analyze further based on the information provided. It may well just be a connection issue in your environment. Not sure if we have integration tests in the SDK, but if we do it would be good if you could demonstrate the issue in a test?
@mtrezza The Live Query Starter Project should be improved with integration tests and a simple chat bot. Live Query documentation is missing from the repo as well.
I can make an addition to that problem. I changed my parse server version from 4.5.0 to 5.2.3 and our live socket connection in iOS become unstable. It effects other requests in SDK too.
Live Query connection lost/reconnection phase is blocking casual SDK requests.
We met the same problem with iOS-OSX SDK(version 2.7.3) and parse server version 5.4.2.
And we can see following log message.
ParseLiveQuery: WebSocket viability changed to viable
It seems the socket connection has established, but any update/create event is not received.
And Android SDK(4.2.1) works properly.