-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.app.KeyguardManager.isDeviceLocked()' on a null object reference #3668
Comments
@NVentimiglia please, help me out. i'm losing ad revenue because of this. |
I'm having the same issue. It started this week and drove my revenue to zero. |
@solclovser. Good to know it's not from my end. Let's wait for a comment from one of the officials. What version of Google Play Instant plugin are you using?. I'm going to upgrade to the latest version to see if the crash will stop. |
I upgraded everything to the latest -even trying Unity 6 but the problem persists. I will let you know if I find something. |
Can you please file a bug ticket with Admob Support, I will most likely need to get the Android team involved in this. I will see if I can replicate this on my end. |
I've done that. Hopefully, this gets resolved as soon as possible. |
I also have an ongoing ticket with the Ads SDK Team. I just tried the sample project. Everything is fine in the installed build. |
@NVentimiglia please, is there any update on the situation?. We're really losing money. |
@NVentimiglia please, help us with a workaround. There has been no update from the Admob Support. This is really sad and sudden. |
thanks for the reminder. I did escalated this issue internally. I am not too familiar with instant apps, can you provide some details on how those apps are different. A sample apk we could test against would also help here. |
They are different in the sense that players don't have to install them in order to open them. |
@NVentimiglia On further testing, I discovered that I'm able to play instant games that have admob ads on my Pixel 5a running Android 14, but they are crashing on my Pixel 7a running Android 15. If that's going to be of any help to you guys in solving the issue. I'm not sure if this has always been the case or if this means they're already working on the issue. |
[REQUIRED] Step 1: Describe your environment
[REQUIRED] Step 2: Describe the problem
Started seeing high crash rates (2-3%) at the beginning of last month on google play console which has been slowly going up and as at October 31st was now at 50%, so i had to remove admob ads and started working on the issue locally. I didn't change anything on my end. I started testing my game locally with test ads and i discovered that once a bannner ad gets requested with the LoadAd() function, it shows a black banner with "test ads" tag and then the game crashes. Same thing happens for rewarded ads. THE CRASH SEEMS TO ONLY OCCUR ON INSTANT PLAY VERSIONS OF MY GAME.
Steps to reproduce:
Import the Google Mobile ads package and the Google Play Instant plugin into a project, build an instant play version and request an ad.
Stack trace
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.app.KeyguardManager.isDeviceLocked()' on a null object reference
at com.google.android.gms.ads.omid.library.walking.e.run(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:615)
at android.os.Handler.handleCallback(Handler.java:959)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.app.ActivityThread.main(ActivityThread.java:8705)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:886)
using UnityEngine;
using GoogleMobileAds.Api;
using System.Collections;
using System.Collections.Generic;
using System;
using System.Threading.Tasks;
using PimDeWitte.UnityMainThreadDispatcher;
public class GoogleMobileAdsBanner : MonoBehaviour
{
public int adTime = 5;
private BannerView _bannerView;
private bool _isInitialized = false;
The text was updated successfully, but these errors were encountered: