software-mansion / react-native-reanimated

React Native's Animated library reimplemented
https://docs.swmansion.com/react-native-reanimated/
MIT License
9.02k stars 1.3k forks source link

App cash with `java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.util.HashMap.containsKey(java.lang.Object)' on a null object reference` #6674

Open bglgwyng opened 2 hours ago

bglgwyng commented 2 hours ago

Description

My app keeps crashing and failing to launch.

Here's the stack trace from Sentry.

java.lang.IllegalStateException: com.facebook.jni.CppException: Exception in HostFunction: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.util.HashMap.containsKey(java.lang.Object)' on a null object reference

Error: Exception in HostFunction: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.util.HashMap.containsKey(java.lang.Object)' on a null object reference
    at _notifyAboutProgress (native)
    at anonymous (JavaScript:1:325)
    at anonymous (JavaScript:1:396)
    at forEach (native)
    at set _value (JavaScript:1:368)
    at step (JavaScript:1:1058)
    at anonymous (JavaScript:1:407)
    at forEach (native)
    at anonymous (JavaScript:1:386)
    at anonymous (JavaScript:1:704)
    at com.facebook.react.bridge.ReactContext.handleException(ReactContext.java:496)
    at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:31)
    at com.facebook.react.modules.core.ReactChoreographer$1.doFrame(ReactChoreographer.java:89)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1688)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1699)
    at android.view.Choreographer.doCallbacks(Choreographer.java:1154)
    at android.view.Choreographer.doFrame(Choreographer.java:1070)
    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1647)
    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)

Steps to reproduce

This error has only been found in my production app. I'm trying to figure out how to reproduce it, but I have very little clue now. Please let me know if someone sees hints in the stack trace.

Snack or a link to a repository

not yet

Reanimated version

3.6.1

React Native version

0.74.5

Platforms

Android, iOS

JavaScript runtime

None

Workflow

Expo Go

Architecture

Paper (Old Architecture)

Build type

Release app & production bundle

Device

Real device

Device model

Samsung Galaxy, SM-F731N

Acknowledgements

Yes

github-actions[bot] commented 2 hours ago

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?