According to TransportSDK(v2.7.0) doc, the SDK will try to reconnect until it reaches the reconnectionTimeoutInSeconds:
However, for iOS SDK, it turned to Error state(com.genesys.cloud.messenger.transport.core.ErrorCode.NetworkDisabled) within 1 minute though reconnectionTimeoutInSeconds was set to 300 seconds.
This is the relevant log:
2024-07-31 15:55:02.611112+0800 CCaaS-Demo[89456:28950252] 🟢 Info: (MMSDKTransport State Machine) State changed from: Configured, to: Reconnecting
2024-07-31 15:55:02.611670+0800 CCaaS-Demo[89456:28950252] 🟢 Info: (MMSDKTransportReconnectionHandler) Trying to reconnect. Attempt number: 0 out of 10
2024-07-31 15:55:02.611690+0800 CCaaS-Demo[89456:28950252] 🟢 Info: (MMSDKTransportMessagingClient) connectAuthenticatedSession
2024-07-31 15:55:02.617456+0800 CCaaS-Demo[89456:28950252] 🟢 Info: (MMSDKTransportWebSocket) deactivateWithCloseCode(code = 1001, reason = Closing due to error code -1009)
2024-07-31 15:55:02.617476+0800 CCaaS-Demo[89456:28950252] 🟢 Info: (MMSDKTransportWebSocket) deactivate()
2024-07-31 15:55:02.617530+0800 CCaaS-Demo[89456:28950252] 🔴 Error: (MMSDKTransportWebSocket) onFailure(message: [-1009] The Internet connection appears to be offline.)
2024-07-31 15:55:02.619943+0800 CCaaS-Demo[89456:28950252] 🟢 Info: (MMSDKTransport State Machine) State changed from: Reconnecting, to: Error
Could you help check why the same Kotlin code works differently on iOS and Android, please? If this issue should be fixed in TransportSDK, please share the release plan, thanks.
Which Xcode version do you use?
Version 15.0 (15A240d)
On which Device model and OS version do you experience this?
iPhone 12, iOS 15.4.1
Please, describe the Steps to reproduce the issue.
1.Connect to a conversation to make TransportSDK be Configured state;
2.Turn on Airplane mode on iPhone, and keep observing the console until the previously attached logs appear;
Is this only occuring on iOS?
Yes, we did not find such issues on Android. SDK can reconnect up to 60 times on Android within 5 mins.
The team is now investigating the possibilities to refactor the socket handling.
In general, the iOS and Android platforms are handling the socket connections/disconnections differently.
Hi David,
Thanks for the info.
Besides socket connections/disconnections, could you help confirm if any other TransportSDK features implemented differently on iOS and Android, please?