TheWidlarzGroup / react-native-video

A <Video /> component for react-native
http://thewidlarzgroup.github.io/react-native-video/
MIT License
7.15k stars 2.88k forks source link

[BUG]: ExoPlaybackException: ERROR_CODE_FAILED_RUNTIME_CHECK #3858

Closed quangtuan28200 closed 3 weeks ago

quangtuan28200 commented 4 months ago

Version

6.1.2

What platforms are you having the problem on?

Android

Architecture

Old architecture

What happened?

when video play i got this error:

{ "errorStackTrace": "androidx.media3.exoplayer.ExoPlaybackException: Unexpected runtime error\n\tat androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:668)\n\tat android.os.Handler.dispatchMessage(Handler.java:103)\n\tat android.os.Looper.loop(Looper.java:213)\n\tat android.os.HandlerThread.run(HandlerThread.java:67)\nCaused by: java.lang.IllegalArgumentException\n\tat android.media.MediaCodec.native_setSurface(Native Method)\n\tat android.media.MediaCodec.setOutputSurface(MediaCodec.java:2042)\n\tat androidx.media3.exoplayer.mediacodec.SynchronousMediaCodecAdapter.setOutputSurface(SynchronousMediaCodecAdapter.java:191)\n\tat androidx.media3.exoplayer.video.MediaCodecVideoRenderer.setOutputSurfaceV23(MediaCodecVideoRenderer.java:1723)\n\tat androidx.media3.exoplayer.video.MediaCodecVideoRenderer.setOutput(MediaCodecVideoRenderer.java:736)\n\tat androidx.media3.exoplayer.video.MediaCodecVideoRenderer.handleMessage(MediaCodecVideoRenderer.java:661)\n\tat androidx.media3.exoplayer.ExoPlayerImplInternal.deliverMessage(ExoPlayerImplInternal.java:1626)\n\tat androidx.media3.exoplayer.ExoPlayerImplInternal.sendMessageToTarget(ExoPlayerImplInternal.java:1590)\n\tat androidx.media3.exoplayer.ExoPlayerImplInternal.sendMessageInternal(ExoPlayerImplInternal.java:1565)\n\tat androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:553)\n\t... 3 more\n", "errorCode": "21004", "errorException": "androidx.media3.exoplayer.ExoPlaybackException: Unexpected runtime error", "errorString": "ExoPlaybackException: ERROR_CODE_FAILED_RUNTIME_CHECK" }

Reproduction

repository link

Reproduction

can't reproduction, It happens occasionally

freeboub commented 4 months ago

Any way to reproduce the issue ? Is it reproduced on last 6.X ?

quangtuan28200 commented 4 months ago

unfortunately no, i can't reproduce it, it happens randomly once every few days, i'm on the latest version 6.1.2

freeboub commented 4 months ago

Last question, are you able to identify if it is device specific, or it happens on any device ?

quangtuan28200 commented 4 months ago

currently, the problem occurs when I debug on huwei p30 device, it hasn't released yet so I'm not sure if it happens on other devices or not

freeboub commented 4 months ago

Ok, clear, and do you use drm or useTextureView prop ?

quangtuan28200 commented 4 months ago

yes, i use

useTextureView={true}
shutterColor='#fff'
hideShutterView={true}
freeboub commented 4 months ago

yes, i use

useTextureView={true}
shutterColor='#fff'
hideShutterView={true}

Great, it would make sense to try with useTextureView={false} !

quangtuan28200 commented 4 months ago

ok, thanks, i'lll try

freeboub commented 3 months ago

@quangtuan28200 any update ?

quangtuan28200 commented 3 months ago

Oh sorry, I just tried it, when I set useTextureView = false, there is a black layer before the video is played, it happens fast and causes flickering, I'm not sure that useTextureView=false solves the problem but I can't let that flickering happen

quangtuan28200 commented 3 months ago

I'll try the release and see if it happens to the user or just happens when debugging. I'll let you know if there's any further information

freeboub commented 3 months ago

Thank you for the feedback, I understand your point, but regarding to the original issue, I would like to know if it fix it ... I understand you cannot use it, but during your developments, can you try to keep useTextureView={false} to see if it fixes the initial issue ? And let see the blink afterward ! Thank you for the fast feedback

github-actions[bot] commented 1 month ago

This issue is stale because it has been open for 30 days with no activity. If there won't be any activity in the next 14 days, this issue will be closed automatically.

github-actions[bot] commented 3 weeks ago

This issue was closed because it has been inactive for 14 days since being marked as stale.