bugsnag / bugsnag-react-native

Error monitoring and reporting tool for native exceptions and JS errors in React Native apps
https://docs.bugsnag.com/platforms/react-native
MIT License
370 stars 121 forks source link

Weird crash from test runners #410

Closed cristianoccazinsp closed 5 years ago

cristianoccazinsp commented 5 years ago

Description

Bugsnag just reported an error from Google's test runner from bugsnag itself (the irony). See log below

Issue

Crash Log

java.lang.UnsatisfiedLinkError dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/data/app/com.google.android.apps.appcrawler.appexplorer-1/base.apk", zip file "/data/app/com.zinspector3-1/base.apk"],nativeLibraryDirectories=[/data/app/com.google.android.apps.appcrawler.appexplorer-1/lib/x86, /data/app/com.zinspector3-1/lib/x86, /vendor/lib, /system/lib]]] couldn't find "libbugsnag-plugin-android-anr.so" 
    Runtime.java:367 java.lang.Runtime.loadLibrary
    System.java:1076 java.lang.System.loadLibrary
    AnrPlugin.kt:12 com.bugsnag.android.AnrPlugin.initialisePlugin
    BugsnagPluginInterface.kt:20 com.bugsnag.android.BugsnagPluginInterface.loadPlugins
    Client.java:282 com.bugsnag.android.Client.loadPlugins
    Client.java:259 com.bugsnag.android.Client.<init>
    Bugsnag.java:77 com.bugsnag.android.Bugsnag.init
    BugsnagReactNative.java:76 com.bugsnag.BugsnagReactNative.startWithConfiguration
    MainApplication.java:67 com.zinspector3.MainApplication.onCreate
    Instrumentation.java:1013 android.app.Instrumentation.callApplicationOnCreate
    MonitoringInstrumentation.java:421 androidx.test.runner.MonitoringInstrumentation.callApplicationOnCreate
    ActivityThread.java:4707 android.app.ActivityThread.handleBindApplication
    ActivityThread.java:-1 android.app.ActivityThread.-wrap1
    ActivityThread.java:1405 android.app.ActivityThread$H.handleMessage
    Handler.java:102 android.os.Handler.dispatchMessage
    Looper.java:148 android.os.Looper.loop
    ActivityThread.java:5417 android.app.ActivityThread.main
    Method.java:-2 java.lang.reflect.Method.invoke
    ZygoteInit.java:726 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
    ZygoteInit.java:616 com.android.internal.os.ZygoteInit.main

Device from the log:

batteryLevel
0.9
brand
generic
charging
true
cpuAbi
[
  "x86",
  "armeabi-v7a",
  "armeabi"
]
dpi
160
emulator
true
freeDisk
3120316416
freeMemory
196955176
id
e74ce67f-b43b-4e54-804f-0d0f82672ce4
jailbroken
true
locale
en_US
locationStatus
allowed
manufacturer
unknown
model
WindsongAOB
networkAccess
cellular
orientation
portrait
osName
android
osVersion
6.0.1
runtimeVersions
{
  "osBuild": "calypso-eng 6.0.1 MMB30Y eng.cover.20180905.174025 test-keys",
  "androidApiLevel": "23"
}
screenDensity
1
screenResolution
1232x720
time
2019-09-30T22:40:53.000Z
totalMemory
201326592

Environment

Library versions:

RN: 0.60.5
Bugsnag: 2.23.2

I don't really know where is this coming from, all I have is bugsnag's info itself. But looking at the crash, looks like a bugsnag unhandled case.

mattdyoung commented 5 years ago

Hi @cristianoccazinsp

This looks suspiciously similar to the first case mentioned here: https://github.com/bugsnag/bugsnag-react-native/issues/369#issuecomment-517284896 (it's a different Bugsnag lib that it's struggling to find but the root cause could be the same).

In that case the error was due to side-loading an APK split generated from an App Bundle which was the wrong architecture for the device.

Is it possible the APK you're testing with is the wrong architecture for the device?

If you think there may be a different cause it would be useful if you could write into support@bugsnag.com with details of your account and a link to the error in your Bugsnag dashboard so we can analyze the error report in more detail.

Thanks!

cristianoccazinsp commented 5 years ago

That is the main issue, we don't know who loaded the APK, but it most likely came from Google's auto testing when an app is published.

Since it didn't come from a real user I'm not too worries about the issue, but perhaps it was useful for you guys.

El mar., 1 de octubre de 2019 10:47, Matt Young notifications@github.com escribió:

Hi @cristianoccazinsp https://github.com/cristianoccazinsp

This looks suspiciously similar to the first case mentioned here:

369 (comment)

https://github.com/bugsnag/bugsnag-react-native/issues/369#issuecomment-517284896 (it's a different Bugsnag lib that it's struggling to find but the root cause could be the same).

In that case the error was due to side-loading an APK split generated from an App Bundle which was the wrong architecture for the device.

Is it possible the APK you're testing with is the wrong architecture for the device?

If you think there may be a different cause it would be useful if you could write into support@bugsnag.com with details of your account and a link to the error in your Bugsnag dashboard so we can analyze the error report in more detail.

Thanks!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bugsnag/bugsnag-react-native/issues/410?email_source=notifications&email_token=ALU263HNQIROCL2CNKC2U7TQMNIIDA5CNFSM4I4BXIAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEABKKRI#issuecomment-537044293, or mute the thread https://github.com/notifications/unsubscribe-auth/ALU263CNF3KNUJIPP7HMJ33QMNIIDANCNFSM4I4BXIAA .

mattdyoung commented 5 years ago

We believe it's probably some issue with the wrong APK/bundle being loaded for that device, or something specific to the Google sandbox emulator.

We don't think it's likely to affect real users who've downloaded apps via official channels.

Really appreciate the report but I think in this case we'll close as I don't think Bugsnag is ultimately the cause.

Thanks!

mattdyoung commented 5 years ago

@cristianoccazinsp Note that we've recently found some other possible reasons for linkage errors like this. Please see our guidance here: https://github.com/bugsnag/bugsnag-react-native/issues/369#issuecomment-541596996