iterable-android-sdk
iterable-android-sdk copied to clipboard
Rising crash rates in latest versions
Hi,
We've had the Iterable SDK for a few months implemented into our app, without any issues, but since a couple of weeks ago (3.3.6 - 3.3.8 but we're not sure...) we've seen a higher crash / ANR rate with this library.
This is a stack trace that we're getting:
main (native): tid=1 systid=13388
#00 pc 0x70b04 libc.so (__ioctl + 12)
#01 pc 0x3f04f libc.so (ioctl + 26)
#02 pc 0x28527 libsqlite.so (unixFileControl + 578)
#03 pc 0x18a2d libsqlite.so (sqlite3PagerCommitPhaseOne + 1412)
#04 pc 0x18cb7 libsqlite.so (sqlite3BtreeCommitPhaseOne + 90)
#05 pc 0x36629 libsqlite.so (sqlite3VdbeHalt + 2852)
#06 pc 0x43161 libsqlite.so (sqlite3VdbeExec + 40640)
#07 pc 0x1a8bb libsqlite.so (sqlite3_step + 218)
#08 pc 0x993a9 libandroid_runtime.so (android::nativeExecuteForChangedRowCount(_JNIEnv*, _jclass*, long long, long long) + 8)
at android.database.sqlite.SQLiteConnection.nativeExecuteForChangedRowCount(SQLiteConnection.java)
at android.database.sqlite.SQLiteConnection.executeForChangedRowCount(SQLiteConnection.java:890)
at android.database.sqlite.SQLiteSession.executeForChangedRowCount(SQLiteSession.java:756)
at android.database.sqlite.SQLiteStatement.executeUpdateDelete(SQLiteStatement.java:66)
at android.database.sqlite.SQLiteDatabase.delete(SQLiteDatabase.java:1729)
at com.iterable.iterableapi.IterableTaskStorage.deleteAllTasks(IterableTaskStorage.java:295)
at com.iterable.iterableapi.OfflineRequestProcessor.onLogout(OfflineRequestProcessor.java:73)
at com.iterable.iterableapi.IterableApiClient.onLogout(IterableApiClient.java:559)
at com.iterable.iterableapi.IterableApi.onLogOut(IterableApi.java:1062)
at com.iterable.iterableapi.IterableApi.setUserId(IterableApi.java:387)
at net.tandem.core_new.analytics.IterableHelperImpl.init(IterableHelperImpl.java:69)
at net.tandem.TandemApp.onCreate(TandemApp.java:175)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7009)
at android.app.ActivityThread.access$1400(ActivityThread.java:257)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2009)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:268)
at android.app.ActivityThread.main(ActivityThread.java:7963)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:627)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:997)
It seems a SQL issue in the JNI interface.
Can you give an insight into what's going on? Do you have a temporary workaround?
Thanks in advance
It seems to be happening with devices from multiple vendors (Google, Samsung, Xiaomi, others...) on Android 11 and up
@KirkBushman Thank you for reporting this. This seems to be an issue with the new system that stores pending requests while the device is offline. We've disabled this feature via a feature flag for your project, please check within a few days if this is still happening.
@vbabenkoru Thanks for the prompt response. Looking again at the stacks that we are receiving it doesn't seem to be evident anymore... Let us know for any more updates
@KirkBushman Thank you! Could you also open a ticket with Iterable Support? We'd like to learn more about your issue and that'd be the best way to communicate project-specific information.
@vbabenkoru I had a chain of mail about this with our contacts at Iterable, they highlighted the issue internally. If you still need a ticket for this can you specify what page I can open it from?
Thanks
@KirkBushman As we try and understand this issue a bit more in detail, would you mind sharing roughly what percentage of sessions that we’re using this version of the SDK were crashing that you found? Thanks!
@Mturner005 tough to say looking at the info we got, I can only see a few users from crashlytics, but it must have happened enough times to contribute to the ANR rate going up.
we also get this ANR for android 11 & 12 starting from December. Not sure if they are the same. We also use Iterable
main (native): tid=1 systid=22038
#00 pc 0x9fc58 libc.so
#01 pc 0x1663c libutils.so
#02 pc 0x16520 libutils.so
#03 pc 0x152b78 libandroid_runtime.so
at android.os.MessageQueue.nativePollOnce(MessageQueue.java)
at android.os.MessageQueue.next(MessageQueue.java:335)
at android.os.Looper.loopOnce(Looper.java:186)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8641)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:567)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1133)
Hi @giangpham96, thank you for sharing the stacktrace. However, until there is a Iterable specific method (com.iterable.iterableapi
) calls in stack trace like the one above, it will be hard to tell what exactly caused crash.
Can you elaborate under what condition this crashes occur? Also, which SDK version were you using?
Also, for Android 11 and 12, I would recommend using our latest SDKs 3.4.4 which added compatibilities and fixes for Android 30+ devices