Skip to content
This repository has been archived by the owner on Nov 22, 2024. It is now read-only.

Exiting Flipper causes app to crash #3026

Open
bizzguy opened this issue Nov 4, 2021 · 17 comments
Open

Exiting Flipper causes app to crash #3026

bizzguy opened this issue Nov 4, 2021 · 17 comments

Comments

@bizzguy
Copy link
Contributor

bizzguy commented Nov 4, 2021

🐛 Bug Report

After exiting Flipper the connected app will crash

To Reproduce

  • Install and start the sample app
  • Start Flipper
  • Do something in the app (i.e. network request)
  • Exit Flipper (Electron / Quit Electron)
  • Wait about 5 seconds and the app crashes

This behavior can be repeated

Environment

Physical Device: Galaxy S9
Android version: 10
Flipper version: 118 (117 also had same problem)

@mweststrate
Copy link
Contributor

Do you have the same symptoms as #2948 @bizzguy?

@shoeguy
Copy link
Contributor

shoeguy commented Nov 11, 2021

My debug log is different:

I/flipper: flipper: FlipperClient::onDisconnected
D/a11y: ...onDisconnect running
A/libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 4849 (FlipperConnecti), pid 32493 (locker.approved)

So does not appear to be the same error, but it can be fixed in the same way: reinstall app or clear app data

When the app restarts, if Flipper is running, things are ok. But if Flipper is not running, the app fails on startup.

@bizzguy
Copy link
Contributor Author

bizzguy commented Nov 11, 2021

@mweststrate

tldr; when Flipper is exited while the app is still running, it updates certificate files in the "files/sonar" directory that prevent the app from starting unless Flipper is also running.

I had some time to debug this issue and I wanted to report on the results. This is based on using the latest SDK (0.119.0) and the corresponding version of Flipper (commit 6bf3a4f - from today)

I used the sample app (by building it from the current commit)

Here is what I found:
 

  • When using Flipper, if you exit Flipper while the app is running, it becomes "marked".  At that point the app will only run if Flipper is running, otherwise it crashes on startup. Also, the app crashes shortly after Flipper is terminated.

  • using the app without Flipper works fine.  You can run and re-start the app as normal

  • using the app with Flipper (where Flipper is always running) works fine.
     
    I took the app through the java debugger and it crashes on "flipperClient.start" in "Application.onCreate".

At that point it calls an NDK method which I was able to step into using the NDK debugger but did not get any useful info from.
 
At that point I examined the data directory for the app.
 
It turns out that when Flipper exits while the app is running, it writes different certificates to the "files/sonar" directory.
 
The app will no longer run without Flipper also running.
 
Deleting the "files/sonar" directory fixes the problem and the app is able to run again (but exiting Flipper while the app is running will cause the same error again).

Here's the "files/sonar" directory:

image

I compared the files from when the app was working and when it wasn't. It appears that when Flipper exits while the app is still running it updates the following files:

app.csr
device.crt
privateKey.pem

The problem appears to be in NDK code so I was unable to get any more detail.

The problem appears for both physical devices and emulators.

For me, this problem started appearing at some point after version 0.91.0.

@mweststrate
Copy link
Contributor

Thanks for the detailed report @bizzguy! We're a bit in the dark still where it is coming from, but we can reproduce it consistently as well.

@lblasa
Copy link
Contributor

lblasa commented Nov 22, 2021

@bizzguy here's a potential workaround to address the crash.

Downgrade the NDK version located in build.gradle found in the project root folder from R23 to R21. It should look something like this:

