Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: "errorString": "ExoPlaybackException: ERROR_CODE_AUDIO_TRACK_INIT_FAILED"} in android #4329

Open
adilkhan2163 opened this issue Dec 10, 2024 · 1 comment
Labels

Comments

@adilkhan2163
Copy link

Version

"react-native": "0.76.3",     "react-native-video": "^6.8.2",

What platforms are you having the problem on?

Android

System Version

in all android devices

On what device are you experiencing the issue?

Real device

Architecture

New architecture with interop layer

What happened?

A bug happened!
we are using react native video in flatlist when we scroll down (fastly or after some items even slowly) then these video that show this error shows blank screen and after that every video that render after that show blank screen.

Video error: {"error": {"errorCode": "25001", "errorException": "androidx.media3.exoplayer.ExoPlaybackException: MediaCodecAudioRenderer error, index=1, format=Format(2, null, null, audio/mp4a-latm, mp4a.40.5, 32027, und, [-1, -1, -1.0, null], [1, 44100]), format_supported=YES", "errorStackTrace": "androidx.media3.exoplayer.ExoPlaybackException: MediaCodecAudioRenderer error, index=1, format=Format(2, null, null, audio/mp4a-latm, mp4a.40.5, 32027, und, [-1, -1, -1.0, null], [1, 44100]), format_supported=YES
at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:623)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loopOnce(Looper.java:210)
at android.os.Looper.loop(Looper.java:299)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: androidx.media3.exoplayer.audio.AudioSink$InitializationException: AudioTrack init failed 0 Config(44100, 12, 56576) Format(2, null, null, audio/raw, null, -1, und, [-1, -1, -1.0, null], [2, 44100])
at androidx.media3.exoplayer.audio.DefaultAudioSink$Configuration.buildAudioTrack(DefaultAudioSink.java:2198)
at androidx.media3.exoplayer.audio.DefaultAudioSink.buildAudioTrack(DefaultAudioSink.java:1067)
at androidx.media3.exoplayer.audio.DefaultAudioSink.buildAudioTrackWithRetry(DefaultAudioSink.java:1046)
at androidx.media3.exoplayer.audio.DefaultAudioSink.initializeAudioTrack(DefaultAudioSink.java:825)
at androidx.media3.exoplayer.audio.DefaultAudioSink.handleBuffer(DefaultAudioSink.java:924)
at androidx.media3.exoplayer.audio.MediaCodecAudioRenderer.processOutputBuffer(MediaCodecAudioRenderer.java:744)
at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.drainOutputBuffer(MediaCodecRenderer.java:2010)
at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:827)
at androidx.media3.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1112)
at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:544)
... 4 more
Suppressed: androidx.media3.exoplayer.audio.AudioSink$InitializationException: AudioTrack init failed 0 Config(44100, 12, 56576) Format(2, null, null, audio/raw, null, -1, und, [-1, -1, -1.0, null], [2, 44100])
... 14 more
Caused by: java.lang.UnsupportedOperationException: Cannot create AudioTrack
at android.media.AudioTrack$Builder.build(AudioTrack.java:1308)
at androidx.media3.exoplayer.audio.DefaultAudioSink$Configuration.createAudioTrackV29(DefaultAudioSink.java:2245)
at androidx.media3.exoplayer.audio.DefaultAudioSink$Configuration.createAudioTrack(DefaultAudioSink.java:2224)
at androidx.media3.exoplayer.audio.DefaultAudioSink$Configuration.buildAudioTrack(DefaultAudioSink.java:2190)
... 13 more
Caused by: java.lang.UnsupportedOperationException: Cannot create AudioTrack
at android.media.AudioTrack$Builder.build(AudioTrack.java:1308)
at androidx.media3.exoplayer.audio.DefaultAudioSink$Configuration.createAudioTrackV29(DefaultAudioSink.java:2245)
at androidx.media3.exoplayer.audio.DefaultAudioSink$Configuration.createAudioTrack(DefaultAudioSink.java:2224)
at androidx.media3.exoplayer.audio.DefaultAudioSink$Configuration.buildAudioTrack(DefaultAudioSink.java:2190)
... 13 more
", "errorString": "ExoPlaybackException: ERROR_CODE_AUDIO_TRACK_INIT_FAILED"}, "target": 674}

we have tested this bug on old and new versions. But in both cases this error occur

Reproduction Link

repository link

Reproduction

Step to reproduce this bug are:
we are using react native video in flatlist when we scroll down (fastly or after some items even slowly) then these video that show this error shows blank screen and after that every video that render after that show blank screen.

we have tested it on old and new react native versions

Copy link

Thank you for your issue report. Please note that the following information is missing or incomplete:

  • reproduction link

Please update your issue with this information to help us address it more effectively.

Note: issues without complete information have a lower priority

There is a newer version of the library available. You are using version "react, while the latest stable version is native": "0.76.3", "react. Please update to the latest version and check if the issue still exists.

Note: If the issue still exists, please update the issue report with the latest information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant