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. Dismiss Notice

Bug Ironsource mediation - RewardedVideoOnAdRewardedEvent not firing

Discussion in 'LevelPlay' started by jjdomain, May 24, 2023.

  1. jjdomain

    jjdomain

    Joined:
    Sep 11, 2015
    Posts:
    86
    I've implemented irsonsource mediation in my app and build to android (google play accouont testing device). Callback events worked previous but stopped working all of a sudden. I then updated to the lastest irsonsource SDK 7.3.0.1 via integration manager and updated all third party networkd adpators. The test rewarded video shows OK but I'm still not getting any callback event when video completes or clicking close ad button. I have no idea why this is happening. The thing is that it was working before and the callback events just stopped working. Please help. Thanks.
     
  2. cnguyen_unitylevelplay

    cnguyen_unitylevelplay

    Unity Technologies

    Joined:
    Mar 23, 2023
    Posts:
    69
  3. jjdomain

    jjdomain

    Joined:
    Sep 11, 2015
    Posts:
    86
    thanks. I am not using the deprecated api. I already submitted support ticket over a week ago...no response.
     
  4. yunanhou

    yunanhou

    Unity Technologies

    Joined:
    Feb 23, 2023
    Posts:
    35
    Thanks, can we know the support ticket number? Just want to make sure we really got it and assist you in quick way.
     
  5. VOXELIUM

    VOXELIUM

    Joined:
    Nov 24, 2022
    Posts:
    37
    When I view Rewarded and close it after view, then the event should be fired Event: RewardedVideoOnAdRewardedEvent
    Is it correct?

    But I am getting call event:
    RewardedVideoOnAdClosedEvent
    Only this event.
    I am not getting event RewardedVideoOnAdRewardedEvent
    Why is this happening?

    So i have ask:
    If was called event RewardedVideoOnAdClosedEvent
    does this mean the view will not be counted?
    Can i reward the user after the call RewardedVideoOnAdClosedEvent ?
     
    Last edited: Aug 10, 2023
  6. cnguyen_unitylevelplay

    cnguyen_unitylevelplay

    Unity Technologies

    Joined:
    Mar 23, 2023
    Posts:
    69
    Hi @VOXELIUM
    Certain networks in the waterfall will fire the reward event before the ad close event. Your project should be able to handle these events asynchronously. Have a look at the knowledge center:
    https://developers.is.com/ironsource-mobile/unity/rewarded-video-integration-unity/#step-2

    Note: The onAdRewardedEvent and onAdClosedEvent are asynchronous. Make sure to set up your listener to grant rewards even in cases where onAdRewardedEvent is fired after the onAdClosedEvent .

    Impressions are counted during a successful onAdOpened event
     
    VOXELIUM likes this.
  7. VOXELIUM

    VOXELIUM

    Joined:
    Nov 24, 2022
    Posts:
    37
    I don't receive events onAdRewardedEvent consistently. It happens sometimes.
    Sometimes even after 20 shows of a Rewarded video I don't get onAdRewardedEvent

    Does this mean that I can just give out a reward after the onAdClosedEvent ?
    Will Ironsource count views?
     
  8. VOXELIUM

    VOXELIUM

    Joined:
    Nov 24, 2022
    Posts:
    37
    The fact is that Ironsource has a comment in the code.
    // The user completed to watch the video, and should be rewarded.
    // The placement parameter will include the reward data.
    void RewardedVideoOnAdRewardedEvent(IronSourcePlacement placement, IronSourceAdInfo adInfo)

    It is also written here
    https://developers.is.com/ironsource-mobile/unity/rewarded-video-integration-unity/#step-2
    Step 3. Reward the User
    The ironSource SDK will fire the onAdRewardedEvent each time the user successfully completes a video.


    Following the instructions, I tried to make a reward exactly after RewardedVideoOnAdRewardedEvent
     
  9. VOXELIUM

    VOXELIUM

    Joined:
    Nov 24, 2022
    Posts:
    37
    This afternoon, during the tests, I saw that sometimes comes only the event onAdRewardedEvent ;)
    sometimes only onAdClosedEvent
    and then both began to come at once o_O

    So it turns out that I have to reward the user and after the event onAdRewardedEvent
    and after the event onAdClosedEvent Depending on who gets called first
    Right?
     
  10. cnguyen_unitylevelplay

    cnguyen_unitylevelplay

    Unity Technologies

    Joined:
    Mar 23, 2023
    Posts:
    69
    Hi @VOXELIUM

    I don't receive events onAdRewardedEvent consistently. It happens sometimes.
    Sometimes even after 20 shows of a Rewarded video I don't get onAdRewardedEvent

    Are there currently many networks in your waterfall? Are each of them confirmed to be configured for Rewarded Video and not Interstitials?

    So it turns out that I have to reward the user and after the event onAdRewardedEvent
    and after the event onAdClosedEvent Depending on who gets called first
    Right?

    Correct. On ad close you can resume your activity, but simultaneously listen for ad reward to make sure the user gets their virtual items (via client side or server to server callback).

    There may also be rare times where a user closes out a rewarded video well before the reward threshold is met (or an ad asset fails to load or just show failures in general), so it should be able to resume gameplay in that scenario too.
     
    VOXELIUM likes this.
  11. VOXELIUM

    VOXELIUM

    Joined:
    Nov 24, 2022
    Posts:
    37
    Thank you for your responses.
    Ironsource tech support by email not responding :mad:

    Now i have 2 network: Unity ADS and Ironsource.
    They configured and for Rewarded Video and for Interstitials?
    Interstitials work good, but with rewarded - problems.

    I organized the awards and after the event onAdRewardedEvent and after the event onAdClosedEvent.
    Then I found that sometimes I don't get any of these events.
    Sometimes I have to watch and close 4-10 rewarded videos before getting one of these events

    Is this a shortcoming of the test mode or will this also happen with real networks? :eek:
     
  12. cnguyen_unitylevelplay

    cnguyen_unitylevelplay

    Unity Technologies

    Joined:
    Mar 23, 2023
    Posts:
    69
    @VOXELIUM
    Please DM me your support ticket number so I can repro your configs on my end
     
  13. VOXELIUM

    VOXELIUM

    Joined:
    Nov 24, 2022
    Posts:
    37
    i sent message to you in PM
     
  14. doarp

    doarp

    Joined:
    Sep 24, 2019
    Posts:
    146
    @cnguyen_unitylevelplay
    if I got the onAdClosedEvent event, but didn't get the onAdRewardedEvent yet, how long am I supposed to wait before I can decide if the user should continue with or without a reward?
    This seems silly, network is a very unpredictable thing - once I have the onAdClosedEvent before getting the onAdRewardedEvent the game enters a limbo state where it's not clear what the message I should present to the user.
     
  15. cnguyen_unitylevelplay

    cnguyen_unitylevelplay

    Unity Technologies

    Joined:
    Mar 23, 2023
    Posts:
    69
    @doarp
    The onAdRewardedEvent should generally be instantaneous once the ad reaches it's reward threshold (different per network) which is usually reaching the the end or close to the end of the opt in ad. Which is why its best to consider it an asynchronous event:

    https://developers.is.com/ironsource-mobile/android/rewarded-video-integration-android/#step-3

    If there is wait of more than 300ms (client side callback or server side callback) it could be due to a network quality issue.

    If you would like our team to have a look and test your app configuration, please open a support ticket:
    https://ironsrc.formtitan.com/knowledge-center?fld48=#/
     
  16. VOXELIUM

    VOXELIUM

    Joined:
    Nov 24, 2022
    Posts:
    37
    I found the cause of the problem.
    It lies in the fact that when the Rewarded ad ends, Unity starts the scene again, on which the Rewarded code is located. This will turn the X2 button back on. Treated as if there were no Rewarded Video view or close callbacks.

    I solved it.
    After watching the rewarded video, I send the player to a new canvas that no longer has the X2 button.
    It would be nice if you added this important information to your Unity documentation.