Search Unity

UnityAds Error Logs And Not Giving Reward After Watching Rewarded Ad Video

Discussion in 'Unity Ads & User Acquisition' started by AtillaTheDev, Nov 16, 2020.

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

    AtillaTheDev

    Joined:
    Apr 30, 2020
    Posts:
    10
    Hello everyone,

    I am using Unity Ads in my Android game, which is not published yet. I am using Rewarded video and Banner ad placements as test mode open. I built game APK and installed on my phone (XIAOMI Redmi 5 plus). I connected my phone to my PC, and used Android LogCat. When I click on rewarded ads in my game on the phone, the log records in this link comes:

    https://paste.ubuntu.com/p/Cq6gMk5qZg/

    As you can see, there are error logs in lines 5-13. But test video ad displays and after video finishes, it gives the reward as I wrote in my script. Every thing seems fine.

    However, there is another problem: Rarely, I watch the rewarded video ad but it does not give the reward. It has happened on some other devices too. Unfortunately I could not catch logs when this problem occured because it did not happen when my phone connected to PC.

    I did search on Google but could not find anything. Does anybody have any idea about the error logs on LogCat and about the second problem I stated?

    Thanks in advance.
     
  2. kyle-unity

    kyle-unity

    Unity Technologies

    Joined:
    Jan 6, 2020
    Posts:
    336
    Those errors in the log you posted look similar to a bug we believe to have fixed in version 3.5.0 of the SDK. Make sure to update to the latest version if you haven't already.

    For your second issue, we would need more information to properly diagnose what's happening. Are you able to post the code you're using with Ads? (A log would be useful too)
     
    AtillaTheDev likes this.
  3. AtillaTheDev

    AtillaTheDev

    Joined:
    Apr 30, 2020
    Posts:
    10
    Version of Advertisement(UnityAds) in my project was 3.4.9 and updated it to 3.5.2 and built a new apk and ERROR LOGS DISAPPEARED :))))

    About not-giving-reward-after-watching-rewarded-ad-video issue, I still could not catch a log when it occurs because it is very rare. I am sharing my script that I use in my project about rewarded ads:
    https://paste.ubuntu.com/p/vwPgWx4Dmf/

    Thanks again.
     
  4. AtillaTheDev

    AtillaTheDev

    Joined:
    Apr 30, 2020
    Posts:
    10
    @kr-unity Hello again,
    At last I have caught a Logcat log about not-giving-reward-after-watching-rewarded-ad-video. It is in the link:
    https://paste.ubuntu.com/p/TpdZ6jjKPt/

    As you can see, there are error logs on lines 17-23.

    By the way, this problem continues on subsequent ad videos and when I exit and restart the game and watch a new rewarded ad video, it gives the reward.
     
    Last edited: Dec 1, 2020
  5. kyle-unity

    kyle-unity

    Unity Technologies

    Joined:
    Jan 6, 2020
    Posts:
    336
    Hmm, that's interesting. Looks like the SDK is trying to reference something that doesn't exist when the ad finishes.

    Are you changing scenes at all right before or after ads are shown? It could be your IUnityAdsListener component is being cleaned up during the scene change, but the SDK is still trying to reference it.
     
    AtillaTheDev likes this.
  6. unity_Y0Ec4trCptbzTA

    unity_Y0Ec4trCptbzTA

    Joined:
    May 23, 2020
    Posts:
    2
    I have the same Problehm! In Editor everything works, the ad is showing and than I get the reward. On Build(Android Phone) I can watch the ad, but don't get the reward!
     
    CreatuRe64 and AtillaTheDev like this.
  7. Klimka13

    Klimka13

    Joined:
    Jul 30, 2019
    Posts:
    5
    So, what is the solution?
    I have the same problem too!

    Player receives the reward in unity editor, but doesn't in build.
    I followed the official unity tutorial to implement rewarded ads.

    What's wrong?
     
    A-AC likes this.
Thread Status:
Not open for further replies.