NullPointerException on com.google.android.gms.ads.identifier.AdvertisingIdClient$Info.isLimitAdTrackingEnabled()
- [ ] I have updated Purchases SDK to the latest version
- [x] I have read the Contribution Guidelines
- [x] I have searched the Community
- [x] I have read docs.revenuecat.com
- [x] I have searched for existing Github issues
Describe the bug A clear and concise description of what the bug is. The more detail you can provide the faster our team will be able to triage and resolve the issue. Do not remove any of the steps from the template below. If a step is not applicable to your issue, please leave that step empty.
Here's the stacktrace of a crash found from production users:
java.lang.NullPointerException (crashed)
Attempt to invoke virtual method 'boolean com.google.android.gms.ads.identifier.AdvertisingIdClient$Info.isLimitAdTrackingEnabled()' on a null object reference
com.revenuecat.purchases.google.attribution.GoogleDeviceIdentifiersFetcher.getAdvertisingID (Unknown Source:51)
com.revenuecat.purchases.google.attribution.GoogleDeviceIdentifiersFetcher.getDeviceIdentifiers$lambda$0 (Unknown Source:15)
com.revenuecat.purchases.google.attribution.GoogleDeviceIdentifiersFetcher.a (Unknown Source)
com.revenuecat.purchases.google.attribution.GoogleDeviceIdentifiersFetcher$$InternalSyntheticLambda$1$05e72c584e33dbd09bb60a652b02f5f9134b2cad99e8820e073032a93bb4cf4f$0.run (Unknown Source:5)
java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:462)
java.util.concurrent.FutureTask.run (FutureTask.java:266)
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run (ScheduledThreadPoolExecutor.java:301)
java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
java.lang.Thread.run (Thread.java:923)
- Environment
- Platform: Android
- SDK version: 6.9.5
- OS version: 11
- Android Studio version: not relevant
- How widespread is the issue. Percentage of devices affected. < 0.01%
- Debug logs that reproduce the issue: not available
- Steps to reproduce, with a description of expected vs. actual behavior: not available
- Other information (e.g. stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.) Seems to be only happening on LGE Nexus 5X devices running Android 11
Additional context Add any other context about the problem here.
👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!
Thanks for reporting this @matteinn. We haven't been able to reproduce, but we've seen other similar reports related to the google ads library. We're working on a fix in #1550. Will let you know once we confirm and ship the fix!
Many thanks @tonidero, makes sense to me!
This issue has been automatically locked due to no recent activity after it was closed. Please open a new issue for related reports.