AppsFlyerSDK / appsflyer-flutter-plugin

Flutter Plugin for AppsFlyer SDK
MIT License
142 stars 111 forks source link

NullPointerException Attempt to invoke virtual method 'android.content.Context android.content.Context.getApplicationContext()' on a null object reference #250

Closed felipe-xavier closed 11 months ago

felipe-xavier commented 1 year ago

We are facing an issue of Null-Pointer-Exception when the SDK is initialized on Android

Sentry Logs:

Screenshot 2023-01-10 at 20 47 06

Code snippets:

main appsflyer-init

We initialize AppsFlyer though our initAppsflyer method called in Main right before runApp method is called.

According to Sentry, this issue happens only on Android and on production so far, and started happening after we added the just_audio package with audio_session to reproduce audio in the background, but since we are getting logs with errors when initialising AppsFlyer, we are writing to you for help.

We saw that there is this PR that tried to solve a similar issue even mentioning audio_session package, but was never approved or discussed.

So we would like to know if this issue has been noticed by the AppsFlyer SDK team and if a solution has been found.

Please, let us know if you can help us.

github-actions[bot] commented 1 year ago

👋 Hi @felipe-xavier 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 support@appsflyer.com. When submitting the ticket, please specify:

dmontil commented 1 year ago

Same issue

minoesteban commented 1 year ago

Same issue

GM-appsflyer commented 11 months ago

plugin fix for this issue was released on v6.11.3