googleads / videojs-ima

IMA SDK Plugin for Video.js
Apache License 2.0
450 stars 284 forks source link

caught TypeError: Cannot read properties of undefined (reading 'onPlayerVolumeChanged') #1091

Closed spormeon closed 1 year ago

spormeon commented 1 year ago

I'm seeing this error randomly, its not constant. When it happpens it stops the ds/player from working and throws me a "black" screen of doom:

source is this: , a.prototype.onPlayerVolumeChanged = function(t) { this.adUi.onPlayerVolumeChanged(t), this.sdkImpl.onPlayerVolumeChanged(t) }

Adysis_Video_Demo

Kiro705 commented 1 year ago

Hello @spormeon ,

I think this may be a case where 'Controller.prototype.onPlayerVolumeChanged()' is being called before there is either an 'adUi' or 'sdkImpl' created. I can look into a fix for this, but it should be straightforward to check if these classes are created before making a call to 'onPlayerVolumeChanged()', if you wanted to create a fix in your own app.

Thank you, Jackson IMA SDK team

spormeon commented 1 year ago

will a test page help you? i can send on email or DM

Kiro705 commented 1 year ago

Hello @spormeon ,

Possibly, do you have a test case that reproduces the issue 100% of the time? You can email more info to jsui@google.com.

Thank you, Jackson IMA SDK team

spormeon commented 1 year ago

emailed it to you

Kiro705 commented 1 year ago

Hello @spormeon ,

Thank you for sharing the test page. Testing ~30 times, I did see the player stall with a black screen once. However, I did not see an error thrown related to:

a.prototype.onPlayerVolumeChanged = function(t) {
  this.adUi.onPlayerVolumeChanged(t),
  this.sdkImpl.onPlayerVolumeChanged(t)
}

If you could capture the VAST, or VAST url that triggers the error 100% of the time, that may be the best way to proceed.

Thank you, Jackson IMA SDK team

spormeon commented 1 year ago

i might of got rid of the volumechnage errors by some tweaks i pushed live the othe day, I'll test it and see if it come back

Kiro705 commented 1 year ago

Hello @spormeon ,

Any updates on being able to reproduce this issue?

Thank you, Jackson IMA SDK team