My App crashes when I use the correct Game's Ads ID

Since I updated to Unity 2018.3.2f1, I only had problems.

When I used the following code I initialize the Ads with the correct game id the app did fine in Editor but once built and on the Android it crashed in 5s after start. However when I used an other Game ID from an other BLANK project with Ads, it did not crash and also worked, but it wasn’t my Game ID.
Here’s the very simple code:

using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using UnityEngine.Advertisements;
  
    public class Advertiser : MonoBehaviour {
  
        public string unskippableVideo = "rewardedVideo";
        public string skippableVideo = "popupAd";
      
        public ShowOptions options;
        public static Advertiser i = null;
  
        private void Awake() {
            i = this;
        }
  
        private void Start() {
            Advertisement.Initialize("MYACTUALGAMEID", false);
        }
  
        public void LaunchAd(){
            Advertisement.Show (unskippableVideo, options);
        }
  
        public void LaunchPopupAd() {
            Advertisement.Show(skippableVideo, options);
        }
    }

I use the Unity Monetization 3.0 : https://assetstore.unity.com/packages/add-ons/services/unity-monetization-3-0-66123

an anyone help me solving this issue? Do I have to use another ID instead of the current one?
PS : (I found it here)

  • operateDashboard/organizations/projects/myApp/Monetization/Platform/Settings

Hi @OrdinaryDev83 , could you please email to unityads-support@unity3d.com and send along more information such as your Game ID and the Game ID without the problem, entire device log and debuggable APK file? There will be a support engineer get back to you.

1 Like

Hello @OrdinaryDev83 ,
Without ADB log, it is hard to say, please, can you make a development APK, and provide a log? Also, you can try to turn off CrashReporting service from UnityConnectSettings.asset(my guess, according provided info). If it will help, then it is a known bug and will be fixed soon.

1 Like

Just adding here - seems that you forgot to create a new ShowOptions before passing it as a parameter to Show.

ShowOptions options = new ShowOptions();

I am very thankful for all your replies, I will try all you suggested me tomorrow.

I desactivated this option in the Services :

No more crashes with my Game ID, thank you Unity Dev team! Very efficient.

3 Likes

This also worked for me!
Thanks :slight_smile: