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] [Android] Ads Not Displayed on Android #117

Open
jakubjuraszek opened this issue Jan 17, 2025 · 0 comments
Open

[BUG] [Android] Ads Not Displayed on Android #117

jakubjuraszek opened this issue Jan 17, 2025 · 0 comments
Labels
needs-grooming Has not been reviewed by codeowners for scope/validation

Comments

@jakubjuraszek
Copy link

jakubjuraszek commented Jan 17, 2025

Describe the bug
On Android, pre-roll ads do not play. Instead, the following error is returned:
Ad Error: VAST media file loading reached a timeout of 8 seconds. Code: 402, AdErrorCode: 20402

To Reproduce
Use the following configuration in a React Native project with the JWPlayer React Native SDK:

const jwConfig = {
  license: 'JWP_LICENSE',
  preload: 'auto',
  autostart: true,
  title: 'Single Inline Linear Preroll',
  playlist: [
    {
      title: 'Single Inline Linear Preroll',
      file: 'https://content.bitsontherun.com/videos/q1fx20VZ-52qL9xLP.mp4',
      adschedule: {
        adBreak1: {
          offset: 'pre',
          ad: {
            source: 'googima',
            tag: 'https://video.doubleverify.com/tester/fixtures/vast/vast3.xml',
          },
        },
      },
    },
  ],
  advertising: {
    client: 'googima',
  },
};

build.gradle:

buildscript {
    ext {
        buildToolsVersion = "34.0.0"
        minSdkVersion = 21
        compileSdkVersion = 34
        targetSdkVersion = 34
        ndkVersion = "25.1.8937393"
        kotlinVersion = "1.8.0"
        RNJWPlayerUseGoogleIMA = true
    }
    repositories {
        google()
        mavenCentral()
        maven {
            url 'https://mvn.jwplayer.com/content/repositories/releases/'
        }
    }
    dependencies {
        classpath("com.android.tools.build:gradle")
        classpath("com.facebook.react:react-native-gradle-plugin")
        classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
    }

    allprojects {
    repositories {
        mavenLocal()
        google()
        mavenCentral()
        maven {
            url 'https://mvn.jwplayer.com/content/repositories/releases/'
        }
    }
}
}

apply plugin: "com.facebook.react.rootproject"

Steps to reproduce the behavior:

  1. Use the above configuration in a JWPlayer component.
  2. Run the application on an Android device.
  3. Observe that the pre-roll ad does not display.
  4. Check the logs for the error message:
'[DEBUG] onPlayerAdError:', { error: 'Ad Error: VAST media file loading reached a timeout of 8 seconds.',
  code: 402,
  adErrorCode: 20402,
  message: 'onPlayerAdError' }

Expected behavior
The pre-roll ad should appear before the main video content plays.

Screenshots / Visual evidence
Image

Desktop (please complete the following information):

System:
 OS: macOS 15.2
 CPU: (11) arm64 Apple M3 Pro
 Memory: 456.81 MB / 36.00 GB
 Shell:
   version: "5.9"
   path: /bin/zsh
Binaries:
 Node:
   version: 20.18.1
   path: ~/.nvm/versions/node/v20.18.1/bin/node
 Yarn:
   version: 4.5.3
   path: ~/.nvm/versions/node/v20.18.1/bin/yarn
 npm:
   version: 10.8.2
   path: ~/.nvm/versions/node/v20.18.1/bin/npm
 Watchman:
   version: 2024.12.02.00
   path: /opt/homebrew/bin/watchman
Managers:
 CocoaPods:
   version: 1.15.2
   path: /Users/jakubjuraszek/.rbenv/shims/pod
SDKs:
 iOS SDK:
   Platforms:
     - DriverKit 24.2
     - iOS 18.2
     - macOS 15.2
     - tvOS 18.2
     - visionOS 2.2
     - watchOS 11.2
 Android SDK: Not Found
IDEs:
 Android Studio: 2024.2 AI-242.23339.11.2421.12550806
 Xcode:
   version: 16.2/16C5032a
   path: /usr/bin/xcodebuild
Languages:
 Java:
   version: 17.0.13
   path: /opt/homebrew/opt/openjdk@17/bin/javac
 Ruby:
   version: 3.0.2
   path: /Users/jakubjuraszek/.rbenv/shims/ruby
npmPackages:
 "@react-native-community/cli": Not Found
 react:
   installed: 18.2.0
   wanted: 18.2.0
 react-native:
   installed: 0.73.8
   wanted: 0.73.8
 react-native-macos: Not Found
npmGlobalPackages:
 "*react-native*": Not Found
Android:
 hermesEnabled: true
 newArchEnabled: false
iOS:
 hermesEnabled: Not found
 newArchEnabled: false

Device(s) affected

  • Device: any Android device, e.g. Samsung S20FE, Pixel 9 PRO XL
  • OS: e.g. Android 12, 15

Additional context
To reproduce the issue exactly as described, a ready-to-use repository is available at: https://github.com/jakubjuraszek/jwplayer-ads-issue
The vastTag and video used in the example are standard test assets. Substituting other valid tags and videos results in the same behavior.

@jakubjuraszek jakubjuraszek added the needs-grooming Has not been reviewed by codeowners for scope/validation label Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-grooming Has not been reviewed by codeowners for scope/validation
Projects
None yet
Development

No branches or pull requests

1 participant