Search Unity

Game is blocked if we hide it after ads start

Discussion in 'Unity Ads & User Acquisition' started by DeuS, Apr 22, 2021.

Thread Status:
Not open for further replies.
  1. DeuS

    DeuS

    Joined:
    Feb 8, 2013
    Posts:
    24
    Unity ads version 3.7.1. In test mode.
    When we press ads button and immediatly hide game(so device is locked). Unlocked it and return to game we see black screen and can't exit from it, ads not showing.

    When we pressed button we get logs that the advertisement is being opened:
    Code (CSharp):
    1. com.unity3d.services.ads.UnityAdsImplementation.show() (line:241) :: Unity Ads opening new ad unit for placement buySoft
    2. com.unity3d.services.core.api.Sdk.logInfo() (line:84) :: Opening performance ad unit with orientation PORTRAIT, hardware acceleration enabled
    We we unblock device and return to game, we not received any callback(OnApplicationPause, UnityAds) and have black ads screen(we can't exit from it):


    If we wait until ads appear and only then hide the application we get same logcat logs. Except when we return we start getting other unity ads log and all works:
    Code (CSharp):
    1. com.unity3d.services.core.api.Sdk.logInfo() (line:84) :: Requesting ad plan from...
    2. com.unity3d.services.core.api.Sdk.logInfo() (line:84) :: AdPlan received with 1 campaigns and refreshDelay 0
    3. com.unity3d.services.core.api.Sdk.logInfo() (line:84) :: Unity Ads event: sending start event to...
    4. com.unity3d.services.core.api.Sdk.logInfo() (line:84) :: Unity Ads event: sending first_quartile event to
    We also get spamming error:
    Code (CSharp):
    1. Info chromium [INFO:CONSOLE(390)] "Uncaught (in promise) ACCELEROMETER_DATA_NOT_AVAILABLE", source: file:///storage/emulated/0/Android/data/com.sdfadsfasf/cache/UnityAdsCache/UnityAdsWebApp.html?platform=android&origin=https%3A%2F%2Fwebview.unityads.unity3d.com%2Fwebview%2F3.7.0%2F150de2222dbb31824b390e22a88e78b6028b3f22%2Frelease%2Findex.html&version=150de2222dbb31824b390e22a88e78b6028b3f22 (390)
    2. Debug WebView evaluateJavascript=javascript:window.nativebridge.handleCallback([["358","ERROR",["ACCELEROMETER_DATA_NOT_AVAILABLE"]]]);
    But it exist in both cases, so it should not be a problem.
     
  2. kyle-unity

    kyle-unity

    Unity Technologies

    Joined:
    Jan 6, 2020
    Posts:
    336
    Which version of Unity are you building with? We've had some similar black screen reports recently and the common factor seems to be Unity 2020.3. Our engineers are currently investigating further.
     
  3. DeuS

    DeuS

    Joined:
    Feb 8, 2013
    Posts:
    24
    Unity 2020.2.5f1
     
  4. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    @DeuS

    Thanks for reporting this issue. We don't currently have a workaround for it, but we are working to get this fixed in a future version. I apologize for the inconvenience.
     
Thread Status:
Not open for further replies.