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

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.

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)

1 Like

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.

@kyle-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.

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.

1 Like

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!

2 Likes

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?

1 Like