TheWidlarzGroup / react-native-video

A <Video /> component for react-native

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG]: IMA SDK crash

Ibad9 opened this issue · comments

commented

Version

6.2.0

What platforms are you having the problem on?

iOS

System Version

IOS

On what device are you experiencing the issue?

Real device, Simulator

Architecture

Old architecture

What happened?

I navigated to my video player page and navigated back before the video started playing. It crashes the app on the below lines in RCTVideo.swift

Screenshot 2024-06-13 at 1 42 41 AM

The error is related to it starts loading ad and the player is not there.

On version 6.0.0 the same behaviour don't crash my app but it starts playing audio on other screen when I navigate back.

Reproduction

repository link

Reproduction

Step to reproduce this bug are:

Navigate to video player page having preroll ads navigate back immediately.

That is very strange ... can you please provide the callstack of the crash ?
I don't see good reason for a crash here.
Additionally, a quick and dirty patch could be to wrap this call in a try / catch, but I am afraid:

  • sometimes ads don't display
  • what wil be the side effects afteraward
commented
Screenshot 2024-06-14 at 5 10 09 PM

I am getting this.

OK, thank you for the screenshot, it is clean to me now. Can you please try to re test your issue with this PR: #3911 ?

Fix will be included in 6.3.0

commented

This fixes the crash issue but when I navigate to video page my ad is played even if i navigate back. The player is somehow not removed or cleared.