You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@claude please triage this crash. Use the Firebase MCP Crashlytics tools to fetch the
stacktrace and sample events for issue 37081b243b0f5bf705e7e5e8ccd47489, consult docs/lessons_learned/,
and post a root-cause comment. If you can point to a specific cause in the code, open a draft PR with a minimal fix per docs/DEFINITION_OF_DONE.md (note CI could not run
the emulator). Otherwise label needs-human and explain. Never auto-merge.
MCP note:crashlytics_list_events returned an empty array (no sample events retrieved under this workflow's service-account auth — see issue #107). Triage is based on the issue metadata, the stacktrace in the title/subtitle, docs/lessons_learned/, and the source code.
Failing frame
com.google.mlkit.vision.face.bundled.internal.ThickFaceDetectorCreator.<clinit>
java.lang.UnsatisfiedLinkError: dlopen failed: library "libface_detector_v2_jni.so" not found
Root cause
FaceTracker initializes the ML Kit face detector at field-init time with no error handling.
When this field is initialized, ML Kit's ThickFaceDetectorCreator.<clinit> (the bundled model's static initializer) calls System.loadLibrary("face_detector_v2_jni"). On affected devices, dlopen cannot find libface_detector_v2_jni.so — most likely because that device's ABI is not covered by the bundled ML Kit 16.1.7 AAR, or the library fails 16 KB page-alignment mapping on an Android 15 device with 16 KB page size. The resulting UnsatisfiedLinkError propagates uncaught as ExceptionInInitializerError → fatal crash.
HandTracker had the identical failure mode (MediaPipe's libmediapipe_tasks_jni.so absent / static initializer crash under R8), documented in docs/lessons_learned/040-run-the-release-apk-when-a-native-dependency-lands.md. The fix there: wrap tracker creation in try/catch (error: LinkageError), set a broken flag, report a non-fatal to Crashlytics, and degrade gracefully (camera still works, face lenses show pass-through).
FaceTracker was introduced alongside HandTracker but was never given the same resilience.
Fix
Move FaceDetection.getClient() from a field initializer into an init {} block with try/catch (error: LinkageError).
On failure: set broken = true, log, report non-fatal via ReverseCrashlytics.reportFaceTrackerUnavailable().
analyze() bails early when broken — camera and other lenses continue working.
Add reportFaceTrackerUnavailable() to ReverseCrashlytics.
Confidence: HIGH — the same crash shape, the same library load path, the same missing guard, and an existing pattern in the codebase to follow. A draft PR with the minimal fix follows.
Activity
claude commentedon Sep 13, 2026
Root-cause analysis
Failing frame
Root cause
FaceTrackerinitializes the ML Kit face detector at field-init time with no error handling.When this field is initialized, ML Kit's
ThickFaceDetectorCreator.<clinit>(the bundled model's static initializer) callsSystem.loadLibrary("face_detector_v2_jni"). On affected devices,dlopencannot findlibface_detector_v2_jni.so— most likely because that device's ABI is not covered by the bundled ML Kit 16.1.7 AAR, or the library fails 16 KB page-alignment mapping on an Android 15 device with 16 KB page size. The resultingUnsatisfiedLinkErrorpropagates uncaught asExceptionInInitializerError→ fatal crash.Files involved
app/src/main/java/io/github/stozo04/openloop/camera/lens/FaceTracker.kt— missingLinkageErrorguardapp/src/main/java/io/github/stozo04/openloop/diagnostics/ReverseCrashlytics.kt— needsreportFaceTrackerUnavailable()Lesson 040 precedent
HandTrackerhad the identical failure mode (MediaPipe'slibmediapipe_tasks_jni.soabsent / static initializer crash under R8), documented indocs/lessons_learned/040-run-the-release-apk-when-a-native-dependency-lands.md. The fix there: wrap tracker creation intry/catch (error: LinkageError), set abrokenflag, report a non-fatal to Crashlytics, and degrade gracefully (camera still works, face lenses show pass-through).FaceTrackerwas introduced alongsideHandTrackerbut was never given the same resilience.Fix
FaceDetection.getClient()from a field initializer into aninit {}block withtry/catch (error: LinkageError).broken = true, log, report non-fatal viaReverseCrashlytics.reportFaceTrackerUnavailable().analyze()bails early whenbroken— camera and other lenses continue working.reportFaceTrackerUnavailable()toReverseCrashlytics.Confidence: HIGH — the same crash shape, the same library load path, the same missing guard, and an existing pattern in the codebase to follow. A draft PR with the minimal fix follows.
fix(lens): survive a missing ML Kit face-detection native library