invertase / react-native-firebase

🔥 A well-tested feature-rich modular Firebase implementation for React Native. Supports both iOS & Android platforms for all Firebase services.
https://rnfirebase.io
Other
11.73k stars 2.22k forks source link

[🐛] 🔥 Bug Report Title - [Crash in some Android devices] couldn't find DSO to load: libreactnativejni.so #4392

Closed rimzici closed 4 years ago

rimzici commented 4 years ago

Issue

Recently some crashes reported in certain Android devices at firebase crashlytics.


Project Files

Javascript

Click To Expand

#### `package.json`: ```json { "name": "TelldusLiveApp", "version": "3.15.7", "private": true, "scripts": { "android": "react-native run-android", "ios": "react-native run-ios", "start": "react-native start", "clean": "react-native-clean-project", "lint": "eslint js", "lint_autofix": "eslint js --fix", "flow": "node_modules/.bin/flow", "release": "babel-node js/Utils/release.js", "sourcemap": "babel-node js/Utils/sourcemap.js", "test": "jest", "test-overwrite-snapshot": "jest -u", "postinstall": "npx jetify", "manage:translations-widget-android": "node node_modules/live-shared-data/lib/manageStringsWidgetAndroid.js" }, "browser": { "dgram": "react-native-udp" }, "dependencies": { "@formatjs/intl-pluralrules": "^3.2.5", "@formatjs/intl-relativetimeformat": "^7.0.0", "@invertase/react-native-apple-authentication": "^1.1.2", "@react-native-community/async-storage": "^1.11.0", "@react-native-community/datetimepicker": "^3.0.2", "@react-native-community/google-signin": "^4.0.3", "@react-native-community/masked-view": "~0.1.10", "@react-native-community/netinfo": "~5.9.5", "@react-native-community/push-notification-ios": "~1.4.0", "@react-native-community/viewpager": "~4.1.3", "@react-native-firebase/analytics": "^7.6.4", "@react-native-firebase/app": "^8.4.3", "@react-native-firebase/crashlytics": "^8.4.5", "@react-native-firebase/messaging": "^7.8.6", "@react-native-firebase/remote-config": "^9.0.5", "@react-navigation/bottom-tabs": "^5.8.0", "@react-navigation/compat": "^5.2.5", "@react-navigation/material-top-tabs": "^5.2.16", "@react-navigation/native": "^5.7.3", "@react-navigation/stack": "^5.9.0", "axios": "~0.19.2", "blueimp-md5": "~2.17.0", "color": "~3.1.2", "colorsys": "~1.0.22", "external-editor": "~3.1.0", "global": "~4.4.0", "gravatar-api": "^1.5.0", "intl": "~1.2.5", "jwt-decode": "^2.2.0", "live-shared-data": "git+https://code.telldus.com/telldus/live-shared-data.git#d734c3ad8858d5136c548f3ab17b1990c514351c", "lodash": "~4.17.11", "moment": "~2.27.0", "moment-timezone": "~0.5.31", "node-forge": "~0.9.1", "react": "16.11.0", "react-dom": "^16.13.0", "react-fast-compare": "~3.2.0", "react-intl": "^5.4.5", "react-native": "0.62.2", "react-native-accessibility": "git+https://github.com/MaxToyberman/react-native-accessibility.git#319008ffbfd9115cf520a718f3dfc88381161313", "react-native-background-fetch": "^3.1.0", "react-native-background-geolocation": "^3.9.0", "react-native-background-timer": "^2.3.1", "react-native-cached-image": "https://github.com/telldus/react-native-cached-image.git", "react-native-calendars": "~1.302.0", "react-native-circular-slider": "git+https://github.com/telldus/react-native-circular-slider.git", "react-native-color-wheel": "https://github.com/telldus/react-native-color-wheel.git", "react-native-device-info": "~5.6.3", "react-native-extra-dimensions-android": "~1.2.5", "react-native-gesture-handler": "~1.7.0", "react-native-google-places-autocomplete": "~1.8.0", "react-native-i18n": "~2.0.15", "react-native-iap": "^4.5.2", "react-native-iphone-x-helper": "~1.2.1", "react-native-localize": "~1.4.1", "react-native-maps": "0.27.1", "react-native-markdown-renderer": "~3.2.8", "react-native-material-dropdown": "https://github.com/rimzici/react-native-material-dropdown.git", "react-native-material-ripple": "~0.9.1", "react-native-material-textfield": "https://github.com/mahipalsingh7/react-native-material-textfield.git", "react-native-modal": "^11.5.6", "react-native-orientation-locker": "^1.2.0", "react-native-reanimated": "~1.10.1", "react-native-rsa-native": "https://github.com/rimzici/react-native-rsa-native.git", "react-native-safe-area-context": "^3.1.1", "react-native-screens": "~2.9.0", "react-native-section-list-get-item-layout": "~2.2.3", "react-native-sensitive-info": "https://github.com/telldus/react-native-sensitive-info.git", "react-native-simple-radio-button": "^2.7.4", "react-native-simple-toast": "1.0.0", "react-native-slider": "~0.11.0", "react-native-splash-screen": "^3.2.0", "react-native-sqlite-storage": "^5.0.0", "react-native-svg": "^12.1.0", "react-native-swipe-list-view": "^3.2.3", "react-native-swiper": "https://github.com/telldus/react-native-swiper.git", "react-native-switch": "^2.0.0", "react-native-tab-view": "^2.15.1", "react-native-tab-view-viewpager-adapter": "^1.1.0", "react-native-udp": "git+https://github.com/telldus/react-native-udp", "react-native-uuid": "~1.4.9", "react-native-vector-icons": "^7.0.0", "react-native-webview": "~10.3.3", "react-redux": "~7.2.1", "reconnecting-websocket": "^4.4.0", "redux": "~4.0.5", "redux-logger": "~3.0.6", "redux-persist": "^6.0.0", "redux-thunk": "^2.3.0", "reduxsauce": "^1.2.0", "reselect": "~4.0.0", "rn-fetch-blob": "^0.12.0", "seamless-immutable": "^7.1.4", "svgs": "~4.1.1", "url": "~0.11.0", "victory-native": "^35.0.1" }, "devDependencies": { "@babel/core": "^7.6.2", "@babel/runtime": "^7.6.2", "@react-native-community/eslint-config": "^0.0.5", "babel-cli": "^6.26.0", "babel-eslint": "^10.0.1", "babel-jest": "^25.3.0", "babel-plugin-transform-remove-console": "^6.9.4", "babel-polyfill": "~6.26.0", "babel-preset-stage-3": "^6.24.1", "buffer": "^5.2.1", "child-process-promise": "^2.2.1", "enzyme": "^3.9.0", "enzyme-adapter-react-16": "^1.12.1", "eslint": "^6.5.1", "eslint-plugin-flowtype": "^4.6.0", "eslint-plugin-react": "^7.12.4", "eslint-plugin-react-hooks": "^2.5.0", "fetch-mock": "^9.1.0", "flow-bin": "^0.113.0", "identity-obj-proxy": "^3.0.0", "jest": "^25.3.0", "jetifier": "^1.6.3", "metro-react-native-babel-preset": "^0.58.0", "prompt": "^1.0.0", "react-intl-translations-manager": "^5.0.3", "react-native-clean-project": "^3.3.0", "react-native-svg-transformer": "~0.14.3", "react-test-renderer": "16.11.0", "redux-mock-store": "^1.5.3" }, "resolutions": { "react-native-svg": "^12.1.0" }, "engines": { "node": ">=10.0.0", "npm": ">=5.8.0" }, "jest": { "preset": "react-native", "globals": { "__DEV__": true, "window": { "navigator": {} } }, "moduleNameMapper": { "\\.(svg)$": "/js/Utils/__mocks__/svgMock.js", ".+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$": "identity-obj-proxy" }, "setupFiles": [ "/js/Utils/jest.js" ], "testEnvironment": "node", "transform": { "^.+\\.jsx$": "babel-jest", "^.+\\.js$": "/node_modules/react-native/jest/preprocessor.js" }, "transformIgnorePatterns": [ "node_modules/(?!((jest-)?react-native|react-navigation|@react-native-firebase/|@react-native-community/push-notification-ios|@invertase/react-native-apple-authentication|@react-navigation/.*|@react-native-community/async-storage/(?!(lib))))" ] }, "@comment": { "dependencies": { "react-native-material-dropdown": "Update dep link of react-native-material-textfield", "react-native-material-textfield": "Check if main repo has merged the pull request from the fork" } } } ``` #### `firebase.json` for react-native-firebase v6: ```json { "react-native": { "messaging_android_notification_channel_id": "high-priority" } } ```

iOS

Click To Expand

#### `ios/Podfile`: - [ ] I'm not using Pods - [x] I'm using Pods and my Podfile looks like: ```ruby # N/A ``` #### `AppDelegate.m`: ```objc // N/A ```


Android

Click To Expand

#### Have you converted to AndroidX? - [ ] my application is an AndroidX application? - [ X] I am using `android/gradle.settings` `jetifier=true` for Android compatibility? - [X ] I am using the NPM package `jetifier` for react-native compatibility? #### `android/build.gradle`: ```groovy // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { ext { buildToolsVersion = "29.0.3" minSdkVersion = 21 compileSdkVersion = 29 targetSdkVersion = 29 supportLibVersion = "29.0.0" googlePlayServicesVersion = "17.0.0" // NOTE: Used by react-native-geolocation-service to set version of com.google.android.gms:play-services-location. Check before updating, else will cause build error. androidMapsUtilsVersion = "0.5+" googlePlayServicesAuthVersion = "17.0.0" googlePlayServicesIidVersion = "16.0.1" googlePlayServicesLocationVersion = "17.0.0" appCompatVersion = "1.1.0" // IMPORTANT: For new AndroidX compatibility. } repositories { google() jcenter() maven { url ("https://developer.huawei.com/repo/") } } dependencies { classpath("com.android.tools.build:gradle:3.5.2") classpath 'com.google.gms:google-services:4.3.3' classpath 'com.huawei.agconnect:agcp:1.4.0.300' classpath 'com.google.firebase:firebase-crashlytics-gradle:2.0.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { mavenLocal() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url("$rootDir/../node_modules/react-native/android") } maven { // Android JSC is installed from npm url("$rootDir/../node_modules/jsc-android/dist") } google() jcenter() maven { url 'https://www.jitpack.io' } maven { url ("https://developer.huawei.com/repo/") } maven { // Required for react-native-background-geolocation url("${project(':react-native-background-geolocation').projectDir}/libs") } maven { // react-native-background-fetch url("${project(':react-native-background-fetch').projectDir}/libs") } } } subprojects { afterEvaluate {project -> if (project.hasProperty("android")) { android { compileSdkVersion rootProject.ext.compileSdkVersion buildToolsVersion rootProject.ext.buildToolsVersion } } } } ``` #### `android/app/build.gradle`: ```groovy apply plugin: "com.android.application" apply plugin: 'com.huawei.agconnect' apply plugin: 'com.google.gms.google-services' apply plugin: 'com.google.firebase.crashlytics' import com.android.build.OutputFile def readVersion() { def parsedJson = new groovy.json.JsonSlurper().parseText(file('../../package.json').text) return parsedJson.version } def readVersionCode() { def version = readVersion() def (major, minor, patch) = version.tokenize('.') def additive = 3145728; return (major.toInteger() * 10000) + (minor.toInteger() * 100) + (patch.toInteger()) + additive } /** * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets * and bundleReleaseJsAndAssets). * These basically call `react-native bundle` with the correct arguments during the Android build * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the * bundle directly from the development server. Below you can see all the possible configurations * and their defaults. If you decide to add a configuration block, make sure to add it before the * `apply from: "../../node_modules/react-native/react.gradle"` line. * * project.ext.react = [ * // the name of the generated asset file containing your JS bundle * bundleAssetName: "index.android.bundle", * * // the entry file for bundle generation. If none specified and * // "index.android.js" exists, it will be used. Otherwise "index.js" is * // default. Can be overridden with ENTRY_FILE environment variable. * entryFile: "index.android.js", * * // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format * bundleCommand: "ram-bundle", * * // whether to bundle JS and assets in debug mode * bundleInDebug: false, * * // whether to bundle JS and assets in release mode * bundleInRelease: true, * * // whether to bundle JS and assets in another build variant (if configured). * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants * // The configuration property can be in the following formats * // 'bundleIn${productFlavor}${buildType}' * // 'bundleIn${buildType}' * // bundleInFreeDebug: true, * // bundleInPaidRelease: true, * // bundleInBeta: true, * // whether to disable dev mode in custom build variants (by default only disabled in release) * // for example: to disable dev mode in the staging build type (if configured) * devDisabledInStaging: true, * // The configuration property can be in the following formats * // 'devDisabledIn${productFlavor}${buildType}' * // 'devDisabledIn${buildType}' * * * // the root of your project, i.e. where "package.json" lives * root: "../../", * * // where to put the JS bundle asset in debug mode * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", * * // where to put the JS bundle asset in release mode * jsBundleDirRelease: "$buildDir/intermediates/assets/release", * * // where to put drawable resources / React Native assets, e.g. the ones you use via * // require('./image.png')), in debug mode * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", * * // where to put drawable resources / React Native assets, e.g. the ones you use via * // require('./image.png')), in release mode * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", * * // by default the gradle tasks are skipped if none of the JS files or assets change; this means * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to * // date; if you have any other folders that you want to ignore for performance reasons (gradle * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ * // for example, you might want to remove it from here. * inputExcludes: ["android/**", "ios/**"], * * // override which node gets called and with what additional arguments * nodeExecutableAndArgs: ["node"] * * // supply additional arguments to the packager * extraPackagerArgs: [] * ] */ project.ext.react = [ entryFile: "index.js", extraPackagerArgs: ["--sourcemap-output", file("$buildDir/../../sourcemap.js")], enableHermes: false, // clean and rebuild if changing ] apply from: "../../node_modules/react-native/react.gradle" apply from: "../../node_modules/react-native-vector-icons/fonts.gradle" Project background_geolocation = project(':react-native-background-geolocation') apply from: "${background_geolocation.projectDir}/app.gradle" /** * Set this to true to create two separate APKs instead of one: * - An APK that only works on ARM devices * - An APK that only works on x86 devices * The advantage is the size of the APK is reduced by about 4MB. * Upload all the APKs to the Play Store and people will download * the correct one based on the CPU architecture of their device. */ def enableSeparateBuildPerCPUArchitecture = false /** * Run Proguard to shrink the Java bytecode in release builds. */ def enableProguardInReleaseBuilds = false /** * The preferred build flavor of JavaScriptCore. * * For example, to use the international variant, you can use: * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` * * The international variant includes ICU i18n library and necessary data * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that * give correct results when using with locales other than en-US. Note that * this variant is about 6MiB larger per architecture than default. */ // def jscFlavor = 'org.webkit:android-jsc:+' def jscFlavor = 'org.webkit:android-jsc-intl:+' /** * Whether to enable the Hermes VM. * * This should be set on project.ext.react and mirrored here. If it is not set * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode * and the benefits of using Hermes will therefore be sharply reduced. */ def enableHermes = project.ext.react.get("enableHermes", false); android { compileSdkVersion rootProject.ext.compileSdkVersion compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } dexOptions { javaMaxHeapSize "4g" } defaultConfig { applicationId "com.telldus.live.mobile" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion versionCode readVersionCode() versionName readVersion() multiDexEnabled true manifestPlaceholders = [ googleMapsAPIKey: GOOGLE_MAPS_API_KEY, pushSenderId: PUSH_SENDER_ID, geolocationApplicationKey: GEOLOCATION_APPLICATION_KEY ] resConfigs "cs", "de", "en", "fr", "nb", "sv" } signingConfigs { debug { storeFile file('debug.keystore') storePassword 'android' keyAlias 'androiddebugkey' keyPassword 'android' } release { storeFile file(TELLDUS_REACT_NATIVE_LOCAL_STORE_FILE) storePassword TELLDUS_REACT_NATIVE_LOCAL_STORE_PASSWORD keyAlias TELLDUS_REACT_NATIVE_LOCAL_KEY_ALIAS keyPassword TELLDUS_REACT_NATIVE_LOCAL_KEY_PASSWORD v2SigningEnabled true } } splits { abi { reset() enable enableSeparateBuildPerCPUArchitecture universalApk false // If true, also generate a universal APK include "armeabi-v7a", "x86", "arm64-v8a", "x86_64" } } buildTypes { debug { applicationIdSuffix "" buildConfigField "String", "TELLDUS_API_SERVER", TELLDUS_API_SERVER signingConfig signingConfigs.debug } release { firebaseCrashlytics { nativeSymbolUploadEnabled true } // Caution! In production, you need to generate your own keystore file. // see https://facebook.github.io/react-native/docs/signed-apk-android. applicationIdSuffix "" minifyEnabled enableProguardInReleaseBuilds signingConfig signingConfigs.release proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" buildConfigField "String", "TELLDUS_API_SERVER", TELLDUS_API_SERVER } } packagingOptions { pickFirst "lib/armeabi-v7a/libc++_shared.so" pickFirst "lib/arm64-v8a/libc++_shared.so" pickFirst "lib/x86/libc++_shared.so" pickFirst "lib/x86_64/libc++_shared.so" } // applicationVariants are e.g. debug, release applicationVariants.all { variant -> variant.outputs.each { output -> // For each separate APK per architecture, set a unique version code as described here: // https://developer.android.com/studio/build/configure-apk-splits.html def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4] def abi = output.getFilter(OutputFile.ABI) if (abi != null) { // null for the universal-debug, universal-release variants output.versionCodeOverride = versionCodes.get(abi) * 1048576 + defaultConfig.versionCode } } } lintOptions{ disable 'MissingTranslation' } } dependencies { implementation 'me.leolin:ShortcutBadger:1.1.21@aar' implementation fileTree(dir: "libs", include: ["*.jar"]) //noinspection GradleDynamicVersion implementation ("com.facebook.react:react-native:+") implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" if (enableHermes) { def hermesPath = "../../node_modules/hermes-engine/android/"; debugImplementation files(hermesPath + "hermes-debug.aar") releaseImplementation files(hermesPath + "hermes-release.aar") } else { implementation jscFlavor } implementation 'com.android.support:multidex:1.0.2' implementation ("com.google.android.gms:play-services-base:17.0.0") { force = true; } implementation ("com.google.android.gms:play-services-maps:16.0.0") { force = true; } implementation ("com.google.android.gms:play-services-gcm:16.0.0") { force = true; } implementation ('com.google.android.gms:play-services-auth:16.0.0') { force = true; } implementation 'com.android.support:multidex:1.0.2' implementation "com.amitshekhar.android:jackson-android-networking:1.0.0" implementation 'com.github.siyamed:android-shape-imageview:0.9.+@aar' implementation 'com.google.android:flexbox:1.0.0' implementation "com.github.skydoves:colorpickerview:2.1.5" implementation 'com.google.android.material:material:1.2.0-alpha02' implementation 'androidx.appcompat:appcompat:1.1.0-rc01' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02' implementation 'com.huawei.hms:safetydetect:5.0.1.300' if (DEPLOY_STORE == "huawei") { implementation 'com.huawei.agconnect:agconnect-core:1.4.0.300' implementation 'com.huawei.hms:maps:5.0.1.300' } } // Run this once to be able to run the application with BUCK // puts all compile dependencies into folder libs for BUCK to use task copyDownloadableDepsToLibs(type: Copy) { from configurations.compile into 'libs' } apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) ``` #### `android/settings.gradle`: ```groovy rootProject.name = 'TelldusLiveApp' apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) include ':app' ``` #### `MainApplication.java`: ```java /** * Copyright 2016-present Telldus Technologies AB. * * This file is part of the Telldus Live! app. * * Telldus Live! app is free : you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Telldus Live! app is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Telldus Live! app. If not, see . */ package com.telldus.live.mobile; import android.app.Application; import android.content.Context; import com.facebook.react.ReactApplication; import com.facebook.react.ReactInstanceManager; import com.facebook.react.ReactNativeHost; import com.facebook.react.ReactPackage; import com.facebook.soloader.SoLoader; import com.telldus.live.mobile.MainActivity; import com.facebook.react.PackageList; import com.facebook.hermes.reactexecutor.HermesExecutorFactory; import com.facebook.react.bridge.JavaScriptExecutorFactory; import java.util.List; import java.lang.reflect.InvocationTargetException; import com.telldus.live.mobile.WidgetPackage; public class MainApplication extends Application implements ReactApplication { private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { @Override public boolean getUseDeveloperSupport() { return BuildConfig.DEBUG; } @Override protected List getPackages() { @SuppressWarnings("UnnecessaryLocalVariable") List packages = new PackageList(this).getPackages(); // Packages that cannot be autolinked yet can be added manually here, for example: // packages.add(new MyReactNativePackage()); packages.add(new WidgetPackage()); packages.add(new NativeUtilitiesPackage()); return packages; } @Override protected String getJSMainModuleName() { return "index"; } }; @Override public ReactNativeHost getReactNativeHost() { return mReactNativeHost; } @Override public void onCreate() { super.onCreate(); // saving current locale of the user inorder to reload the app(inside MainActivity) on locale change. MainActivity.currentLocale = getResources().getConfiguration().locale.toString(); SoLoader.init(this, /* native exopackage */ false); } } ``` #### `AndroidManifest.xml`: ```xml ```


Environment

Click To Expand

**`react-native info` output:** ``` System: OS: macOS 10.15.7 CPU: (4) x64 Intel(R) Core(TM) i5-5350U CPU @ 1.80GHz Memory: 212.50 MB / 8.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 14.5.0 - /usr/local/bin/node Yarn: 1.22.4 - /usr/local/bin/yarn npm: 6.14.5 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.9.3 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 14.0, DriverKit 19.0, macOS 10.15, tvOS 14.0, watchOS 7.0 Android SDK: API Levels: 29, 30 Build Tools: 29.0.3, 30.0.2 System Images: android-29 | Google APIs Intel x86 Atom Android NDK: Not Found IDEs: Android Studio: 4.0 AI-193.6911.18.40.6626763 Xcode: 12.0/12A7209 - /usr/bin/xcodebuild Languages: Java: 1.8.0_212 - /usr/bin/javac Python: 2.7.16 - /usr/local/bin/python npmPackages: @react-native-community/cli: Not Found react: 16.11.0 => 16.11.0 react-native: 0.62.2 => 0.62.2 react-native-macos: Not Found npmGlobalPackages: *react-native*: Not Found ``` - **Platform that you're experiencing the issue on**: - [ ] iOS - [ X] Android - [ ] **iOS** but have not tested behavior on Android - [ ] **Android** but have not tested behavior on iOS - [ ] Both - **`react-native-firebase` version you're using that has this issue:** - `^8.4.3` - **`Firebase` module(s) you're using that has the issue:** - `Cloud Messaging`[Supposedly according to the crash log] - **Are you using `TypeScript`?** - `N`

Crash Log:

Click To Expand

``` Fatal Exception: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libreactnativejni.so at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:789) at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:639) at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:577) at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:525) at com.facebook.react.bridge.ReactBridge.staticInit(ReactBridge.java:34) at com.facebook.react.bridge.NativeMap.(NativeMap.java:17) at com.facebook.react.bridge.Arguments.createMap(Arguments.java:156) at io.invertase.firebase.messaging.ReactNativeFirebaseMessagingSerializer.newTokenToTokenEvent(ReactNativeFirebaseMessagingSerializer.java:54) at io.invertase.firebase.messaging.ReactNativeFirebaseMessagingService.onNewToken(ReactNativeFirebaseMessagingService.java:30) at com.google.firebase.messaging.FirebaseMessagingService.handleIntent(com.google.firebase:firebase-messaging@@20.2.4:28) at com.google.firebase.messaging.EnhancedIntentService.lambda$processIntent$0$EnhancedIntentService(com.google.firebase:firebase-messaging@@20.2.4:43) at com.google.firebase.messaging.EnhancedIntentService$$Lambda$0.run(:6) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at com.google.android.gms.common.util.concurrent.zza.run(com.google.android.gms:play-services-basement@@17.2.1:6) at java.lang.Thread.run(Thread.java:919) firebase-iid-executor at sun.misc.Unsafe.park(Unsafe.java) at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:230) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2109) at java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:467) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1091) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at com.google.android.gms.common.util.concurrent.zza.run(com.google.android.gms:play-services-basement@@17.2.1:6) at java.lang.Thread.run(Thread.java:919) ```

Reported Devices:

Brand Model OS
Google Pixel 2 XL 10
Huawei Nexus 6P 8.1.0
LGE Nexus 5X 8.1.0

NOTE: As evident in the build.gradle file (1) Hermes is disabled (2) Using org.webkit:android-jsc-intl:+


mikehardy commented 4 years ago

Reminds me of this https://github.com/invertase/react-native-firebase/blob/f6e64ed5536a4ff3ac7680bc97c18ef8c824b72a/tests/android/app/build.gradle#L117-L122

https://stackoverflow.com/a/60592551/9910298

I don't think react-native-firebase is responsible for this, it's in your stack yes but it's just the first thing that asks react-native to init, and react-native init isn't working correctly - nothing we can do about that

rimzici commented 4 years ago

I see. my ignorance! Thanks :-)

mikehardy commented 4 years ago

No problem, I hope it actually helps - if it is that problem, who would expect that would happen? And it was painful when I found + fixed it. Good luck :-)