-
Notifications
You must be signed in to change notification settings - Fork 182
Is profilo compatible with react-native? #42
Comments
It's possible though the two copies of fbjni should be able to coexist, they're in entirely different libraries. Can you do me a favor and list the libraries in your APK before you include profilo? I suspect that our libfb is overwriting react-native's or vice versa. The fix should be trivial but I'd like a listing of the conflicting library names first. |
Sure, there are about 49 of them (sorry for the long list) :
Yes, I used |
Actually there are several types of conflicts I ran into while trying including profilo.
Solution:
Solution: remove these java files from classes.jar in profilo.aar
Most of them seems irrelevant to our current topic, except for Just post this one for record, in case someone needs it. |
@BurntBrunch Sir, is there anything more I could provide? |
Sorry about that, I was ooo.
As for the java conflicts... we need to figure out a better story, I'll raise this with the RN team. |
Summary: This diff fixes some obscurities in the BUCK setup and ensures that all native libraries under our control are prefixed with `profilo_`. This addresses issue #42. Reviewed By: aandreyeu Differential Revision: D14508127 fbshipit-source-id: efb35342802504e770eda5e97f57ce4490f2b90d
@popahqiu the native library conflict should be resolved now, can you please check if anything else breaks your app? |
No more crash now. |
Summary: Planning to upgrade the native build steps a little, but need to be up-to-date on build dependencies first. Pull Request resolved: facebookincubator/fbjni#42 Reviewed By: fabiomassimo Differential Revision: D26512246 Pulled By: passy fbshipit-source-id: 1fb059018b6b4ab0deb3a7f23ab2d6b70a7eac46
Hello. Hope this finds you well.
Recently I've come accoss a problem that bothers me a lot.
My app already has react-native in it. So when I tried to put profilo into it, I met the following error while starting the app up.
I/AEE_AED: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/AEE_AED: Build fingerprint: 'Meizu/meizu_MX6/MX6:7.1.1/NMF26O/1547836199:user/release-keys'
I/AEE_AED: Revision: '0'
I/AEE_AED: ABI: 'arm'
I/AEE_AED: pid: 5213, tid: 5336, name: MainActivity_Jo >>> com.qiyi.video <<<
I/AEE_AED: signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xdeadb00c
I/AEE_AED: Abort message: 'Assert (/code/rn-upgrade/android/react-native-0.55/ReactAndroid/src/main/jni/first-party/fb/jni/Environment.cpp:42): g_vm'
I/AEE_AED: r0 0000008c r1 00000000 r2 00000000 r3 deadb00c
I/AEE_AED: r4 e49f9004 r5 00000000 r6 00000001 r7 c4e38158
I/AEE_AED: r8 c4e3817c r9 edc09008 sl c4e381a0 fp c4e38318
I/AEE_AED: ip c4e3704c sp c4e38118 lr e49ec6d9 pc e49ec6dc cpsr 600f0030
I/AEE_AED: backtrace:
I/AEE_AED: #00 pc 000086dc /data/app/com.qiyi.video-2/lib/arm/libfb.so (_ZN8facebook14assertInternalEPKcz+71)
I/AEE_AED: #1 pc 000090af /data/app/com.qiyi.video-2/lib/arm/libfb.so
I/AEE_AED: #2 pc 00009259 /data/app/com.qiyi.video-2/lib/arm/libfb.so (_ZN8facebook3jni11Environment7currentEv+32)
I/AEE_AED: #3 pc 00014a11 /data/app/com.qiyi.video-2/lib/arm/libreactnativejni.so (_ZN8facebook3jni6JClass15registerNativesESt16initializer_listINS0_12NativeMethodEE+22)
I/AEE_AED: #4 pc 000260a1 /data/app/com.qiyi.video-2/lib/arm/libreactnativejni.so
I/AEE_AED: #5 pc 0000d43b /data/app/com.qiyi.video-2/lib/arm/libfb.so (_ZN8facebook3jni10initializeEP7_JavaVMOSt8functionIFvvEE+390)
I/AEE_AED: #6 pc 00025ae1 /data/app/com.qiyi.video-2/lib/arm/libreactnativejni.so (JNI_OnLoad+48)
I/AEE_AED: #7 pc 0023d4c9 /system/lib/libart.so (ZN3art9JavaVMExt17LoadNativeLibraryEP7_JNIEnvRKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEP8_jobjectP8_jstringPS9+1844)
I/AEE_AED: #8 pc 00003233 /system/lib/libopenjdkjvm.so (JVM_NativeLoad+178)
I/AEE_AED: #9 pc 731675c5 /data/dalvik-cache/arm/system@framework@boot.oat (offset 0x2f63000)
It seems to be related to some conflicts on libfb and libfbjni between the two projects: rn and profilo.
As I looked into them, I found that the code path and structure are totally different.
For example, there are
profilo/deps/fb
profilo/deps/fbjni/cxx/fbjni
profilo/deps/fbjni/cxx/lyra
profilo/deps/fbjni/java
&
react-native/ReactAndroid/src/main/jni/first-party/fb/include
react-native/ReactAndroid/src/main/jni/first-party/fb/jni
react-native/ReactAndroid/src/main/jni/first-party/fb/jni/android
react-native/ReactAndroid/src/main/jni/first-party/fb/jni/java
react-native/ReactAndroid/src/main/jni/first-party/fb/lyra
The files in those folders are very similar (same names but slightly different content).
I guess that might be the cause to the crash.
Would you please give some advice on how to resolve it?
Or, it will be perfect if you have plan to support it. XD
Thanks for your time.
The text was updated successfully, but these errors were encountered: