Reputation: 1477
I have seen lots of crashes in the app with the message used as title here. Almost all of the crashes are on OnePlus devices and most of them are on the version of Oxygen OS forked from Android Oreo. Has anyone else seen this? The following is the stack trace:
java.lang.RuntimeException: Package not found: com.android.chrome
at android.webkit.WebViewDelegate.getPackageId(WebViewDelegate.java:164)
at com.android.webview.chromium.ig.L(WebViewDelegateFactory.java:16)
at com.android.webview.chromium.WebViewChromiumFactoryProvider.h(WebViewChromiumFactoryProvider.java:177)
at com.android.webview.chromium.se.run(WebViewChromiumFactoryProvider.java:5)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6809)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Edit: 18th Feb, 2018:
We received our team's One Plus 5T(OnePlus A5010) a few weeks back and did not see any issue while running our app. The device came preloaded with the OxygenOS fork of Android 7.0. However, today the device received the Android 8.0.0(OxygenOS 5.0.3) update notification and after successfully installing the update, our app is crashing with the same stack trace. This crash is horribly affecting our user base. Any help will be appreciated.
Upvotes: 24
Views: 7541
Reputation: 418
Do you happen to use Facebook Audience Network SDK in your app? Ran into the same crash and it seems that the crash is directly related to FAN SDK (using 4.27.1). When the app tries to show an Ad from FAN it crashes sometimes (only on OnePlus devices so far).
This is not 100% confirmed yet but might help.
Edit: It might be related to any other Ad network SDK, many of these use WebView to show the Ad. In this case, FAN SDK is invoked only as a fallback if there is something wrong with AdMob. It can easily happen that it'd crash AdMob as well but that SDK handles it while FAN doesn't.
Upvotes: 1
Reputation: 447
WebView is now controlled by Chrome from Nougat. Reference
The solution that worked for me was commenting these lines in AndroidManifest.xml
<meta-data android:name="preloaded_fonts"
android:resource="@array/preloaded_fonts" />
As suggested here
Upvotes: 5
Reputation: 21733
Do you have multiple profiles on your device?
There is a known issue on the Google (Android Enterprise) support forums relating to WebView. It seems like the solution may well apply to your problem.
Summary:
A feature was added in Android Nougat to set the Chrome WebView as the default WebView and disable the Android System WebView app by default
This is a problem when:
What you need to do:
Enable Chrome for each user on the device Or Wait for the Android System WebView app to update to its latest version (updates occur automatically within 24 hours provided the device has a WiFi connection)
Upvotes: 1