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

The app crashes due to NullPointerException #329

Open
artyom-frolov opened this issue Jul 8, 2024 · 5 comments
Open

The app crashes due to NullPointerException #329

artyom-frolov opened this issue Jul 8, 2024 · 5 comments
Labels

Comments

@artyom-frolov
Copy link

Describe the bug
After integrating the AppsFlyer SDK into our Flutter app, some Android users experience crashes. No special actions are required from the user to reproduce the bug. This issue is similar to #322 but our app doesn't use deeplinks and has a different call stack.

Callstack:

Exception java.lang.NullPointerException:
  at com.appsflyer.appsflyersdk.AppsflyerSdkPlugin$5$1.run (AppsflyerSdkPlugin.java:384)
  at android.os.Handler.handleCallback (Handler.java:914)
  at android.os.Handler.dispatchMessage (Handler.java:100)
  at android.os.Looper.loop (Looper.java:224)
  at android.app.ActivityThread.main (ActivityThread.java:7551)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:539)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:995)

To Reproduce
We cannot identify specific reproducible steps; the issue occurs unexpectedly.

Expected behavior
The app should work without crashes.

Screenshots
Callstack from Sentry:

Sentry

Smartphone:

  • Device: Redmi begonia (Redmi Note 8 Pro)
  • OS: Android 11 (SDK 30)

Additional context
AppsFlyer SDK version: 6.13.2+1
Flutter version: 3.13.9 (stable)
Engine revision 0545f8705d
Dart version: 3.1.5
DevTools version: 2.25.0
IDE: VS Code (version 1.90.2)

@pazlavi pazlavi added the support label Jul 8, 2024
Copy link

github-actions bot commented Jul 8, 2024

👋 Hi @artyom-frolov and Thank you for reaching out to us.
In order for us to provide optimal support, please submit a ticket to our support team at [email protected].
When submitting the ticket, please specify:

  • ✅ your AppsFlyer sign-up (account) email
  • ✅ app ID
  • ✅ production steps
  • ✅ logs
  • ✅ code snippets
  • ✅ and any additional relevant information.

@MahendraN35
Copy link

We are facing the same problem too and we are using appsflyer_sdk (6.14.3).

@RonyBrosh
Copy link

As a quick fix we reverted our AppsFlyer version update back to 6.13.0+1.
We never had those crashes with that version but keep in mind that deferred deep links won't work for you on iOS with that version of AppsFlyer. They will on Android though.

@artyom-frolov
Copy link
Author

I conacted with support. Their response:
"I discussed this issue the mobile team and based on the error trace and shared code snippet It seems like we have an issue with the new startSDK method with onSuccess and onError callbacks here. As a workaround, we can suggest removing the callbacks on the Flutter side if they are not in use in your app logic and using startSDK without the callback."

I'll try this workaround. Maybe it will help someone too.

@wiktoriasobczyk
Copy link

Release of new package version should resolve this problem https://github.com/AppsFlyerSDK/appsflyer-flutter-plugin/releases/tag/v6.15.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants