-
Notifications
You must be signed in to change notification settings - Fork 296
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
NullPointerException for intValue()
#672
Comments
Hi @felixgabler |
Yes, it's something I'm getting tons of crashlytics for but it doesn't occur on my phones. So I'm not sure how helpful the output will be. Do you need a list of some of the devices that show up in crashlytics? |
Yes, we need this info to know which platform is having this issue. Also, can you try running the app with |
Here are the affected devices and platforms:
For me, everything works even in release mode. Out of thousands of users, it is just these five devices that exhibit the error and I cannot figure out why. |
@felixgabler All affected devices are Android. Labeling the issue for further insights from the team. Thanks! |
Hi! I had the same issue working on my emulator. I solved it by disposing of the banner when I did not need it anymore. BannerAd myBanner = BannerAd(.....)
@override
void initState() {
super.initState()
myBanner.load()
}
@override
void dispose() {
super.dispose()
myBanner.dispose()
}
|
This error message indicates that you are trying to call the intValue() method on an Integer object which is null. In Java, you cannot call a method on a null object, because a null object does not have any methods to call. To fix this error, you will need to find the code that is causing the null object to be used, and either provide a non-null object, or check for a null value before calling the method. Here is an example of how you could modify your code to avoid this error:
|
Alternatively, you could modify the create() method to handle the case where the Integer object is null:
|
Hi, I am getting 80 crashes per week. issue initially created here: flutter/flutter#118082 can I have a update on this? |
There are a few recent reports for this as above and the linked duplicate issues. |
Any update on this issue? I have some similar crash reports |
Got the exact error trace with thousands of crashes
|
|
I have this issue when I go to a screen with native ads for the 2nd time or more in release mode. |
I am seeing a bunch of these errors in my production environment. I haven't been able to reproduce this locally...yet. This happened as far back as 2.3.0 and I am currently using 3.0.0 of google_mobile_ads and I am still seeing this issue occur. From looking through the logs, it never happens upon launch - it is usually after displaying quite a few screens (I mostly only use BannerAds, so it seems to be happening with this). In some of the instances, it seems like the first ad to be loaded after the app was resumed, causes this. (e.g. the last activity happened 9 minutes ago and then the user continues to use the app, the crash happens). |
Did we get the answer to this issue? I get thousands of crashes about this, every day....... |
I believe 3.0.1 fixed the issue. I upgraded and didn't see it again. See #853 <-- I was wrong, please ignore this statement. |
Has 3.0.1 been released yet? I can only see 3.0.0 in pub.dev |
I'm getting the same error on Firebase:
@mulderpf where did you install the v3.0.1 from? |
I am so sorry, I was clearly very confused when I wrote that I saw it fixed - I muted the issue and just discovered how many people are getting this. I'm still seeing loads and loads of these errors in production. This is the stacktrace: Looking at the Android code of the plugin and the stacktrace above, the issue occurs on line 59 of io.flutter.plugins.googlemobileads.GoogleMobileAdsFactory.java when args is passed with a null value (I don't see any check on the value, so any old junk can make it's way in - which it seems like it is). I am not good with fixing things yet, so won't know where to begin with java code. |
either google_mobile_ads is not used by many people or people not aware of these issues in their app, 'cause this issues effects 100% of my userbase and still no one from this team taking care of this issue. |
It's only affecting a very small number of my users - 24 out of around 8000 a day. I cannot see a pattern really in the devices affected as it is a bit different for me (of course, since the error is happening in the java code, it only affects Android. (I am not seeing anything that's even remotely related in my iOS crash reports). Device distribution: OS distribution: The issue doesn't repeat many times for the same users either - some are using the app for a while and gets it, others don't. My 90 day stats for this issue: This issue has 1,325 non-fatal events affecting 902 users This suggests that very few users see this issue happening multiple times - you're likely to only experience it once or twice. It would be good if this could be triaged further to see if we are potentially losing out on revenue here. |
@LTPhantom @imaNNeo Any work in progress on this issue? Error still occurs on Flutter 3.10.6 |
watching too... |
what are you guys using alt for this ads package? |
Any progress on this? I also noticed this on Interstitial loads. This is revenue impacting so should be investigated asap. |
Any work in progress on this issue? |
I have same issue on production, version 3.0.0 |
Hello @hu1won |
How can we fix this? @hu1won where can I find this code that you are referring to? |
Following for updates as looking for any alternatives/solutions to this issue. Thank you! |
i am also facing crash issue in android 8.0 by calling myBanner.load(); in initState() |
Closing this issue as the fix has been addressed in #967. In the short term you can use
to see the recent changes. This will also be included in the next release (coming this month). |
Plugin Version
2.1.0
Steps to Reproduce
It cannot be reproduced very easily and just occurs for some users of my app. Hoping that the error message itself could lead to a solution. Some implicit cast into
int
must be incorrect for an argument.Expected results:
No crashes
Actual results:
The app crashes regularly for many users with
Logs
The text was updated successfully, but these errors were encountered: