Parse-SDK-iOS-OSX icon indicating copy to clipboard operation
Parse-SDK-iOS-OSX copied to clipboard

Live Query Not Working Properly

Open onlinedeveloper4u opened this issue 2 years ago • 5 comments

New Issue Checklist

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

  1. Add live query to some classes
  2. Test
  3. 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

onlinedeveloper4u avatar Oct 25 '23 12:10 onlinedeveloper4u

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 avatar Oct 25 '23 12:10 mtrezza

@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.

dplewis avatar Oct 26 '23 05:10 dplewis

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.

suathh avatar Nov 13 '23 14:11 suathh

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.

junya100 avatar Jan 05 '24 04:01 junya100