androidx / androidx/media

[IMA SDK] Crash when no WebView is installed

Open
#795 1 comment 0 reactions 1 assignee View on GitHub

@marcbaechinger is already working on this.

Since Nov 7, 2023.

bug
Dominant language
Java
Stars
3k
Forks
955
Avg merge
12d 14h
Merged PRs (30d)
2

Description

Version

ExoPlayer 2.19.0

More version details

No response

Devices that reproduce the issue

Sony TV: Bravia 4K GB ATV3, Android 8

Devices that do not reproduce the issue

Other Android or AndroidTV devices having WebView installed.

Reproducible in the demo app?

Not tested

Reproduction steps

Play a media with VAST ads

Expected result

The media plays successfully

Actual result

The app crashes with the following stacktrace:

Fatal Exception: android.util.AndroidRuntimeException: android.webkit.WebViewFactory$MissingWebViewPackageException: Failed to load WebView provider: No WebView installed
       at android.webkit.WebViewFactory.getProviderClass(WebViewFactory.java:438)
       at android.webkit.WebViewFactory.getProvider(WebViewFactory.java:211)
       at android.webkit.WebView.getFactory(WebView.java:2467)
       at android.webkit.WebView.ensureProviderCreated(WebView.java:2462)
       at android.webkit.WebView.setOverScrollMode(WebView.java:2527)
       at android.view.View.<init>(View.java:4536)
       at android.view.View.<init>(View.java:4668)
       at android.view.ViewGroup.<init>(ViewGroup.java:597)
       at android.widget.AbsoluteLayout.<init>(AbsoluteLayout.java:55)
       at android.webkit.WebView.<init>(WebView.java:636)
       at android.webkit.WebView.<init>(WebView.java:581)
       at android.webkit.WebView.<init>(WebView.java:564)
       at android.webkit.WebView.<init>(WebView.java:551)
       at android.webkit.WebView.<init>(WebView.java:541)
       at com.google.ads.interactivemedia.v3.internal.aiq.<init>(IMASDK:1)
       at com.google.ads.interactivemedia.v3.api.ImaSdkFactory.createAdsLoader(IMASDK:6)
       at com.google.ads.interactivemedia.v3.api.ImaSdkFactory.createAdsLoader(IMASDK:4)
       at com.google.android.exoplayer2.ext.ima.ImaAdsLoader$DefaultImaFactory.createAdsLoader(ImaAdsLoader.java:784)
       at com.google.android.exoplayer2.ext.ima.AdTagLoader.requestAds(AdTagLoader.java:545)
       at com.google.android.exoplayer2.ext.ima.AdTagLoader.<init>(AdTagLoader.java:281)
       at com.google.android.exoplayer2.ext.ima.ImaAdsLoader.requestAds(ImaAdsLoader.java:478)
       at com.google.android.exoplayer2.ext.ima.ImaAdsLoader.start(ImaAdsLoader.java:566)
       at com.google.android.exoplayer2.source.ads.AdsMediaSource.lambda$prepareSourceInternal$0(AdsMediaSource.java:201)
Media

This crash is reported by Firebase Crashlytics for my app on production, I don't have the associated media but I guess any media having VAST ads will make the app crash on devices having no WebView installed.

Bug Report
  • You will email the zip file produced by adb bugreport to android-media-github@google.com after filing this issue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.