Author Message
DincerGUNES
Joined: Jul 10, 2018
Messages: 8
Offline
We have a strange messaging issue related to snapshot of CSDataRetrievalWatcher. This problem started just after updating our devices to iOS12. Interestingly enough we have the problem in some devices such as iPhoneX and iPhone7Plus. However iPhone6s and iPhone8 seems ok. This suggests that issue may be related to how iOS12 works on different hardware.

Description:
When we receive messaging conversations from AMM, at some point we request messages of a conversation to display them to user. We use CSDataRetrievalWatcher and when data is retrieved, delegate notify the completion. We take all retrieved messages from CSDataRetrievalWatcher snapshot and display them to user without making any change to message order. Up to this point everything works fine.

When a user sends and receive new messages, we see that the order of messages is jammed in the snapshot. Latest message is at the bottom of the list even though messages ordered as stack. So latest message should be at the top. As a result we can not trust the message order anymore. This issue is unique to iOS12; earlier versions of operating system haven’t caused this.

The Real Problem:
The obvious solution to this issue seems like sorting messages according to their receive date. However when we try to implement this solution, we see that sometimes date comparison can give unexpected results. Some messages can appear earlier than their actual order. Probably the cause of this case is lack of precision at message received date object. So sorting messages according receive date is not any better than the issue described above.

We want to inform you about this issue which you may not experienced yet since iOS12 was just released. We use Avaya Client SDK for iOS version 3.3.0.0 build 4. We should stress that this issue can be experienced in some device models not in all devices. We can easily reproduce this issue using iPhoneX and iPhone7 Plus.

If you have any advices or suggestions to solve this problem, we would be more than happy to try them. Thanks for your time and effort in advance.

Artem.Tsarev
Joined: Jul 13, 2016
Messages: 48
Offline
Hi DincerGUNES,

Will you be able to enable Client SDK logging and reproduce the issue in order to get us a view on what is happening in your case?

Thanks,
Artem.
Mehodesign
Joined: Aug 18, 2017
Messages: 11
Offline
We provide iOS Client SDK log file for this issue. You will see that messages in data retrieval watcher snapshot are in a mixed order. We also provide screenshot of the result in attachments. We did this test using iPhoneX that runs iOS 12.1.

At the beginning there was messages "1", "2", "3", "4" and "5" in conversation in this order. Then we sent messages "6", "7", "8", "9" and "0" in this order. But order of all messages was not as it should be at the end. You can check message receive times for that. It seems like somehow data retrieval watcher could not maintain order of messages in iOS12. We do not observe this issue in iOS11.

I hope log file helps to find the reason of this problem. Thanks for your time and effort.
  • [Thumb - IMG_2076.png]
[Disk] Download
Filename Messaging_Snapshot_Mixed_Order_Logs.rtf [Disk] Download
Artem.Tsarev
Joined: Jul 13, 2016
Messages: 48
Offline
Hi all,

Can you please specify how your custom client implements data retrieval watcher callbacks?
We are going to simulate the same flow and see what might be wrong.

Thanks,
Artem.
Mehodesign
Joined: Aug 18, 2017
Messages: 11
Offline
You can find dataRetrievalWatcher implementation in attachment file. Implementation does not manage snapshot of dataRetrievalWatcher so identifying the reason of message order change is quite difficult. Thanks for your support.
Filename DataRetreivalWatcherImplementation.rtf [Disk] Download
Vladimir.V
Joined: Nov 15, 2018
Messages: 5
Offline
DincerGUNES wrote:
...
We use Avaya Client SDK for iOS version 3.3.0.0 build 4.
...

Hello !
Is there a specific reason to use the old version?
Mehodesign
Joined: Aug 18, 2017
Messages: 11
Offline
We tested this behavior using CSDK 4.1 on iOS 12.1 installed iPhoneX device. Result is exactly the same with CSDK 3.3. We want to stress that this issue is not a general issue. We experience this issue using some iOS12 devices but not all. All iOS10 and iOS11 devices work well. But when we upgrade to iOS12 in iPhoneX and iPhone7 devices we have this problem.
Vladimir.V
Joined: Nov 15, 2018
Messages: 5
Offline
Mehodesign wrote:We tested this behavior using CSDK 4.1 on iOS 12.1 installed iPhoneX device. Result is exactly the same with CSDK 3.3. We want to stress that this issue is not a general issue. We experience this issue using some iOS12 devices but not all. All iOS10 and iOS11 devices work well. But when we upgrade to iOS12 in iPhoneX and iPhone7 devices we have this problem.

Thank you for information.

I needed to clarify because I can't see any problem in the attached log and the log looks incomplete.

Will you be able to help us to reproduce the issue with special debug CSDK which will provided for you ?
Mehodesign
Joined: Aug 18, 2017
Messages: 11
Offline
Sure we can. We can provide logs for both problematic phone and fine phone cases to be able to compare differences.
Vladimir.V
Joined: Nov 15, 2018
Messages: 5
Offline
Mehodesign wrote:Sure we can. We can provide logs for both problematic phone and fine phone cases to be able to compare differences.

Thank you ! Try this build please.

This build based on 4.1 release.
Filename CommunicationPackage_iOS.zip [Disk] Download
Mehodesign
Joined: Aug 18, 2017
Messages: 11
Offline
We imported the given library and tested the issue. You can find a link to a video file below and a log file in the attachments. Application logs are recorded while video is recorded. So we believe we can make the problem clearer in this way. When we check the application logs, actually everything seems ok. So we concluded that probable reason of this issue is related to time precision of message objects. CSMessage received time does not have milliseconds time precision. But in the CSDK message report table, we can see that messages have milliseconds. You can see this in the other attachment file named Log Comparisons. When multiple messages is received in a second, there is uncertainty about order of those messages.
Video record of the test:https://drive.google.com/file/d/1xmmao-ZQlkgjWJAtq8XEzYoyVGxFEoRJ/view?usp=sharing
Filename ApplicationLogs.rtf [Disk] Download
Filename LogComparisons.rtf [Disk] Download
Vladimir.V
Joined: Nov 15, 2018
Messages: 5
Offline
Mehodesign wrote:We imported the given library and tested the issue...

Thank you very much! I have made a fix.
Could you please check the issue ?
Filename CommunicationPackage_iOS.zip [Disk] Download
Mehodesign
Joined: Aug 18, 2017
Messages: 11
Offline
We tested it and it works great. Using the final SDK, we can sort all messages and it works as it should regardless of device or iOS version. Thank you for the help and fast responses. We can confirm that improving the precision of message receive date object solved the problem on our side. Will CSDK 4.2 have this update?
Vladimir.V
Joined: Nov 15, 2018
Messages: 5
Offline
Mehodesign wrote:We tested it and it works great. Using the final SDK, we can sort all messages and it works as it should regardless of device or iOS version. Thank you for the help and fast responses. We can confirm that improving the precision of message receive date object solved the problem on our side. Will CSDK 4.2 have this update?

Thank you for your attention and help.
The fix will be included to the next release CSDK 4.2 but I don't have information about the older versions yet.
And I need to stress that the build wich was provided it's not a stable build. It should not be used in production.
Go to:   
Mobile view