TheWidlarzGroup/react-native-video

[BUG]: Android lint fails in :react-native-video:lintDebug with WrongThread at ReactExoplayerView.java:1616

Open

#4 885 ouverte le 10 avr. 2026

Voir sur GitHub
 (1 commentaire) (0 réactions) (0 assignés)Kotlin (3 027 forks)batch import
Missing ReproNewer Version AvailablePlatform: AndroidV6bugdifficulty: easygood first issuepriority: lowtriaged

Métriques du dépôt

Stars
 (7 677 stars)
Métriques de merge PR
 (Merge moyen 2j 3h) (11 PRs mergées en 30 j)

Description

What happened?

Running Android lint on the react-native-video module fails with a WrongThread error.

Lint reports that getVideoTrackInfoFromManifest must be called from a worker thread, but it is currently inferred to be running on the UI thread. This causes the lint task to fail and blocks builds (and CI pipelines) where lint is enforced.

Actual result - Lint fails with the following error:

Execution failed for task ':react-native-video:lintDebug'.
> Lint found errors in the project; aborting build.

.../node_modules/react-native-video/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java:1616:
Error: Method getVideoTrackInfoFromManifest must be called from the worker thread, currently inferred thread is UI thread [WrongThread]
    return this.getVideoTrackInfoFromManifest(0);

Expected result - Android lint should pass without errors, or the method should be annotated / handled in a way that satisfies lint thread expectations.

Additional notes

  • This issue occurs during lint execution and blocks CI/build pipelines that enforce lint checks.
  • Likely related to missing or incorrect thread annotations in ReactExoplayerView.

Environment details

  • react-native: 0.85.0
  • react: 19.2.3
  • Gradle: 9.3.1
  • Java: 17.0.16
  • Host: macOS 26.2
  • Android SDK: compileSdkVersion 36, targetSdkVersion 36
  • newArchEnabled: true (using interop layer)
  • hermesEnabled: true

Steps to reproduce

  1. Create a new React Native project: npx @react-native-community/cli@latest init MyApp
  2. Install the dependency: npm install react-native-video@6.19.1
  3. Run lint on the library module: cd android && ./gradlew :react-native-video:lintDebug (./gradlew build also fails, because it includes lint tasks).
  4. Observe the failure.

Reproduction repository

No response

react-native-video version

6.19.1

react-native version

0.85.0

react-native-nitro-modules version

No response

Platforms

Android

OS version

Android SDK compileSdkVersion 36, targetSdkVersion 36 (build host: macOS 26.2)

Device

No response

Architecture

New Architecture

Expo

No (bare / React Native CLI)

Last working version

No response

Media / source type

No response

Guide contributeur