While testing the SDK, I've noticed that sometimes showing the survey through a call to sendEvent function will fail and continue failing on that device from then on. I could not find any way to reproduce this reliably or identify a specific pattern, but here are some observations:
the 'failing call' is not a failed network call- the response is a 200 but there's no survey in the response body,
if it fails to show the survey in the first attempt, it will continue failing on the device until I clear the app caches, sometimes more than once (maybe it eventually 'fixes' itself but I have not seen this happen yet),
the requests sent from the failing and succeeding devices seem identical, except for the Authorization header value (all requesting the same survey),
once the 'show survey call' succeeds, it will continue working fine on that device,
setting the useEncryptedSharedPreferences param to false did not make any difference.
Some thoughts based on that:
currently, I have had better luck setting up a timeout and calling Iterate.reset() after X seconds if there's no survey shown- at least the device doesn't stay stuck in this failing state (sometimes it takes one reset, sometimes 2 or 3),
perhaps this has to do with invalid user token received/cached in the prefs?
Most of the testing was done on emulators with APIs 32+ and I am testing the 1.3.0 version of the SDK.
Sorry if the steps to repro are not specific enough, but so far I could not narrow it down further than this.
While testing the SDK, I've noticed that sometimes showing the survey through a call to
sendEvent
function will fail and continue failing on that device from then on. I could not find any way to reproduce this reliably or identify a specific pattern, but here are some observations:Authorization
header value (all requesting the same survey),useEncryptedSharedPreferences
param tofalse
did not make any difference.Some thoughts based on that:
Iterate.reset()
after X seconds if there's no survey shown- at least the device doesn't stay stuck in this failing state (sometimes it takes one reset, sometimes 2 or 3),Most of the testing was done on emulators with APIs 32+ and I am testing the 1.3.0 version of the SDK.
Sorry if the steps to repro are not specific enough, but so far I could not narrow it down further than this.