This repository was archived by the owner on Jun 13, 2023. It is now read-only.
This repository was archived by the owner on Jun 13, 2023. It is now read-only.
Emitted Events from WebSocket pings not forwarded to Subscription Handler #264
Open
Description
New Issue Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
- I can reproduce the issue with the latest version of Parse Server and the Parse LiveQuery ObjC SDK.
Issue Description
subscription?.handleEvent({ (query: PFQuery<PFObject>, event: Event<PFObject>) in
print("Fired: \(#line)")
})
The Subscription.handleEvent
protocol never gets called but WebSocket pings are received (logged in Client.shouldPrintWebSocketTrace
)
Steps to reproduce
Define the client, and subscribe to a query the standard way:
let query = PFQuery(className: "Test")
query.whereKey("objectId", equalTo: "objectId")
client = ParseLiveQuery.Client(server: serverURL)
client?.shouldPrintWebSocketLog = true
client?.shouldPrintWebSocketTrace = true
subscription = client?.subscribe(query)
subscription?.handleEvent({ (query: PFQuery<PFObject>, event: Event<PFObject>) in
print("Fired: \(#line)")
})
WebSocket trace logs received ping but does not forward to the protocol.
Actual Outcome
Event not forwarded at the ParseLiveQuery layer
Expected Outcome
All emitted events should be accessible by the Subscription's handler
Environment
Parse LiveQuery ObjC SDK
- SDK version:
2.8.1
- Bolts-Swift:
1.5.0
- Parse:
1.19.0
- Bolts-Swift:
- Operating system version:
iOS 16.0
Server
- Parse Server version:
5.4.1
- Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc):
Remote/Local