MoPub/Facebook Crash in WebView


#1

Hello,

Since updating our App to the latest version of MoPub and releasing this update, we’ve seen a sharp rise in the number of crashes which seem to come from MoPub/Facebook Audience Network, this only seems to affect Android 5.0 devices. We’ve had our own QA attempt to recreate the issue in-house with no success but I’ve included the details from the google play console crashes below.

Looking at the callstack we’re wondering if it’s an issue between 32/64 bit integration of WebView on devices where vendors can upgrade the device to 64-bit? We’re basing this off comments from this post (https://bugs.chromium.org/p/chromium/issues/detail?id=559720))

Any help would be appreciated, let me know if any addition information is needed.

MoPub SDK Version:

MoPub SDK Version: 5.5.0
Facebook Audience Network Version: 5.1.0
Up to date according to the MoPub SDK Manager, newer versions of the Facebook Audience Network are available (https://developers.facebook.com/docs/audience-network/download/#unity)

Device model and OS Version:

Android 5.0

Selfie (S455)
TB3-710F (TB3-710F)
LG K10 (m23g)
Canvas Spark (Q380)
Blade V6 (P635A20)
8079 (Pixi3-10_WiFi)
TAB 2 A10 (A10-70L)
LG Max (v10)

Unity Version:

2017.4.18f1

Evidence:

java.lang.Error: FATAL EXCEPTION [Thread-2235]
Unity version     : 2017.4.18f1
Device model      : positivo S455
Device fingerprint: Positivo/S455/S455:5.0.2/LRX22G/UOBO2016060101:user/release-keys
Caused by
  at dalvik.system.VMRuntime.getInstructionSet (VMRuntime.java:324)
  at dalvik.system.VMRuntime.is64BitAbi (VMRuntime.java:337)
  at android.webkit.WebViewFactory.getWebViewNativeLibraryPaths (WebViewFactory.java:273)
  at android.webkit.WebViewFactory.loadNativeLibrary (WebViewFactory.java:384)
  at android.webkit.WebViewFactory.getProvider (WebViewFactory.java:95)
  at android.webkit.WebView.getFactory (WebView.java:2266)
  at android.webkit.WebView.ensureProviderCreated (WebView.java:2261)
  at android.webkit.WebView.setOverScrollMode (WebView.java:2320)
  at android.view.View.<init> (View.java:3618)
  at android.view.View.<init> (View.java:3715)
  at android.view.ViewGroup.<init> (ViewGroup.java:513)
  at android.widget.AbsoluteLayout.<init> (AbsoluteLayout.java:55)
  at android.webkit.WebView.<init> (WebView.java:565)
  at android.webkit.WebView.<init> (WebView.java:510)
  at android.webkit.WebView.<init> (WebView.java:493)
  at android.webkit.WebView.<init> (WebView.java:480)
  at android.webkit.WebView.<init> (WebView.java:470)
  at com.facebook.ads.internal.n.d.b (Unknown Source)
  at com.facebook.ads.internal.n.d.a (Unknown Source)
  at com.facebook.ads.internal.n.d.a (Unknown Source)
  at com.facebook.ads.BidderTokenProvider.getBidderToken (Unknown Source)
  at com.mopub.mobileads.FacebookAdapterConfiguration$1.run (FacebookAdapterConfiguration.java:90)
  at java.lang.Thread.run (Thread.java:818)

#2

Also seeing a similar call stacks to the one above, only affecting Android 5.0 and 5.1 devices, see the device list below

HM Note 2 (hermes)
LG K10 (m23g)
TB3-710F (TB3-710F)
8079 (Pixi3-10_WiFi)
TAB 2 A10 (A10-70L)
Selfie (S455)
Galaxy Tab A6 (gtexswifi)
TAB 2 A7-10F (Tab2A7-10F)
Blade V6 (P635A20)
LG Prime Plus 4G (mc90ds)
Moto G (1st Gen)
P10C
LG G4 Stylus (mp1s3gds)
TAB 2 A10 (A10-70F)
LG K5 (d3)

Unity version     : 2017.4.18f1
Device model      : TCL 8080
Device fingerprint: TCL/8080/Pixi3-10_WiFi:5.0.1/LRX21M/vE62-0:user/release-keys
Caused by
  at android.webkit.WebViewFactory.getFactoryClass (WebViewFactory.java:161)
  at android.webkit.WebViewFactory.getProvider (WebViewFactory.java:101)
  at android.webkit.WebView.getFactory (WebView.java:2271)
  at android.webkit.WebView.ensureProviderCreated (WebView.java:2266)
  at android.webkit.WebView.setOverScrollMode (WebView.java:2325)
  at android.view.View.<init> (View.java:3623)
  at android.view.View.<init> (View.java:3720)
  at android.view.ViewGroup.<init> (ViewGroup.java:518)
  at android.widget.AbsoluteLayout.<init> (AbsoluteLayout.java:55)
  at android.webkit.WebView.<init> (WebView.java:570)
  at android.webkit.WebView.<init> (WebView.java:515)
  at android.webkit.WebView.<init> (WebView.java:498)
  at android.webkit.WebView.<init> (WebView.java:485)
  at android.webkit.WebView.<init> (WebView.java:475)
  at com.facebook.ads.internal.n.d.b (Unknown Source)
  at com.facebook.ads.internal.n.d.a (Unknown Source)
  at com.facebook.ads.internal.n.d.a (Unknown Source)
  at com.facebook.ads.BidderTokenProvider.getBidderToken (Unknown Source)
  at com.mopub.mobileads.FacebookAdapterConfiguration$1.run (FacebookAdapterConfiguration.java:90)
  at java.lang.Thread.run (Thread.java:818)
Caused by: android.content.pm.PackageManager$NameNotFoundException: 
  at android.app.ApplicationPackageManager.getPackageInfo (ApplicationPackageManager.java:119)
  at android.webkit.WebViewFactory.getFactoryClass (WebViewFactory.java:133)```

#3

The technical team confirmed that this crash was fixed in the latest FB adapters (v5.1.0.2). If you update to the latest adapters you should be fine.

Let us know if otherwise.

Many thanks!


#4

Hey @codinami,

We are currently on the latest mopub facebook adapters, see below

<androidPackage spec="com.mopub.mediation:facebookaudiencenetwork:5.1.0.2"/>
<androidPackage spec="com.facebook.android:audience-network-sdk:5.1.0"/>

MoPub SDK Manager in Unity still states 1.02 as the latest so there isn’t a newer version available.

Anything else I can try?

Also does the technical team have reproduction steps for this issue? We’ve not been able to recreate it in-house and it would be nice to confirm a fix before releasing a new version.


#5

Hi, can you confirm if you are seeing exactly this?

If that is the case, we are not able to help since it would be an Android bug.


#6

We’re not seeing the above, both examples of the crashes (now have reports total of 598 and 129) are contained in the calls stacks provided which begin with the MoPub FacebookAdapterConfiguration.

We hadn’t seen either of these issues until we updated to the latest version.
MoPub 5.5.0
Facebook Audience Network 5.1.0 (com.facebook.android.audience-network-sdk-5.1.0.aar)
MoPub Facebook Adapter 5.1.0.2 (com.mopub.mediation.facebookaudiencenetwork-5.1.0.2.jar)

Facebook seem to indicated they’ve fixed a similar issue in their Audience Network SDK version 5.1.2 (https://developers.facebook.com/docs/audience-network/changelog-android#5_1_2)

We’re going to try updating to that version but again without reproduction steps it’s impossible to say whether this will fix the issue.

We’ve noticed that there is a new version of the Audience Network SDK out (version 5.2.0) when are MoPub looking to update to this on Unity?

Thanks.