Search Unity

Bug Rewarded ads are not displayed. Black screen.

Discussion in 'Unity Ads & User Acquisition' started by Kolodieiev, Mar 12, 2023.

  1. Kolodieiev

    Kolodieiev

    Joined:
    Mar 12, 2023
    Posts:
    1
    Hello. I'm trying to set up rewarded ads for an android app. I am using the implementation guide from this link: https://docs.unity.com/ads/en/manual/ImplementingRewardedAdsAndroid

    At first glance, everything works. Until I try to display the loaded ad by calling UnityAds.show(). As a result of the call, a black screen with 2 buttons is displayed. Mute and GDPR. The buttons work, but the video is not displayed. After a few seconds, this screen will close.

    The following lines are output to the log:
    I/UnityAds: com.unity3d.services.core.api.Sdk.logInfo() (line:100) :: Displaying Ad with creativeId test-landscape-id
    I/UnityAds: com.unity3d.services.core.api.Sdk.logInfo() (line:100) :: Opening performance(v) ad unit with orientation PORTRAIT, hardware acceleration enabled
    D/TrafficStats: tagSocket(185) with statsTag=0xffffffff, statsUid=-1
    E/SurfaceSyncer: Failed to find sync for id=0
    W/Parcel: Expecting binder but got null!
    E/SurfaceSyncer: Failed to find sync for id=0
    E/UnityAds: com.unity3d.services.core.request.WebRequestRunnable.makeRequest() (line:70) :: Error completing request: Response code: Unacceptable certificate: CN=DigiCert Global Root CA, OU=www.digicert.com, O=DigiCert Inc, C=US

    V/MediaHTTPService: MediaHTTPService(android.media.MediaHTTPService@6d5d344): Cookies: null
    W/UnityAds: com.unity3d.services.core.device.Device.getNetworkType() (line:152) :: Unity Ads was not able to get current network type due to missing permission
    V/MediaHTTPService: makeHTTPConnection: CookieManager created: java.net.CookieManager@a01dc2d
    V/MediaHTTPService: makeHTTPConnection(android.media.MediaHTTPService@6d5d344): cookieHandler: java.net.CookieManager@a01dc2d Cookies: null

    D/TrafficStats: tagSocket(94) with statsTag=0xffffffff, statsUid=-1
    D/TrafficStats: tagSocket(95) with statsTag=0xffffffff, statsUid=-1

    E/UnityAds: com.unity3d.services.ads.video.VideoPlayerView$2.run() (line:74) :: Video player prepare timeout: https://cdn-creatives-akamaistls-pr...ontent.com/impact/11017/blue_test_trailer.mp4
    E/UnityAds: com.unity3d.services.core.api.Sdk.logError() (line:88) :: Unity Ads video player prepare timeout https://cdn-creatives-akamaistls-pr...ontent.com/impact/11017/blue_test_trailer.mp4
    E/MediaPlayerNative: stop called in state 4, mPlayer(0x7a020c65dd10)
    E/MediaPlayerNative: error (-38, 0)

    This is true for both the emulator and physical devices with different versions of Android.
    Internet access permissions are specified in the manifest.

    UnityAds version:4.6.0

    If the GDPR button is clicked to open the agreement, test ads can be displayed, but without calling onUnityAdsShowComplete.

    What could be causing this strange behaviour?


    UPD:
    The problem was solved if initialization was called not in test mode.
    That is
    Code (CSharp):
    1. UnityAds.initialize(_activity, _unity_game_ID, false , _initialization_listener);
    Hope this bug will be fixed in the future.
     
    Last edited: Mar 12, 2023
  2. SamOYUnity3D

    SamOYUnity3D

    Unity Technologies

    Joined:
    May 12, 2019
    Posts:
    626
    The issue you encountered may be due to the failure to download test ad videos, which could be caused by unstable server status or network issues. We will strive to improve the stability of our services to ensure that your ads can be displayed properly. If you have any other questions or concerns, please do not hesitate to contact us and we will do our best to assist you as soon as possible.