Download Android. Sometimes it crashes (rarely)

We have a strange problem with our Android application. We have a very rare accident at Fabric. This is the standard UnsatisfiedLinkError, meaning that the .so library does not load in the static initializer of the Java class. This is what we have found out so far:

  • The problem is very rare. This happens in several hundred devices out of hundreds of thousands or installations.

  • Once this happens, restarting or even reinstalling does not seem to solve the problem.

  • This happens in different brands, such as Sony, Samsung, Huawei.

  • This happens in all versions of Android from 2.3 to 5.x.

  • We managed to catch him once in the office on a Nexus 1 device. When this started to happen, he always failed to call LoadLibrary, even if the same apk worked fine on other devices.

  • When the problem arose, I uninstalled the libv and x86 lib versions and left only armeabi to prevent the loading of the wrong library, but still failed. Re-launching the application through Android studio several times, adding logs still caused a failure in the same place.

  • Then, unexpectedly, without any obvious changes, it started working in Nexus 1 and even after dozens of retries, we again cannot reproduce the problem. The only thing that happened before it started working was that I tried to manually install the damaged apk with the adb installation, which failed, and the next time I downloaded the application through the Android studio, it worked and even worked since. I'm not sure if the failed installation of the corrupt apk somehow cleared something or if it was just a coincidence.

  • , , , armeabi.so lib , . , .

, . Apk , Android Play Store 99,9% , ( ), LoadLibrary , , , , , , , - , Nexus 1, .

, , , .

, , .

+4

Source: https://habr.com/ru/post/1609091/


All Articles