Project

General

Profile

Bug #4825

Rider side not receiving location updates during trips

Added by Anupama P 11 months ago. Updated 11 months ago.

Status:
QA Passed
Priority:
Normal
Assignee:
Target version:
Start date:
05/13/2025
Due date:
05/13/2025 (about 11 months late)
% Done:

0%

Estimated time:
Milestone:
Sprint 19 Tukxi Ride 2024 May 01 to May 31
Branch name:
sprint-19_sreedevi_4825

Description

Particularly the problem of the rider side not receiving location updates during trips. Upon detailed analysis, We found that the root cause lies in the socket library currently used in our app.

We are using the SocketCluster library (io.github.sac:SocketclusterClientJava), which is outdated and not officially suitable for real-time location updates. Below are some recurring issues associated with this library:

Missing messages without any errors or disconnect indications.
Improper subscription timing or loss of connection state.
Inconsistent acknowledgements when multiple clients are subscribed to the same channel.
Socket not reconnecting properly despite showing as connected.
Failures due to Android clients being in background or Doze mode (affected by battery optimization settings).

While reviewing our implementation, I also found several code-level issues that may be compounding the problem:

Multiple subscriptions to the same channel are made repeatedly with each incoming location update.
Concurrent asynchronous subscriptions to different channels can lead to failure in message listening without triggering socket errors.
Channels are being disconnected right after the trip is accepted, even when some channels are still in a subscribed state.
Reconnection may sometimes fail, and even after reconnection, subscription and onMessage handling do not always work correctly.
Message acknowledgment failures occur occasionally, preventing reliable communication.

Also available in: Atom PDF