Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AppLifecycleIntegration.removeObserver NullPointerException (observer is null) #3781

Open
Qdafengzi opened this issue Apr 28, 2024 · 3 comments

Comments

@Qdafengzi
Copy link

Qdafengzi commented Apr 28, 2024

Android

SDK:
"@sentry/react-native": "4",
"react-native": "0.72.4",

java.lang.NullPointerException: Parameter specified as non-null is null: method androidx.lifecycle.LifecycleRegistry.removeObserver, parameter observer
at androidx.lifecycle.LifecycleRegistry.removeObserver(Unknown Source:3)
at io.sentry.android.core.AppLifecycleIntegration.removeObserver(AppLifecycleIntegration.java:112)
at io.sentry.android.core.AppLifecycleIntegration.lambda$close$1$io-sentry-android-core-AppLifecycleIntegration(AppLifecycleIntegration.java:123)
at io.sentry.android.core.AppLifecycleIntegration$$ExternalSyntheticLambda0.run(Unknown Source:2)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7870)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)

also have this log

Native Integrations '[io.sentry.UncaughtExceptionHandlerIntegration@714bce2, io.sentry.ShutdownHookIntegration@e2d7873]'
@krystofwoldrich
Copy link
Member

Hi @Qdafengzi,
thank you for the message,

what version of @sentry/react-native@v4 are you using exactly?

If you are using SAGP, what version are you using?

Would you be able to provide steps to reproduce the issue or a minimal reproducible example?

@krystofwoldrich krystofwoldrich changed the title NullPointerException AppLifecycleIntegration.removeObserver NullPointerException (observer is null) Apr 29, 2024
@Qdafengzi
Copy link
Author

Hi @Qdafengzi, thank you for the message,

what version of @sentry/react-native@v4 are you using exactly?

If you are using SAGP, what version are you using?

Would you be able to provide steps to reproduce the issue or a minimal reproducible example?

Sorry for the late reply. I have been on vacation all along。

"@sentry/react-native": "^5.22.0" I have change this exactly version

android project
classpath("io.sentry:sentry-android-gradle-plugin:4.5.0")

Maybe I need to observe and see if there is still this issue

@krystofwoldrich
Copy link
Member

@Qdafengzi No worries, thank you for the update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting for: Community
Status: Waiting for: Community
Status: Needs More Information
Development

No branches or pull requests

2 participants