Skip to content

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

@syed-tp

Description

@syed-tp

Version

6.19.1

Platforms

Android

System Version

  • Host: macOS 26.2
  • Android SDK: compileSdkVersion 36, targetSdkVersion 36

Device

Build-time issue (no physical device required)

Architecture

New architecture enabled (newArchEnabled=true, using interop layer)


Description

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 where lint is enforced.


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.


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 or handled in a way that satisfies lint thread expectations.


Environment

  • react-native: 0.85.0
  • react: 19.2.3
  • react-native-video: 6.19.1
  • Gradle: 9.3.1
  • Java: 17.0.16
  • newArchEnabled: true
  • hermesEnabled: true

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    To Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions