Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

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

Discussion in 'Unity Ads & User Acquisition' started by OrdinaryDev83, Jan 22, 2019.

  1. OrdinaryDev83

    OrdinaryDev83

    Joined:
    May 8, 2014
    Posts:
    23
    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:


    Code (CSharp):
    1. using System.Collections;
    2.     using System.Collections.Generic;
    3.     using UnityEngine;
    4.     using UnityEngine.Advertisements;
    5.  
    6.     public class Advertiser : MonoBehaviour {
    7.  
    8.         public string unskippableVideo = "rewardedVideo";
    9.         public string skippableVideo = "popupAd";
    10.      
    11.         public ShowOptions options;
    12.         public static Advertiser i = null;
    13.  
    14.         private void Awake() {
    15.             i = this;
    16.         }
    17.  
    18.         private void Start() {
    19.             Advertisement.Initialize("MYACTUALGAMEID", false);
    20.         }
    21.  
    22.         public void LaunchAd(){
    23.             Advertisement.Show (unskippableVideo, options);
    24.         }
    25.  
    26.         public void LaunchPopupAd() {
    27.             Advertisement.Show(skippableVideo, options);
    28.         }
    29.     }
    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
     
  2. Callie-Zhu

    Callie-Zhu

    Unity Technologies

    Joined:
    Mar 2, 2016
    Posts:
    42
    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.
     
    Nilen123 likes this.
  3. DenisasK

    DenisasK

    Unity Technologies

    Joined:
    Oct 13, 2016
    Posts:
    89
    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.
     
    OrdinaryDev83 likes this.
  4. mikaisomaa

    mikaisomaa

    Unity Technologies

    Joined:
    Sep 14, 2015
    Posts:
    365
    Just adding here - seems that you forgot to create a new ShowOptions before passing it as a parameter to Show.

    Code (CSharp):
    1. ShowOptions options = new ShowOptions();
     
  5. OrdinaryDev83

    OrdinaryDev83

    Joined:
    May 8, 2014
    Posts:
    23
    I am very thankful for all your replies, I will try all you suggested me tomorrow.
     
  6. OrdinaryDev83

    OrdinaryDev83

    Joined:
    May 8, 2014
    Posts:
    23
    I desactivated this option in the Services :

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

    Deleted User

    Guest

    This also worked for me!
    Thanks :)