-
Notifications
You must be signed in to change notification settings - Fork 703
Open
Description
Summary
Hey Stripe team, we're seeing the following crash:
Fatal Exception: java.lang.IllegalArgumentException: Contents of /data/user/0/com.whatnot_mobile/cache/a8bcf0129dcd29084f6797ede7e0be86f9e11ed5.tflite does not encode a valid TensorFlow Lite model: Could not open '/data/user/0/com.whatnot_mobile/cache/a8bcf0129dcd29084f6797ede7e0be86f9e11ed5.tflite'.
The model allocation is null/empty
at org.tensorflow.lite.NativeInterpreterWrapper.createModel(NativeInterpreterWrapper.java)
at org.tensorflow.lite.NativeInterpreterWrapper.<init>(NativeInterpreterWrapper.java:57)
at org.tensorflow.lite.NativeInterpreterWrapperExperimental.<init>(NativeInterpreterWrapperExperimental.java:32)
at org.tensorflow.lite.Interpreter.<init>(Interpreter.java:200)
at com.stripe.android.mlcore.impl.InterpreterWrapperImpl.<init>(InterpreterWrapperImpl.java:11)
at com.stripe.android.identity.ml.FaceDetectorAnalyzer.<init>(FaceDetectorAnalyzer.kt:29)
at com.stripe.android.identity.ml.FaceDetectorAnalyzer$Factory.newInstance(FaceDetectorAnalyzer.kt:98)
at com.stripe.android.camera.framework.AnalyzerPool$Companion.of(AnalyzerPool.java:54)
at com.stripe.android.camera.framework.AnalyzerPool$Companion.of$default(AnalyzerPool.java:44)
at com.stripe.android.identity.camera.IdentityScanFlow$startFlow$1.invokeSuspend(IdentityScanFlow.java:102)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34)
at kotlinx.coroutines.internal.DispatchedContinuationKt.resumeCancellableWith(DispatchedContinuation.kt:375)
at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable(Cancellable.kt:26)
at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.java:358)
at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:134)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(BuildersKt__Builders_common.kt:53)
at kotlinx.coroutines.BuildersKt.launch(Builders.kt:1)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch$default(BuildersKt__Builders_common.kt:44)
at kotlinx.coroutines.BuildersKt.launch$default(Builders.kt:1)
at com.stripe.android.identity.camera.IdentityScanFlow.startFlow(IdentityScanFlow.java:88)
at com.stripe.android.identity.viewmodel.IdentityScanViewModel.startScan(IdentityScanViewModel.java:133)
at com.stripe.android.identity.utils.CameraUtilsKt.startScanning(CameraUtils.kt:16)
at com.stripe.android.identity.ui.SelfieScreenKt$SelfieCaptureScreen$1$1.invokeSuspend(SelfieScreen.kt:176)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
at androidx.compose.ui.platform.AndroidUiDispatcher.performTrampolineDispatch(AndroidUiDispatcher.android.kt:79)
at androidx.compose.ui.platform.AndroidUiDispatcher.access$performTrampolineDispatch(AndroidUiDispatcher.android.kt:41)
at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.run(AndroidUiDispatcher.android.kt:57)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:230)
at android.os.Looper.loop(Looper.java:319)
at android.app.ActivityThread.main(ActivityThread.java:9063)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:588)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
It seems that wrapper does not proactively set up any defense against crashes coming from within TenserFlow.
Android version
Happens across Android 13/14/15/16
Impact
208 users with 980 crashes in the past 30 day
I've checked dozen different sessions and Firebase Crashlytics reports 500-700MB of free space of crashing users devices.
Dependency Versions
Kotlin: 2.2.21
Gradle: 9.2
AGP: 8.13.1
Stripe: 21.28.2
Stripe:identity - 21.28.2
Other information
I think this crash was already present a year ago and got resolved: #7347
Seems like a regression?