Admob 7.3.0 Crash on Samsung Z Flip 3, similar crash also happens to hundreds of users (reported by Firebase Crashlytic)
See original GitHub issueStep 0: Are you in the right place?
[REQUIRED] Step 1: Describe your environment
- Unity version: 2020.3.37
- Google Mobile Ads Unity plugin version: 7.3.0
- Platform: Android
- Platform OS version: 12
- Any specific devices issue occurs on: Samsung Z Flip3, phone’s language is set to Vietnamese
- similar crash was also reported by Firebase: 3985 crash events affecting 2235 users, some devices: Moto G (5S) Plus, Galaxy J4 Core… and affect many Android versions (from 6-13)
- Mediation ad networks used, and their versions: no mediation network
[REQUIRED] Step 2: Describe the problem
Steps to reproduce:
Follow Admob’s instructions on how to implement Interstitial https://developers.google.com/admob/unity/interstitial
Build APK.
Open the app, request and show an interstitial ad.
Close the interstitial ad, the app crashes.
Stacktrace I got from logcat: Full stacktrace
<google-sheets-html-origin><style type="text/css"><!--td {border: 1px solid #cccccc;}br {mso-data-placement:same-cell;}--></style>
2022/10/20 12:02:58.468 15303 15342 Fatal dmobNothingTes java_vm_ext.cc:594] JNI DETECTED ERROR IN APPLICATION: JNI CallVoidMethodV called with pending exception java.lang.SecurityException: listen
--
2022/10/20 12:02:58.468 15303 15342 Fatal dmobNothingTes java_vm_ext.cc:594] at java.lang.Exception android.os.Parcel.createExceptionOrNull(int, java.lang.String) (Parcel.java:2437)
2022/10/20 12:02:58.468 15303 15342 Fatal dmobNothingTes java_vm_ext.cc:594] at java.lang.Exception android.os.Parcel.createException(int, java.lang.String) (Parcel.java:2421)
2022/10/20 12:02:58.468 15303 15342 Fatal dmobNothingTes java_vm_ext.cc:594] at void android.os.Parcel.readException(int, java.lang.String) (Parcel.java:2404)
2022/10/20 12:02:58.468 15303 15342 Fatal dmobNothingTes java_vm_ext.cc:594] at void android.os.Parcel.readException() (Parcel.java:2346)
2022/10/20 12:02:58.468 15303 15342 Fatal dmobNothingTes java_vm_ext.cc:594] at void com.android.internal.telephony.ITelephonyRegistry$Stub$Proxy.listenWithEventList(int, java.lang.String, java.lang.String, com.android.internal.telephony.IPhoneStateListener, int[], boolean) (ITelephonyRegistry.java:1036)
2022/10/20 12:02:58.468 15303 15342 Fatal dmobNothingTes java_vm_ext.cc:594] at void android.telephony.TelephonyRegistryManager.listenFromListener(int, java.lang.String, java.lang.String, android.telephony.PhoneStateListener, int, boolean) (TelephonyRegistryManager.java:250)
2022/10/20 12:02:58.468 15303 15342 Fatal dmobNothingTes java_vm_ext.cc:594] at void android.telephony.TelephonyManager.listen(android.telephony.PhoneStateListener, int) (TelephonyManager.java:6798)
2022/10/20 12:02:58.468 15303 15342 Fatal dmobNothingTes java_vm_ext.cc:594] at void com.unity3d.player.UnityPlayer.addPhoneCallListener() ((null):-1)
2022/10/20 12:02:58.468 15303 15342 Fatal dmobNothingTes java_vm_ext.cc:594] at boolean com.unity3d.player.UnityPlayer.nativeRender() ((null):-2)
2022/10/20 12:02:58.468 15303 15342 Fatal dmobNothingTes java_vm_ext.cc:594] at boolean com.unity3d.player.UnityPlayer.access$300(com.unity3d.player.UnityPlayer) ((null):-1)
2022/10/20 12:02:58.468 15303 15342 Fatal dmobNothingTes java_vm_ext.cc:594] at boolean com.unity3d.player.UnityPlayer$e$1.handleMessage(android.os.Message) ((null):-1)
2022/10/20 12:02:58.468 15303 15342 Fatal dmobNothingTes java_vm_ext.cc:594] at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102)
2022/10/20 12:02:58.468 15303 15342 Fatal dmobNothingTes java_vm_ext.cc:594] at boolean android.os.Looper.loopOnce(android.os.Looper, long, int) (Looper.java:226)
2022/10/20 12:02:58.468 15303 15342 Fatal dmobNothingTes java_vm_ext.cc:594] at void android.os.Looper.loop() (Looper.java:313)
2022/10/20 12:02:58.468 15303 15342 Fatal dmobNothingTes java_vm_ext.cc:594] at void com.unity3d.player.UnityPlayer$e.run() ((null):-1)
2022/10/20 12:02:58.468 15303 15342 Fatal dmobNothingTes java_vm_ext.cc:594] Caused by: android.os.RemoteException: Remote stack trace:
2022/10/20 12:02:58.468 15303 15342 Fatal dmobNothingTes java_vm_ext.cc:594]
2022/10/20 12:02:58.468 15303 15342 Fatal dmobNothingTes java_vm_ext.cc:594]
2022/10/20 12:02:58.468 15303 15342 Fatal dmobNothingTes java_vm_ext.cc:594]
2022/10/20 12:02:58.468 15303 15342 Fatal dmobNothingTes java_vm_ext.cc:594]
2022/10/20 12:02:58.468 15303 15342 Fatal dmobNothingTes java_vm_ext.cc:594]
2022/10/20 12:02:58.468 15303 15342 Fatal dmobNothingTes java_vm_ext.cc:594]
2022/10/20 12:02:58.468 15303 15342 Fatal dmobNothingTes java_vm_ext.cc:594] (Throwable with no stack trace)
2022/10/20 12:02:58.468 15303 15342 Fatal dmobNothingTes java_vm_ext.cc:594]
2022/10/20 12:02:58.468 15303 15342 Fatal dmobNothingTes java_vm_ext.cc:594] in call to CallVoidMethodV
2022/10/20 12:02:58.468 15303 15342 Fatal dmobNothingTes java_vm_ext.cc:594] from boolean com.unity3d.player.UnityPlayer.nativeRender()
Relevant Code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using GoogleMobileAds.Api;
using System;
namespace Omnilatent.AdsMediation.Example
{
public class AdsTesterOmni : MonoBehaviour
{
private InterstitialAd interstitial;
private RewardedAd rewardedAd;
private BannerView bannerView;
[SerializeField] InputField debugTextField;
private void Start()
{
Application.logMessageReceived += OnLog;
}
private void OnLog(string msg, string stackTrace, LogType type)
{
SetText(msg + "\n" + stackTrace);
}
public void RequestIntersitial()
{
#if UNITY_ANDROID
string adUnitId = "ca-app-pub-3940256099942544/1033173712";
#elif UNITY_IPHONE
string adUnitId = "ca-app-pub-3940256099942544/4411468910";
#else
string adUnitId = "unexpected_platform";
#endif
// Initialize an InterstitialAd.
this.interstitial = new InterstitialAd(adUnitId);
// Create an empty ad request.
AdRequest request = new AdRequest.Builder().Build();
// Load the interstitial with the request.
this.interstitial.LoadAd(request);
}
public void ShowInter()
{
if (this.interstitial.IsLoaded())
{
this.interstitial.Show();
}
}
public void TestReward1()
{
this.rewardedAd = new RewardedAd("ca-app-pub-3940256099942544/5224354917");
this.rewardedAd.OnAdLoaded += HandleRewardedAdLoaded;
// Called when an ad request failed to load.
this.rewardedAd.OnAdFailedToLoad += HandleRewardedAdFailedToLoad;
// Called when an ad is shown.
this.rewardedAd.OnAdOpening += HandleRewardedAdOpening;
// Called when an ad request failed to show.
this.rewardedAd.OnAdFailedToShow += HandleRewardedAdFailedToShow;
// Called when the user should be rewarded for interacting with the ad.
this.rewardedAd.OnUserEarnedReward += HandleUserEarnedReward;
// Called when the ad is closed.
this.rewardedAd.OnAdClosed += HandleRewardedAdClosed;
// Create an empty ad request.
AdRequest request = new AdRequest.Builder().Build();
// Load the rewarded ad with the request.
this.rewardedAd.LoadAd(request);
}
public void HandleRewardedAdLoaded(object sender, EventArgs args)
{
MonoBehaviour.print("HandleRewardedAdLoaded event received");
this.rewardedAd.Show();
}
public void HandleRewardedAdFailedToLoad(object sender, AdFailedToLoadEventArgs args)
{
MonoBehaviour.print(
"HandleRewardedAdFailedToLoad event received with message: "
+ args.LoadAdError.GetMessage());
}
public void HandleRewardedAdOpening(object sender, EventArgs args)
{
MonoBehaviour.print("HandleRewardedAdOpening event received");
}
public void HandleRewardedAdFailedToShow(object sender, AdErrorEventArgs args)
{
MonoBehaviour.print(
"HandleRewardedAdFailedToShow event received with message: "
+ args.AdError.GetMessage());
}
public void HandleRewardedAdClosed(object sender, EventArgs args)
{
MonoBehaviour.print("HandleRewardedAdClosed event received");
}
public void HandleUserEarnedReward(object sender, Reward args)
{
string type = args.Type;
double amount = args.Amount;
MonoBehaviour.print(
"HandleRewardedAdRewarded event received for "
+ amount.ToString() + " " + type);
}
void SetText(string text)
{
debugTextField.text = text;
}
public void RequestBanner()
{
// These ad units are configured to always serve test ads.
#if UNITY_EDITOR
string adUnitId = "unused";
#elif UNITY_ANDROID
string adUnitId = "ca-app-pub-3212738706492790/6113697308";
#elif UNITY_IPHONE
string adUnitId = "ca-app-pub-3212738706492790/5381898163";
#else
string adUnitId = "unexpected_platform";
#endif
// Clean up banner ad before creating a new one.
if (this.bannerView != null)
{
this.bannerView.Destroy();
}
AdSize adaptiveSize =
AdSize.GetCurrentOrientationAnchoredAdaptiveBannerAdSizeWithWidth(AdSize.FullWidth);
this.bannerView = new BannerView(adUnitId, adaptiveSize, AdPosition.Bottom);
// Register for ad events.
this.bannerView.OnAdLoaded += this.HandleAdLoaded;
this.bannerView.OnAdFailedToLoad += this.HandleAdFailedToLoad;
this.bannerView.OnAdOpening += this.HandleAdOpening;
this.bannerView.OnAdClosed += this.HandleAdClosed;
AdRequest adRequest = new AdRequest.Builder()
.Build();
// Load a banner ad.
this.bannerView.LoadAd(adRequest);
}
#region Banner callback handlers
public void HandleAdLoaded(object sender, EventArgs args)
{
MonoBehaviour.print("HandleAdLoaded event received");
MonoBehaviour.print(String.Format("Ad Height: {0}, width: {1}",
this.bannerView.GetHeightInPixels(),
this.bannerView.GetWidthInPixels()));
bannerView.Show();
}
public void HandleAdFailedToLoad(object sender, AdFailedToLoadEventArgs args)
{
MonoBehaviour.print(
"HandleFailedToReceiveAd event received with message: " + args.LoadAdError.GetMessage());
}
public void HandleAdOpening(object sender, EventArgs args)
{
MonoBehaviour.print("HandleAdOpening event received");
}
public void HandleAdClosed(object sender, EventArgs args)
{
MonoBehaviour.print("HandleAdClosed event received");
}
#endregion
}
}
Firebase crashlytic:
Firebase grouped the above mentioned crash in libc.so crash, this is what Firebase logged:
Crashed: Thread #1
SIGABRT 0x0000000000000000
0
libc.so
(Missing UUID 0f39fc790debeef5bc191987ab30a3f5)
1
libc.so
(Missing UUID 0f39fc790debeef5bc191987ab30a3f5)
2
libart.so
(Missing UUID 56e704c544e6c624201be2ab4933e853)
3
libbase.so
(Missing UUID b77c57f68a484ed93d5a7eda59d83bf9)
4
libbase.so
(Missing UUID b77c57f68a484ed93d5a7eda59d83bf9)
5
libart.so
(Missing UUID 56e704c544e6c624201be2ab4933e853)
6
libart.so
(Missing UUID 56e704c544e6c624201be2ab4933e853)
7
libart.so
(Missing UUID 56e704c544e6c624201be2ab4933e853)
8
libart.so
(Missing UUID 56e704c544e6c624201be2ab4933e853)
9
libart.so
(Missing UUID 56e704c544e6c624201be2ab4933e853)
10
libart.so
(Missing UUID 56e704c544e6c624201be2ab4933e853)
11
libart.so
(Missing UUID 56e704c544e6c624201be2ab4933e853)
12
libunity.so
(Missing UUID 0d41af4703121e1f468970d6612837e73cd3add8)
13
libunity.so
(Missing UUID 0d41af4703121e1f468970d6612837e73cd3add8)
14
libunity.so
(Missing UUID 0d41af4703121e1f468970d6612837e73cd3add8)
15
libart.so
(Missing UUID 56e704c544e6c624201be2ab4933e853)
16
libart.so
(Missing UUID 56e704c544e6c624201be2ab4933e853)
17
libart.so
(Missing UUID 56e704c544e6c624201be2ab4933e853)
18
libart.so
(Missing UUID 56e704c544e6c624201be2ab4933e853)
Issue Analytics
- State:
- Created a year ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
android - Firebase crashlytics doesnt show crashes
First time that you set up crashlytics it might take some time before the data shows up in the dashboard. But if it's...
Read more >Galaxy Z Flip 3 keeps crashing : r/galaxyzflip
The first time it happened it just crashed randomly but over the ... this part sounds similar to the known issue a few...
Read more >Admob Crash Issue
I have not been able to reproduce the app crash locally, but I have found a simple way to reproduce something very similar....
Read more >Closing out issues, identifying users in crash reports, & ...
Closing out issues, identifying users in crash reports, & more! #AskFirebase - YouTube.
Read more >Major Android crash involving NullPointerException ...
This crash just started appearing for hundreds of users on Nov 17, across many versions of my app with many versions of AdMob...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Since there were no recent activities for this issue, we are therefore reluctantly going to close this bug for now.
If you are still experiencing the problem, please file a new issue with the same description, what happens and system / network tracing / Charles logs.
All system setups can be slightly different, so it’s always better to open new issues and reference the related ones. Thanks for your contribution.
welp, responsible for thousands of crashes on my app and wontfix. I’ll tell everyone to switch to other solutions.