ext { minSdkVersion = 15 targetSdkVersion = 30 compileSdkVersion = 30 buildToolsVersion = '30.0.2' //ndkVersion = '23.0.7599858' ndkVersion = '21.3.6528147' }

Please ensure that NDK21 is available in your system.

We are still working on the actual solution.

@voxspox
Copy link

voxspox commented Mar 2, 2022

For me the issue was not there with 0.119.0 and is still present in 0.136.0

App crashes during start if flipper is not running.
App crashes shortly after flipper was exited.

Maybe the following logs are helpfull:

> adb catlog
03-02 11:58:49.505  3626  3667 I flipper : flipper: FlipperClient::onDisconnected
03-02 11:58:51.577  3626  3647 F libc    : /buildbot/src/android/ndk-release-r21/external/libcxx/../../external/libcxxabi/src/abort_message.cpp:72: abort_message: assertion "terminating with uncaught exception of type folly::AsyncSocketException: AsyncSocketException: SSL handshake failed, type = SSL error" failed
03-02 11:58:51.577  3626  3647 F libc    : Fatal signal 6 (SIGABRT), code -6 in tid 3647 (FlipperEventBas)
03-02 11:58:51.577  1300  1300 W         : debuggerd: handling request: pid=3626 uid=10107 gid=10107 tid=3647
03-02 11:58:51.682  3709  3709 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
03-02 11:58:51.682  3709  3709 F DEBUG   : Build fingerprint: 'google/sdk_google_phone_x86/generic_x86:7.0/NYC/4409132:user/release-keys'
03-02 11:58:51.682  3709  3709 F DEBUG   : Revision: '0'
03-02 11:58:51.683  3709  3709 F DEBUG   : ABI: 'x86'
03-02 11:58:51.683  3709  3709 F DEBUG   : pid: 3626, tid: 3647, name: FlipperEventBas  >>> com.breazy_health.breazytrack <<<
03-02 11:58:51.683  3709  3709 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
03-02 11:58:51.686  3709  3709 F DEBUG   : Abort message: '/buildbot/src/android/ndk-release-r21/external/libcxx/../../external/libcxxabi/src/abort_message.cpp:72: abort_message: assertion "terminating with uncaught exception of type folly::AsyncSocketException: AsyncSocketException: SSL handshake failed, type = SSL error" failed'
03-02 11:58:51.686  3709  3709 F DEBUG   :     eax 00000000  ebx 00000e2a  ecx 00000e3f  edx 00000006
03-02 11:58:51.686  3709  3709 F DEBUG   :     esi 94666978  edi 94666920
03-02 11:58:51.686  3709  3709 F DEBUG   :     xcs 00000073  xds 0000007b  xes 0000007b  xfs 0000003b  xss 0000007b
03-02 11:58:51.686  3709  3709 F DEBUG   :     eip b1e91424  ebp 94665138  esp 946650dc  flags 00200292
03-02 11:58:51.694  3709  3709 F DEBUG   : 
03-02 11:58:51.694  3709  3709 F DEBUG   : backtrace:
03-02 11:58:51.694  3709  3709 F DEBUG   :     #00 pc ffffe424  [vdso:b1e91000] (__kernel_vsyscall+16)
03-02 11:58:51.694  3709  3709 F DEBUG   :     #01 pc 0007a00c  /system/lib/libc.so (tgkill+28)
03-02 11:58:51.694  3709  3709 F DEBUG   :     #02 pc 00075855  /system/lib/libc.so (pthread_kill+85)
03-02 11:58:51.694  3709  3709 F DEBUG   :     #03 pc 0002782a  /system/lib/libc.so (raise+42)

@aardvarkk
Copy link

I'm also having a crash on shutdown of Flipper, and after trying to start the app again, it crashes immediately. Uninstalling/reinstalling the app lets it start again.

Here's the full stacktrace for me:

03-14 13:20:38.777 26663 26663 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
03-14 13:20:38.777 26663 26663 F DEBUG   : Build fingerprint: 'google/sunfish/sunfish:12/SQ1A.220105.002/7961164:user/release-keys'
03-14 13:20:38.777 26663 26663 F DEBUG   : Revision: 'MP1.0'
03-14 13:20:38.777 26663 26663 F DEBUG   : ABI: 'arm64'
03-14 13:20:38.777 26663 26663 F DEBUG   : Timestamp: 2022-03-14 13:20:38.487928039-0700
03-14 13:20:38.777 26663 26663 F DEBUG   : Process uptime: 0s
03-14 13:20:38.777 26663 26663 F DEBUG   : Cmdline: com.example.app
03-14 13:20:38.777 26663 26663 F DEBUG   : pid: 26610, tid: 26640, name: FlipperEventBas  >>> com.example.app <<<
03-14 13:20:38.777 26663 26663 F DEBUG   : uid: 10296
03-14 13:20:38.777 26663 26663 F DEBUG   : signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
03-14 13:20:38.777 26663 26663 F DEBUG   :     x0  0000000000000000  x1  0000000000006810  x2  0000000000000006  x3  0000007a3bdd5880
03-14 13:20:38.777 26663 26663 F DEBUG   :     x4  00000000ebad808a  x5  00000000ebad808a  x6  00000000ebad808a  x7  00000000ebad808b
03-14 13:20:38.777 26663 26663 F DEBUG   :     x8  00000000000000f0  x9  df6f25e5ff2cf3ce  x10 0000000000000000  x11 ffffff80fffffbdf
03-14 13:20:38.777 26663 26663 F DEBUG   :     x12 0000000000000001  x13 0000000000000045  x14 000000000000000c  x15 000000000000000c
03-14 13:20:38.777 26663 26663 F DEBUG   :     x16 0000007d603f4050  x17 0000007d603d0eb0  x18 0000007a3b8cc000  x19 00000000000067f2
03-14 13:20:38.777 26663 26663 F DEBUG   :     x20 0000000000006810  x21 00000000ffffffff  x22 ffffff85c4229f7f  x23 0000007a3bdd5ae0
03-14 13:20:38.777 26663 26663 F DEBUG   :     x24 0000007a3bdd6080  x25 0000007a3bdd7000  x26 0000000000000001  x27 0000007a3bdd7000
03-14 13:20:38.777 26663 26663 F DEBUG   :     x28 0000000000000001  x29 0000007a3bdd5900
03-14 13:20:38.777 26663 26663 F DEBUG   :     lr  0000007d60383ba0  sp  0000007a3bdd5860  pc  0000007d60383bcc  pst 0000000000000000
03-14 13:20:38.777 26663 26663 F DEBUG   : backtrace:
03-14 13:20:38.777 26663 26663 F DEBUG   :       #00 pc 000000000004fbcc  /apex/com.android.runtime/lib64/bionic/libc.so (abort+164) (BuildId: ba489d4985c0cf173209da67405662f9)
03-14 13:20:38.777 26663 26663 F DEBUG   :       #01 pc 00000000000af7e4  /data/app/~~lDOSLoa-8-lduo7kWaNCsA==/com.example.app-1c5y7hzTNtPRytjv_YMwZw==/lib/arm64/libc++_shared.so (BuildId: ece72a2ebc3774a1be9fd21271258acd3bcdfaa7)
03-14 13:20:38.777 26663 26663 F DEBUG   :       #02 pc 00000000000aedc8  /data/app/~~lDOSLoa-8-lduo7kWaNCsA==/com.example.app-1c5y7hzTNtPRytjv_YMwZw==/lib/arm64/libc++_shared.so (BuildId: ece72a2ebc3774a1be9fd21271258acd3bcdfaa7)
03-14 13:20:38.777 26663 26663 F DEBUG   :       #03 pc 00000000000aebf8  /data/app/~~lDOSLoa-8-lduo7kWaNCsA==/com.example.app-1c5y7hzTNtPRytjv_YMwZw==/lib/arm64/libc++_shared.so (__gxx_personality_v0+200) (BuildId: ece72a2ebc3774a1be9fd21271258acd3bcdfaa7)
03-14 13:20:38.777 26663 26663 F DEBUG   :       #04 pc 00000000001414b4  /data/app/~~lDOSLoa-8-lduo7kWaNCsA==/com.example.app-1c5y7hzTNtPRytjv_YMwZw==/lib/arm64/libflipper.so (BuildId: f99d0fc2f2225ca00806a71f80735381ea812c33)
03-14 13:20:38.777 26663 26663 F DEBUG   :       #05 pc 0000000000141570  /data/app/~~lDOSLoa-8-lduo7kWaNCsA==/com.example.app-1c5y7hzTNtPRytjv_YMwZw==/lib/arm64/libflipper.so (BuildId: f99d0fc2f2225ca00806a71f80735381ea812c33)
03-14 13:20:38.777 26663 26663 F DEBUG   :       #06 pc 00000000000aa850  /data/app/~~lDOSLoa-8-lduo7kWaNCsA==/com.example.app-1c5y7hzTNtPRytjv_YMwZw==/lib/arm64/libflipper.so (BuildId: f99d0fc2f2225ca00806a71f80735381ea812c33)
03-14 13:20:38.777 26663 26663 F DEBUG   :       #07 pc 00000000000a6f34  /data/app/~~lDOSLoa-8-lduo7kWaNCsA==/com.example.app-1c5y7hzTNtPRytjv_YMwZw==/lib/arm64/libflipper.so (BuildId: f99d0fc2f2225ca00806a71f80735381ea812c33)
03-14 13:20:38.777 26663 26663 F DEBUG   :       #08 pc 00000000000c38e8  /data/app/~~lDOSLoa-8-lduo7kWaNCsA==/com.example.app-1c5y7hzTNtPRytjv_YMwZw==/lib/arm64/libflipper.so (facebook::flipper::FlipperConnectionManagerImpl::connectSecurely()+900) (BuildId: f99d0fc2f2225ca00806a71f80735381ea812c33)
03-14 13:20:38.777 26663 26663 F DEBUG   :       #09 pc 00000000000c1e3c  /data/app/~~lDOSLoa-8-lduo7kWaNCsA==/com.example.app-1c5y7hzTNtPRytjv_YMwZw==/lib/arm64/libflipper.so (facebook::flipper::FlipperConnectionManagerImpl::startSync()+504) (BuildId: f99d0fc2f2225ca00806a71f80735381ea812c33)
03-14 13:20:38.777 26663 26663 F DEBUG   :       #10 pc 00000000000ce488  /data/app/~~lDOSLoa-8-lduo7kWaNCsA==/com.example.app-1c5y7hzTNtPRytjv_YMwZw==/lib/arm64/libflipper.so (BuildId: f99d0fc2f2225ca00806a71f80735381ea812c33)
03-14 13:20:38.777 26663 26663 F DEBUG   :       #11 pc 00000000000ca308  /data/app/~~lDOSLoa-8-lduo7kWaNCsA==/com.example.app-1c5y7hzTNtPRytjv_YMwZw==/lib/arm64/libflipper.so (void folly::detail::function::FunctionTraits<void ()>::callSmall<void folly::Executor::KeepAlive<folly::Executor>::add<folly::futures::detail::Core<folly::Unit>::doCallback(folly::Executor::KeepAlive<folly::Executor>&&, folly::futures::detail::State)::'lambda'(folly::Executor::KeepAlive<folly::Executor>&&)>(folly::futures::detail::Core<folly::Unit>::doCallback(folly::Executor::KeepAlive<folly::Executor>&&, folly::futures::detail::State)::'lambda'(folly::Executor::KeepAlive<folly::Executor>&&)&&) &&::'lambda'()>(folly::detail::function::Data&)+76) (BuildId: f99d0fc2f2225ca00806a71f80735381ea812c33)
03-14 13:20:38.777 26663 26663 F DEBUG   :       #12 pc 00000000000dcf30  /data/app/~~lDOSLoa-8-lduo7kWaNCsA==/com.example.app-1c5y7hzTNtPRytjv_YMwZw==/lib/arm64/libflipper.so (folly::EventBase::FunctionLoopCallback::runLoopCallback()+24) (BuildId: f99d0fc2f2225ca00806a71f80735381ea812c33)
03-14 13:20:38.777 26663 26663 F DEBUG   :       #13 pc 00000000000d8ff4  /data/app/~~lDOSLoa-8-lduo7kWaNCsA==/com.example.app-1c5y7hzTNtPRytjv_YMwZw==/lib/arm64/libflipper.so (folly::EventBase::runLoopCallbacks()+192) (BuildId: f99d0fc2f2225ca00806a71f80735381ea812c33)
03-14 13:20:38.777 26663 26663 F DEBUG   :       #14 pc 00000000000d9d54  /data/app/~~lDOSLoa-8-lduo7kWaNCsA==/com.example.app-1c5y7hzTNtPRytjv_YMwZw==/lib/arm64/libflipper.so (folly::EventBase::loopBody(int, bool)+712) (BuildId: f99d0fc2f2225ca00806a71f80735381ea812c33)
03-14 13:20:38.777 26663 26663 F DEBUG   :       #15 pc 00000000000da9a0  /data/app/~~lDOSLoa-8-lduo7kWaNCsA==/com.example.app-1c5y7hzTNtPRytjv_YMwZw==/lib/arm64/libflipper.so (folly::EventBase::loopForever()+36) (BuildId: f99d0fc2f2225ca00806a71f80735381ea812c33)
03-14 13:20:38.777 26663 26663 F DEBUG   :       #16 pc 00000000000b0bb0  /data/app/~~lDOSLoa-8-lduo7kWaNCsA==/com.example.app-1c5y7hzTNtPRytjv_YMwZw==/lib/arm64/libflipper.so (BuildId: f99d0fc2f2225ca00806a71f80735381ea812c33)
03-14 13:20:38.777 26663 26663 F DEBUG   :       #17 pc 0000000000222244  /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+148) (BuildId: e6c658201ef1ec3760112fa1b838ab2c)
03-14 13:20:38.777 26663 26663 F DEBUG   :       #18 pc 0000000000212520  /apex/com.android.art/lib64/libart.so (nterp_helper+4016) (BuildId: e6c658201ef1ec3760112fa1b838ab2c)
03-14 13:20:38.777 26663 26663 F DEBUG   :       #19 pc 0000000000374e40  [anon:dalvik-classes.dex extracted in memory from /data/app/~~lDOSLoa-8-lduo7kWaNCsA==/com.example.app-1c5y7hzTNtPRytjv_YMwZw==/base.apk] (com.facebook.flipper.android.FlipperThread.run+40)
03-14 13:20:38.777 26663 26663 F DEBUG   :       #20 pc 0000000000218964  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: e6c658201ef1ec3760112fa1b838ab2c)
03-14 13:20:38.777 26663 26663 F DEBUG   :       #21 pc 0000000000284208  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+188) (BuildId: e6c658201ef1ec3760112fa1b838ab2c)
03-14 13:20:38.777 26663 26663 F DEBUG   :       #22 pc 000000000061fb98  /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithJValues<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, jvalue const*)+460) (BuildId: e6c658201ef1ec3760112fa1b838ab2c)
03-14 13:20:38.777 26663 26663 F DEBUG   :       #23 pc 000000000066e75c  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1184) (BuildId: e6c658201ef1ec3760112fa1b838ab2c)
03-14 13:20:38.777 26663 26663 F DEBUG   :       #24 pc 00000000000b1910  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+264) (BuildId: ba489d4985c0cf173209da67405662f9)
03-14 13:20:38.777 26663 26663 F DEBUG   :       #25 pc 00000000000513f0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: ba489d4985c0cf173209da67405662f9)

@lblasa
Copy link
Contributor

lblasa commented Mar 15, 2022

Hi all, since the issue was reported, we added NDK parity between Flipper and its dependencies. At the moment, NDK r23 is used. Please ensure your apps are using the same.

That should address this issue.

@aardvarkk
Copy link

aardvarkk commented Mar 15, 2022

@lblasa My android/build.grade file looks like this:

buildscript {
    ext {
        buildToolsVersion = "30.0.3"
        minSdkVersion = 21
        compileSdkVersion = 30
        targetSdkVersion = 30
        ndkVersion = "23.1.7779620"
        kotlinVersion = "1.5.21"
        playServicesVersion = "17.0.0"
        androidMapsUtilsVersion = "2.2.6"
    }
    ...

I believe that is the latest available version of the NDK. I did a full rm -rf ~/.gradle/caches, ./gradlew clean, then yarn android and still saw the crash this morning.

@lblasa
Copy link
Contributor

lblasa commented Mar 15, 2022

Hi @aardvarkk that looks correct. Could you please try to also delete the .cxx folders?

And finally, could you please share again the backtrace and logcat logs?

@aardvarkk
Copy link

@lblasa I'm not sure which .cxx folders you're referring to. Where would they be located?

Here's the latest backtrace from the ADB logs:

03-15 10:01:45.023 15659 15659 F DEBUG   : Process uptime: 0s
03-15 10:01:45.023 15659 15659 F DEBUG   : Cmdline: com.example.app
03-15 10:01:45.023 15659 15659 F DEBUG   : pid: 15259, tid: 15300, name: FlipperEventBas  >>> com.example.app <<<
03-15 10:01:45.023 15659 15659 F DEBUG   : uid: 10302
03-15 10:01:45.023 15659 15659 F DEBUG   : signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
03-15 10:01:45.023 15659 15659 F DEBUG   :     x0  0000000000000000  x1  0000000000003bc4  x2  0000000000000006  x3  0000007a3f4a6880
03-15 10:01:45.023 15659 15659 F DEBUG   :     x4  00000000ebad808a  x5  00000000ebad808a  x6  00000000ebad808a  x7  00000000ebad808b
03-15 10:01:45.023 15659 15659 F DEBUG   :     x8  00000000000000f0  x9  df6f25e5ff2cf3ce  x10 0000000000000000  x11 ffffff80fffffbdf
03-15 10:01:45.023 15659 15659 F DEBUG   :     x12 0000000000000001  x13 0000000000000045  x14 000000000000000c  x15 000000000000000c
03-15 10:01:45.023 15659 15659 F DEBUG   :     x16 0000007d603f4050  x17 0000007d603d0eb0  x18 0000007a3d8a8000  x19 0000000000003b9b
03-15 10:01:45.023 15659 15659 F DEBUG   :     x20 0000000000003bc4  x21 00000000ffffffff  x22 ffffff85c0b58f7f  x23 0000007a3f4a6ae0
03-15 10:01:45.023 15659 15659 F DEBUG   :     x24 0000007a3f4a7080  x25 0000007a3f4a8000  x26 0000000000000001  x27 0000007a3f4a8000
03-15 10:01:45.023 15659 15659 F DEBUG   :     x28 0000000000000001  x29 0000007a3f4a6900
03-15 10:01:45.023 15659 15659 F DEBUG   :     lr  0000007d60383ba0  sp  0000007a3f4a6860  pc  0000007d60383bcc  pst 0000000000000000
03-15 10:01:45.023 15659 15659 F DEBUG   : backtrace:
03-15 10:01:45.023 15659 15659 F DEBUG   :       #00 pc 000000000004fbcc  /apex/com.android.runtime/lib64/bionic/libc.so (abort+164) (BuildId: ba489d4985c0cf173209da67405662f9)
03-15 10:01:45.023 15659 15659 F DEBUG   :       #01 pc 00000000000af7e4  /data/app/~~2qi_SiJCZyNiWAcmEzH92A==/com.example.app-fY1ZeqRfvpaz__hAG-jAeQ==/lib/arm64/libc++_shared.so (BuildId: ece72a2ebc3774a1be9fd21271258acd3bcdfaa7)
03-15 10:01:45.023 15659 15659 F DEBUG   :       #02 pc 00000000000aedc8  /data/app/~~2qi_SiJCZyNiWAcmEzH92A==/com.example.app-fY1ZeqRfvpaz__hAG-jAeQ==/lib/arm64/libc++_shared.so (BuildId: ece72a2ebc3774a1be9fd21271258acd3bcdfaa7)
03-15 10:01:45.023 15659 15659 F DEBUG   :       #03 pc 00000000000aebf8  /data/app/~~2qi_SiJCZyNiWAcmEzH92A==/com.example.app-fY1ZeqRfvpaz__hAG-jAeQ==/lib/arm64/libc++_shared.so (__gxx_personality_v0+200) (BuildId: ece72a2ebc3774a1be9fd21271258acd3bcdfaa7)
03-15 10:01:45.023 15659 15659 F DEBUG   :       #04 pc 00000000001414b4  /data/app/~~2qi_SiJCZyNiWAcmEzH92A==/com.example.app-fY1ZeqRfvpaz__hAG-jAeQ==/lib/arm64/libflipper.so (BuildId: f99d0fc2f2225ca00806a71f80735381ea812c33)
03-15 10:01:45.023 15659 15659 F DEBUG   :       #05 pc 0000000000141570  /data/app/~~2qi_SiJCZyNiWAcmEzH92A==/com.example.app-fY1ZeqRfvpaz__hAG-jAeQ==/lib/arm64/libflipper.so (BuildId: f99d0fc2f2225ca00806a71f80735381ea812c33)
03-15 10:01:45.023 15659 15659 F DEBUG   :       #06 pc 00000000000aa850  /data/app/~~2qi_SiJCZyNiWAcmEzH92A==/com.example.app-fY1ZeqRfvpaz__hAG-jAeQ==/lib/arm64/libflipper.so (BuildId: f99d0fc2f2225ca00806a71f80735381ea812c33)
03-15 10:01:45.023 15659 15659 F DEBUG   :       #07 pc 00000000000a6f34  /data/app/~~2qi_SiJCZyNiWAcmEzH92A==/com.example.app-fY1ZeqRfvpaz__hAG-jAeQ==/lib/arm64/libflipper.so (BuildId: f99d0fc2f2225ca00806a71f80735381ea812c33)
03-15 10:01:45.023 15659 15659 F DEBUG   :       #08 pc 00000000000c38e8  /data/app/~~2qi_SiJCZyNiWAcmEzH92A==/com.example.app-fY1ZeqRfvpaz__hAG-jAeQ==/lib/arm64/libflipper.so (facebook::flipper::FlipperConnectionManagerImpl::connectSecurely()+900) (BuildId: f99d0fc2f2225ca00806a71f80735381ea812c33)
03-15 10:01:45.023 15659 15659 F DEBUG   :       #09 pc 00000000000c1e3c  /data/app/~~2qi_SiJCZyNiWAcmEzH92A==/com.example.app-fY1ZeqRfvpaz__hAG-jAeQ==/lib/arm64/libflipper.so (facebook::flipper::FlipperConnectionManagerImpl::startSync()+504) (BuildId: f99d0fc2f2225ca00806a71f80735381ea812c33)
03-15 10:01:45.023 15659 15659 F DEBUG   :       #10 pc 00000000000cfe30  /data/app/~~2qi_SiJCZyNiWAcmEzH92A==/com.example.app-fY1ZeqRfvpaz__hAG-jAeQ==/lib/arm64/libflipper.so (BuildId: f99d0fc2f2225ca00806a71f80735381ea812c33)
03-15 10:01:45.023 15659 15659 F DEBUG   :       #11 pc 00000000000ca308  /data/app/~~2qi_SiJCZyNiWAcmEzH92A==/com.example.app-fY1ZeqRfvpaz__hAG-jAeQ==/lib/arm64/libflipper.so (void folly::detail::function::FunctionTraits<void ()>::callSmall<void folly::Executor::KeepAlive<folly::Executor>::add<folly::futures::detail::Core<folly::Unit>::doCallback(folly::Executor::KeepAlive<folly::Executor>&&, folly::futures::detail::State)::'lambda'(folly::Executor::KeepAlive<folly::Executor>&&)>(folly::futures::detail::Core<folly::Unit>::doCallback(folly::Executor::KeepAlive<folly::Executor>&&, folly::futures::detail::State)::'lambda'(folly::Executor::KeepAlive<folly::Executor>&&)&&) &&::'lambda'()>(folly::detail::function::Data&)+76) (BuildId: f99d0fc2f2225ca00806a71f80735381ea812c33)
03-15 10:01:45.023 15659 15659 F DEBUG   :       #12 pc 00000000000dcf30  /data/app/~~2qi_SiJCZyNiWAcmEzH92A==/com.example.app-fY1ZeqRfvpaz__hAG-jAeQ==/lib/arm64/libflipper.so (folly::EventBase::FunctionLoopCallback::runLoopCallback()+24) (BuildId: f99d0fc2f2225ca00806a71f80735381ea812c33)
03-15 10:01:45.023 15659 15659 F DEBUG   :       #13 pc 00000000000d8ff4  /data/app/~~2qi_SiJCZyNiWAcmEzH92A==/com.example.app-fY1ZeqRfvpaz__hAG-jAeQ==/lib/arm64/libflipper.so (folly::EventBase::runLoopCallbacks()+192) (BuildId: f99d0fc2f2225ca00806a71f80735381ea812c33)
03-15 10:01:45.023 15659 15659 F DEBUG   :       #14 pc 00000000000d9d54  /data/app/~~2qi_SiJCZyNiWAcmEzH92A==/com.example.app-fY1ZeqRfvpaz__hAG-jAeQ==/lib/arm64/libflipper.so (folly::EventBase::loopBody(int, bool)+712) (BuildId: f99d0fc2f2225ca00806a71f80735381ea812c33)
03-15 10:01:45.023 15659 15659 F DEBUG   :       #15 pc 00000000000da9a0  /data/app/~~2qi_SiJCZyNiWAcmEzH92A==/com.example.app-fY1ZeqRfvpaz__hAG-jAeQ==/lib/arm64/libflipper.so (folly::EventBase::loopForever()+36) (BuildId: f99d0fc2f2225ca00806a71f80735381ea812c33)
03-15 10:01:45.023 15659 15659 F DEBUG   :       #16 pc 00000000000b0bb0  /data/app/~~2qi_SiJCZyNiWAcmEzH92A==/com.example.app-fY1ZeqRfvpaz__hAG-jAeQ==/lib/arm64/libflipper.so (BuildId: f99d0fc2f2225ca00806a71f80735381ea812c33)
03-15 10:01:45.023 15659 15659 F DEBUG   :       #17 pc 0000000000222244  /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+148) (BuildId: e6c658201ef1ec3760112fa1b838ab2c)
03-15 10:01:45.023 15659 15659 F DEBUG   :       #18 pc 0000000000212520  /apex/com.android.art/lib64/libart.so (nterp_helper+4016) (BuildId: e6c658201ef1ec3760112fa1b838ab2c)
03-15 10:01:45.023 15659 15659 F DEBUG   :       #19 pc 0000000000374e40  [anon:dalvik-classes.dex extracted in memory from /data/app/~~2qi_SiJCZyNiWAcmEzH92A==/com.example.app-fY1ZeqRfvpaz__hAG-jAeQ==/base.apk] (com.facebook.flipper.android.FlipperThread.run+40)
03-15 10:01:45.023 15659 15659 F DEBUG   :       #20 pc 0000000000218964  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: e6c658201ef1ec3760112fa1b838ab2c)
03-15 10:01:45.023 15659 15659 F DEBUG   :       #21 pc 0000000000284208  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+188) (BuildId: e6c658201ef1ec3760112fa1b838ab2c)
03-15 10:01:45.023 15659 15659 F DEBUG   :       #22 pc 000000000061fb98  /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithJValues<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, jvalue const*)+460) (BuildId: e6c658201ef1ec3760112fa1b838ab2c)
03-15 10:01:45.023 15659 15659 F DEBUG   :       #23 pc 000000000066e75c  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1184) (BuildId: e6c658201ef1ec3760112fa1b838ab2c)
03-15 10:01:45.023 15659 15659 F DEBUG   :       #24 pc 00000000000b1910  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+264) (BuildId: ba489d4985c0cf173209da67405662f9)
03-15 10:01:45.023 15659 15659 F DEBUG   :       #25 pc 00000000000513f0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: ba489d4985c0cf173209da67405662f9)

@aardvarkk
Copy link

aardvarkk commented Mar 15, 2022

@lblasa I think perhaps you're referring to the app/build directory, so I removed that (rm -rf app/build) and then ran react-native run-android again. I verified that app/build/intermediates/stripped_native_libs and /merged_native_libs were regenerated. This time I got a crash just starting the app.

After that, every time I start it I get a crash. The only way to fix it that I can find is to completely delete the app, then run yarn android again to reinstall it from scratch.

@kyle-ssg
Copy link

kyle-ssg commented Jun 15, 2022

This seems related so I'll post it here. Currently, I see this whenever I run Flipper at all, I think with the same crash. I can confirm that Version 0.118.0 works.

The steps are quite straightforward:

  • Run Flipper 0.149.0 (Version 0.118.0 works fine)
  • npx react-native init RN068 --version 0.68.2
  • cd RN068
  • react-native run-android
F/libc    ( 7554): /buildbot/src/android/ndk-release-r21/external/libcxx/../../external/libcxxabi/src/abort_message.cpp:72: abort_message: assertion "terminating with uncaught exception of type folly::AsyncSocketException: AsyncSocketException: SSL handshake failed, type = SSL error" failed
F/libc    ( 7554): Fatal signal 6 (SIGABRT), code -6 in tid 7577 (FlipperEventBas)
I/DEBUG   ( 6729): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

@rasaha91
Copy link
Contributor

rasaha91 commented Jun 17, 2022

I am also seeing this within our android application, using clientsdk 0.150.0 and desktop app 0.150.0 on windows. Our application is using ndk 21. This only happens for us when we close the desktop app but leave the android application running. After this, any attempt to relaunch the app results in the app crashing, unless we first launch the flipper app.

@rasaha91
Copy link
Contributor

rasaha91 commented Jul 2, 2022

As an update, I just tested this with the app on ndk 23 and we are getting the same crash. @lblasa any updates on this one?

@cpetzel
Copy link

cpetzel commented Jul 23, 2022

I also tried NDK 23, 24, and 25. It always crashes after closing clipper and relaunching.

deleting the files/sonar files fix the problem.

@borgespro
Copy link

Any news?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants