Summary
Version | 0.21.5 |
Affected OS | Android |
OS Version | ? |
Current behavior
The app is crashing after linking the library. Here are some screenshots of my code
Expected behavior
To work without any errors.
Filtering out the most rated answers from issues on Github |||||||||||_______|||| Also a sharing corner
Version | 0.21.5 |
Affected OS | Android |
OS Version | ? |
The app is crashing after linking the library. Here are some screenshots of my code
To work without any errors.
Comments are closed.
Anyone else experiencing crashing on Android?
Details here:
facebook/react-native#6760
I could solve this problem for my use case. In my case, I changed my image component with,
shouldComponentUpdate() {
return false;
}
and my app is not crashing now. I don’t exactly know what was the root cause of this problem, but definitely my component didn’t need to be re-rendered every time.
I’m not sure if this ART commit is related with this problem.
But I’ll get this merged into react-native-svg see what would happen.
Good news!
I have fixed this finally.
It’s the JSBridge caused the crash.
The d
prop in Path element is too large after serialized.
And I had moved the serialize part to java side, and it never throw A/libc: Fatal signal 11 (SIGSEGV), code 2, fault addr 0x9fa40028 in tid 4388 (mqt_js)
again.
I’ll ship this fix in next version
4.6.0 has been released.
And I think it’s time to close this issue now.
The crash caused by A/libc: Fatal signal 11 (SIGSEGV), code 2, fault addr 0xxxxxxxx in tid xxxx (mqt_js)
has been fixed.
The crash caused by other errors should be posted in other issues.
Comments are closed.
Version | 0.21.5 |
Affected OS | Android |
OS Version | ? |
The app is crashing after linking the library. Here are some screenshots of my code
To work without any errors.
@sircEUNHO If you still facing crash problem then follow these steps. It worked in my case:
Open the project on Android Studio
On app level build.gradle file use same version on all firebase and gms dependencies.
dependencies {
compile project(‘:react-native-device-info’)
compile project(‘:react-native-fcm’)
compile fileTree(dir: “libs”, include: [“*.jar”])
compile “com.android.support:appcompat-v7:23.0.1”
compile “com.facebook.react:react-native:+”
compile ‘com.google.firebase:firebase-core:10.0.1’
compile ‘com.google.firebase:firebase-messaging:10.0.1’
}
Open build.gradle file of react-native-device-info module
Put the same version of dependency on play-services-gcm
dependencies {
def googlePlayServicesVersion = project.hasProperty(‘googlePlayServicesVersion’) ?
project.googlePlayServicesVersion : DEFAULT_GOOGLE_PLAY_SERVICES_VERSION
compile ‘com.facebook.react:react-native:+’
compile “com.google.android.gms:play-services-gcm:10.0.1”
}
Open build.gradle of firebase module you installed. In my case it is react-native-fcm
Repeat the same process (use same version for all firebase dependencies)
dependencies {
def googlePlayServicesVersion = project.hasProperty(‘googlePlayServicesVersion’) ? project.googlePlayServicesVersion : DEFAULT_GOOGLE_PLAY_SERVICES_VERSION
compile fileTree(include: [‘*.jar’], dir: ‘libs’)
compile ‘com.facebook.react:react-native:+’
compile “com.google.firebase:firebase-core:10.0.1”
compile “com.google.firebase:firebase-messaging:10.0.1”
compile ‘me.leolin:ShortcutBadger:1.1.17@aar’
}
Sync the gradle file and build the project
Comments are closed.
Anyone else experiencing crashing on Android?
Details here:
facebook/react-native#6760
Good news!
I have fixed this finally.
It’s the JSBridge caused the crash.
The d
prop in Path element is too large after serialized.
And I had moved the serialize part to java side, and it never throw A/libc: Fatal signal 11 (SIGSEGV), code 2, fault addr 0x9fa40028 in tid 4388 (mqt_js)
again.
I’ll ship this fix in next version
4.6.0 has been released.
And I think it’s time to close this issue now.
The crash caused by A/libc: Fatal signal 11 (SIGSEGV), code 2, fault addr 0xxxxxxxx in tid xxxx (mqt_js)
has been fixed.
The crash caused by other errors should be posted in other issues.
Comments are closed.
Copyright © 2022 Fantas...hit
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
Cookie | Duration | Description |
---|---|---|
cookielawinfo-checbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
I added this library and got this error on launching the app. It works fine if i remove the react-native-fcm library, but whenever i add both the app crashes. Here is the log of crash :-
06-04 12:26:06.949 5578-5578/com.yudhaapp E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.yudhaapp, PID: 5578
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/zzbq;
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)
at android.app.ActivityThread.installProvider(ActivityThread.java:5153)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4748)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4688)
at android.app.ActivityThread.-wrap1(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.ClassNotFoundException: Didn’t find class “com.google.android.gms.common.internal.zzbq” on path: DexPathList[[zip file “/data/app/com.yudhaapp-1/base.apk”],nativeLibraryDirectories=[/data/app/com.yudhaapp-1/lib/x86, /data/app/com.yudhaapp-1/base.apk!/lib/x86, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)
at android.app.ActivityThread.installProvider(ActivityThread.java:5153)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4748)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4688)
at android.app.ActivityThread.-wrap1(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Suppressed: java.lang.ClassNotFoundException: com.google.android.gms.common.internal.zzbq
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
… 13 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
@sircEUNHO If you still facing crash problem then follow these steps. It worked in my case:
Open the project on Android Studio
On app level build.gradle file use same version on all firebase and gms dependencies.
dependencies {
compile project(‘:react-native-device-info’)
compile project(‘:react-native-fcm’)
compile fileTree(dir: “libs”, include: [“*.jar”])
compile “com.android.support:appcompat-v7:23.0.1”
compile “com.facebook.react:react-native:+”
compile ‘com.google.firebase:firebase-core:10.0.1’
compile ‘com.google.firebase:firebase-messaging:10.0.1’
}
Open build.gradle file of react-native-device-info module
Put the same version of dependency on play-services-gcm
dependencies {
def googlePlayServicesVersion = project.hasProperty(‘googlePlayServicesVersion’) ?
project.googlePlayServicesVersion : DEFAULT_GOOGLE_PLAY_SERVICES_VERSION
compile ‘com.facebook.react:react-native:+’
compile “com.google.android.gms:play-services-gcm:10.0.1”
}
Open build.gradle of firebase module you installed. In my case it is react-native-fcm
Repeat the same process (use same version for all firebase dependencies)
dependencies {
def googlePlayServicesVersion = project.hasProperty(‘googlePlayServicesVersion’) ? project.googlePlayServicesVersion : DEFAULT_GOOGLE_PLAY_SERVICES_VERSION
compile fileTree(include: [‘*.jar’], dir: ‘libs’)
compile ‘com.facebook.react:react-native:+’
compile “com.google.firebase:firebase-core:10.0.1”
compile “com.google.firebase:firebase-messaging:10.0.1”
compile ‘me.leolin:ShortcutBadger:1.1.17@aar’
}
Sync the gradle file and build the project
I was also having the same issue and i simply commented these 3 lines in node_modules/react-native-device-info/android/build.gradle.. It works for me!!!
Note: I wasn’t using firebase, I was only using react-native-maps & geolocation-location library. Please make sure you have manually linked the library
if(firebaseIidVersion){
// implementation “com.google.firebase:firebase-iid:$firebaseIidVersion”
}else{
// def iidVersion = safeExtGet(‘googlePlayServicesIidVersion’, safeExtGet(‘googlePlayServicesVersion’, ‘17.0.0’))
// implementation “com.google.android.gms:play-services-iid:$iidVersion”
}