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.71k stars 2.22k forks source link

[🐛] NoSuchKeyException - sessionId #6961

Closed VitoFromEarth closed 1 year ago

VitoFromEarth commented 1 year ago

Issue

Used firebase/auth v16.4.6 Replicates on Android only On Samsung/Oppo/Xiaomi devices we detect in sentry a lot of issues with next message:

NoSuchKeyException com.facebook.react.bridge.ReadableNativeMap in getNullableValue
Unhandled
sessionId
image

Project Files

{
  "name": "app",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "postinstall": "node ./scripts/setup.js",
    "android": "ENVFILE=.env.production react-native run-android --variant='productionDebug'",
    "android:test": "ENVFILE=.env.test react-native run-android --variant='tstDebug'",
    "android:staging": "ENVFILE=.env.staging react-native run-android --variant='stagingDebug'",
    "ios": "ENVFILE=.env.staging react-native run-ios",
    "ios14": "ENVFILE=.env.test react-native run-ios --simulator='iPhone 14 Pro'",
    "install-all": "npm install && cd ios && pod install",
    "pod-install": "cd ios && pod install",
    "start": "react-native start ENVFILE=.env.test",
    "start:reset-cache": "react-native start --reset-cache",
    "start:codegen": "concurrently --names \"CODEGEN,APP\" -c \"bgBlue.bold,bgMagenta.bold\" --handle-input --default-input-target APP \"yarn codegen -- --watch\" \"react-native start\"",
    "test": "jest -u",
    "lint": "eslint --fix --ext .tsx --ext .ts src/",
    "format": "prettier --check ./src",
    "codegen": "graphql-codegen --require dotenv/config --config codegen.ts",
    "adb:reverse": "adb reverse tcp:8081 tcp:8081",
    "ios:certificates": "bundle exec fastlane match --readonly true",
    "ios:certificates:renew": "bundle exec fastlane match",
    "prepare": "husky install"
  },
  "dependencies": {
    "@apollo/client": "3.7.3",
    "@fortawesome/fontawesome-pro": "^6.2.0",
    "@fortawesome/fontawesome-svg-core": "^1.3.0",
    "@fortawesome/free-brands-svg-icons": "^6.2.0",
    "@fortawesome/pro-duotone-svg-icons": "^6.2.0",
    "@fortawesome/pro-light-svg-icons": "^6.2.0",
    "@fortawesome/pro-regular-svg-icons": "^6.2.0",
    "@fortawesome/pro-solid-svg-icons": "^6.2.0",
    "@fortawesome/react-native-fontawesome": "^0.2.7",
    "@gorhom/bottom-sheet": "4.4.5",
    "@react-native-clipboard/clipboard": "^1.10.0",
    "@react-native-community/blur": "^3.6.0",
    "@react-native-community/cameraroll": "^4.0.4",
    "@react-native-community/checkbox": "^0.5.7",
    "@react-native-community/cli-platform-android": "^4.13.0",
    "@react-native-community/masked-view": "^0.1.10",
    "@react-native-community/netinfo": "^5.9.9",
    "@react-native-community/push-notification-ios": "^1.8.0",
    "@react-native-firebase/app": "17.3.1",
    "@react-native-firebase/auth": "17.3.1",
    "@react-native-firebase/dynamic-links": "17.3.1",
    "@react-native-firebase/messaging": "17.3.1",
    "@react-navigation/devtools": "^5.1.26",
    "@react-navigation/native": "^5.9.8",
    "@react-navigation/stack": "^5.12.8",
    "@sentry/cli": "^2.12.0",
    "@sentry/react-native": "^3.4.3",
    "apisauce": "^2.0.1",
    "appcenter": "4.1.0",
    "appcenter-analytics": "4.1.0",
    "appcenter-cli": "^2.7.3",
    "appcenter-crashes": "4.1.0",
    "countries-and-timezones": "^3.3.0",
    "country-list": "2.3.0",
    "dayjs": "1.11.7",
    "graphql": "^16.5.0",
    "jwt-decode": "^3.1.2",
    "mixpanel-react-native": "^1.3.8",
    "moment": "^2.29.1",
    "patch-package": "^6.4.7",
    "react": "16.13.1",
    "react-hook-form": "7.42.1",
    "react-native": "0.63.3",
    "react-native-animatable": "^1.3.3",
    "react-native-camera": "^3.44.1",
    "react-native-check-box": "^2.1.7",
    "react-native-config": "^1.4.0",
    "react-native-confirmation-code-field": "^7.0.1",
    "react-native-contacts": "^7.0.5",
    "react-native-countdown-circle-timer": "^2.3.11",
    "react-native-countdown-component": "^2.7.1",
    "react-native-country-picker-modal": "^2.0.0",
    "react-native-create-thumbnail": "^1.2.2",
    "react-native-date-picker": "^4.0.0",
    "react-native-document-picker": "^5.0.0",
    "react-native-event-listeners": "^1.0.7",
    "react-native-fast-image": "^8.5.11",
    "react-native-flash-message": "^0.4.0",
    "react-native-fs": "^2.16.6",
    "react-native-gesture-handler": "^2.8.0",
    "react-native-image-picker": "^3.1.3",
    "react-native-iphone-x-helper": "^1.3.1",
    "react-native-keyboard-aware-scroll-view": "^0.9.3",
    "react-native-linear-gradient": "^2.5.6",
    "react-native-localize": "2.2.4",
    "react-native-mmkv": "2.4.4",
    "react-native-mmkv-flipper-plugin": "^1.0.0",
    "react-native-pager-view": "^6.0.0",
    "react-native-paper": "4.12.5",
    "react-native-permissions": "^3.0.0",
    "react-native-phone-number-input": "^2.1.0",
    "react-native-progress": "^5.0.0",
    "react-native-push-notification": "8.1.1",
    "react-native-raw-bottom-sheet": "^2.2.0",
    "react-native-reanimated": "^2.13.0",
    "react-native-reanimated-carousel": "^3.1.5",
    "react-native-render-html": "^6.3.4",
    "react-native-responsive-screen": "^1.4.2",
    "react-native-safe-area-context": "^3.1.9",
    "react-native-screens": "^2.15.0",
    "react-native-sectioned-multi-select": "^0.8.1",
    "react-native-select-dropdown": "^1.1.0",
    "react-native-simple-dialogs": "^1.4.0",
    "react-native-simple-radio-button": "^2.7.4",
    "react-native-simple-toast": "^1.1.3",
    "react-native-snap-carousel": "^3.9.1",
    "react-native-social-buttons": "^1.2.0",
    "react-native-splash-screen": "^3.2.0",
    "react-native-stopwatch-timer": "0.0.21",
    "react-native-svg": "^12.1.1",
    "react-native-svg-transformer": "^0.14.3",
    "react-native-swipe-gestures": "^1.0.5",
    "react-native-swiper": "^1.6.0",
    "react-native-tab-view": "^3.0.1",
    "react-native-vector-icons": "^8.1.0",
    "react-native-video": "^5.1.1",
    "react-native-video-player": "^0.10.1",
    "react-native-walkthrough-tooltip": "^1.2.0",
    "react-select-country-list": "^2.2.3",
    "react-use-promise": "^0.5.0",
    "rn-fetch-blob": "^0.12.0",
    "timezones-list": "^3.0.1"
  },
  "devDependencies": {
    "@babel/core": "^7.8.4",
    "@babel/plugin-proposal-class-properties": "7.18.6",
    "@babel/plugin-proposal-private-methods": "7.18.6",
    "@babel/runtime": "^7.8.4",
    "@graphql-codegen/cli": "2.13.8",
    "@graphql-codegen/typescript": "2.8.0",
    "@graphql-codegen/typescript-operations": "2.5.5",
    "@graphql-codegen/typescript-react-apollo": "3.3.5",
    "@react-native-community/eslint-config": "^1.1.0",
    "@testing-library/jest-dom": "^5.16.5",
    "@testing-library/jest-native": "^5.2.0",
    "@testing-library/react-native": "^11.4.0",
    "@types/country-list": "2.1.1",
    "@types/jest": "^29.2.3",
    "@types/lodash": "^4.14.186",
    "@types/react": "^16.9.56",
    "@types/react-native": "^0.63.34",
    "@types/react-native-check-box": "2.1.2",
    "@types/react-native-modal-dropdown": "^0.7.0",
    "@types/react-native-snap-carousel": "3.8.5",
    "@types/react-native-vector-icons": "^6.4.6",
    "@types/react-native-video": "^5.0.3",
    "@types/react-native-video-player": "^0.10.1",
    "@types/react-select-country-list": "^2.2.1",
    "@types/react-test-renderer": "^16.9.3",
    "@typescript-eslint/eslint-plugin": "^4.27.0",
    "@typescript-eslint/parser": "^4.27.0",
    "babel-jest": "^29.3.1",
    "babel-plugin-module-resolver": "^4.1.0",
    "babel-plugin-transform-remove-console": "^6.9.4",
    "concurrently": "~7.5.0",
    "eslint": "^6.5.1",
    "eslint-plugin-prettier": "^3.4.0",
    "eslint-plugin-react": "^7.24.0",
    "eslint-plugin-react-hooks": "^4.6.0",
    "husky": "8.0.1",
    "jest": "^29.0.3",
    "lint-staged": "^11.0.0",
    "metro-babel-register": "0.63.0",
    "metro-react-native-babel-preset": "0.63.0",
    "prettier": "^2.3.1",
    "react-native-apollo-devtools-client": "1.0.4",
    "react-native-flipper": "0.162.0",
    "react-native-typescript-transformer": "^1.2.13",
    "react-test-renderer": "16.13.1",
    "ts-jest": "^29.0.3",
    "typescript": "~4.7.4"
  },
  "lint-staged": {
    "src/**/*.{ts,tsx}": [
      "eslint --ext .tsx --ext .ts src/ --fix"
    ],
    "./src/**": [
      "prettier --write ."
    ]
  },
  "husky": {
    "hooks": {
      "pre-commit": "lint-staged"
    }
  }
}

Android

Click To Expand

#### Have you converted to AndroidX? - [x] my application is an AndroidX application? - [x] I am using `android/gradle.settings` `jetifier=true` for Android compatibility? - [ ] I am using the NPM package `jetifier` for react-native compatibility? #### `android/build.gradle`: ```groovy buildscript { ext { minSdkVersion = 24 compileSdkVersion = 31 buildToolsVersion = "30.0.2" targetSdkVersion = 31 kotlinVersion = "1.4.10" ndkVersion = "24.0.8215888" } repositories { google() jcenter() maven { url "https://plugins.gradle.org/m2/" } maven { url "https://artifactory.img.ly/artifactory/imgly" } configurations.all { resolutionStrategy { force "com.facebook.soloader:soloader:0.10.0" } } } dependencies { classpath('com.android.tools.build:gradle:4.1.0') classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.10" classpath 'ly.img.android.sdk:plugin:9.0.0' classpath 'com.google.gms:google-services:4.3.15' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } def REACT_NATIVE_VERSION = new File(['node', '--print',"JSON.parse(require('fs').readFileSync(require.resolve('react-native/package.json'), 'utf-8')).version"].execute(null, rootDir).text.trim()) allprojects { configurations.all { resolutionStrategy { // can be removed from RN version: 0.71.0 force "com.facebook.react:react-native:" + REACT_NATIVE_VERSION } } repositories { exclusiveContent { filter { includeGroup "com.facebook.react" } forRepository { maven { url "$rootDir/../node_modules/react-native/android" } } } google() jcenter() 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") } maven { url "https://www.jitpack.io" } maven { url "https://maven.google.com" } } } ``` #### `android/app/build.gradle`: ```groovy apply plugin: "com.android.application" import com.android.build.OutputFile project.ext.envConfigFiles = [ localDebug: ".env.local", tstDebug: ".env.test", stagingDebug: ".env.staging", productionDebug:".env.production", tstRelease:".env.test", stagingRelease:".env.staging", productionRelease:".env.production", ] apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle" project.ext.react = [ enableHermes: false, bundleInDebug: false, bundleInStaging: false, bundleInRelease: false, jsBundleDirDebug: "$buildDir/intermediates/assets/debug", resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", jsBundleDirTst: "$buildDir/intermediates/assets/tst", resourcesDirStaging: "$buildDir/intermediates/assets/tst", resourcesDirStaging: "$buildDir/intermediates/res/merged/staging", jsBundleDirRelease: "$buildDir/intermediates/assets/release", resourcesDirRelease: "$buildDir/intermediates/res/merged/release", devDisabledInDebug: false, devDisabledInStaging: true, devDisabledInTst: true, devDisabledInRelease: true, inputExcludes: [ "ios/**", "__tests__/**", "bundle_out/**", "amplify/**", "fastlane/**", "Firebase/**", "keys/**", "patches/**", "scripts/.." ], extraPackagerArgs: ["--verbose"] ] apply from: "../../node_modules/react-native/react.gradle" apply from: "../../node_modules/react-native-vector-icons/fonts.gradle" apply plugin: 'ly.img.android.sdk' apply plugin: 'kotlin-android' apply from: "../../node_modules/@sentry/react-native/sentry.gradle" imglyConfig { modules { include 'ui:video-trim' } } /** * 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-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) /** * Defining build variables from ENV VARS */ android { // ndkVersion rootProject.ext.ndkVersion compileSdkVersion rootProject.ext.compileSdkVersion compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } defaultConfig { applicationId appID // package name in manifest file is just to organize your code. The applicationId, on the other hand, is used to identify your app in the Play Store. minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion buildToolsVersion rootProject.ext.buildToolsVersion versionCode 1676047876 versionName "1.67" multiDexEnabled true missingDimensionStrategy 'react-native-camera', 'general' resValue "string", "build_config_package", //should be the same as in manifest } dexOptions { javaMaxHeapSize "4g" } splits { abi { reset() enable enableSeparateBuildPerCPUArchitecture universalApk false // If true, also generate a universal APK include "armeabi-v7a", "x86", "arm64-v8a", "x86_64" } } signingConfigs { debug { storeFile file('debug.keystore') storePassword 'android' keyAlias 'androiddebugkey' keyPassword 'android' } release { if (System.getenv('ANDROID_KEYSTORE_FILE') != null) { storeFile file(System.getenv('ANDROID_KEYSTORE_FILE')) storePassword System.getenv('ANDROID_KEYSTORE_PASSWORD') keyAlias System.getenv('ANDROID_KEY_ALIAS') keyPassword System.getenv('ANDROID_PASSWORD') } } } buildTypes { debug { signingConfig signingConfigs.debug } release { // Caution! In production, you need to generate your own keystore file. // see https://reactnative.dev/docs/signed-apk-android. signingConfig signingConfigs.release minifyEnabled enableProguardInReleaseBuilds proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" } } lintOptions { checkReleaseBuilds false abortOnError false } flavorDimensions "version" //All product flavors must belong to a named flavor dimension, which is a group of product flavors. You must assign all flavors to a flavor dimension; otherwise, you will get the build error. If a given module specifies only one flavor dimension, the Android Gradle plugin automatically assigns all of the module's flavors to that dimension. productFlavors { local { dimension "version" applicationId project.env.get("PRODUCT_BUNDLE_IDENTIFIER") } tst { dimension "version" applicationId project.env.get("PRODUCT_BUNDLE_IDENTIFIER") } staging { dimension "version" applicationId project.env.get("PRODUCT_BUNDLE_IDENTIFIER") } production { dimension "version" applicationId project.env.get("PRODUCT_BUNDLE_IDENTIFIER") } } // 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://seloper.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 } } } } dependencies { implementation project(':react-native-config') implementation fileTree(dir: "libs", include: ["*.jar"]) implementation project(':react-native-push-notification') implementation "com.facebook.react:react-native:+" // From node_modules implementation 'com.android.support:multidex:1.0.3' implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" implementation 'com.google.firebase:firebase-analytics:19.0.0' implementation 'com.facebook.soloader:soloader:0.10.0' debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") { exclude group:'com.facebook.fbjni' } debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") { exclude group:'com.facebook.flipper' exclude group:'com.squareup.okhttp3', module:'okhttp' } debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") { exclude group:'com.facebook.flipper' } if (enableHermes) { def hermesPath = "../../node_modules/hermes-engine/android/" debugImplementation files(hermesPath + "hermes-debug.aar") releaseImplementation files(hermesPath + "hermes-release.aar") } else { implementation jscFlavor } } // 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 plugin: 'com.google.gms.google-services' apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) ``` #### `android/settings.gradle`: ```groovy rootProject.name = 'App' include ':@react-native-community_cameraroll' project(':@react-native-community_cameraroll').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/cameraroll/android') include ':react-native-vector-icons' project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android') include ':@react-native-community_blur' project(':@react-native-community_blur').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/blur/android') include ':react-native-orientation-handler' project(':react-native-orientation-handler').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-orientation-handler/android') apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) include ':app', ':react-native-config' include ':react-native-push-notification' project(':react-native-push-notification').projectDir = file('../node_modules/react-native-push-notification/android') ``` #### `MainApplication.java`: ```java package com.app; import android.content.Context; import androidx.multidex.MultiDex; import androidx.multidex.MultiDexApplication; import com.facebook.react.PackageList; 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 java.lang.reflect.InvocationTargetException; import java.util.List; public class MainApplication extends MultiDexApplication 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()); return packages; } @Override protected String getJSMainModuleName() { return "index"; } }; @Override public ReactNativeHost getReactNativeHost() { return mReactNativeHost; } @Override public void onCreate() { super.onCreate(); SoLoader.init(this, /* native exopackage */ false); initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); } @Override protected void attachBaseContext(Context base) { super.attachBaseContext(base); MultiDex.install(this); } /** * Loads Flipper in React Native templates. Call this in the onCreate method with something like * initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); * * @param context * @param reactInstanceManager */ private static void initializeFlipper( Context context, ReactInstanceManager reactInstanceManager) { if (BuildConfig.DEBUG) { try { /* We use reflection here to pick up the class that initializes Flipper, since Flipper library is not available in release mode */ Class aClass = Class.forName("com.app.ReactNativeFlipper"); aClass .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class) .invoke(null, context, reactInstanceManager); } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (NoSuchMethodException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (InvocationTargetException e) { e.printStackTrace(); } } } } ``` #### `AndroidManifest.xml`: ```xml ```


Environment

Click To Expand

**`react-native info` output:** ``` System: OS: macOS 13.2.1 CPU: (10) arm64 Apple M1 Max Memory: 360.70 MB / 32.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 19.1.0 - ~/.nvm/versions/node/v19.1.0/bin/node Yarn: 1.22.19 - ~/.nvm/versions/node/v19.1.0/bin/yarn npm: 9.4.1 - ~/.nvm/versions/node/v19.1.0/bin/npm Watchman: 2023.01.30.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.3 - /Users/vitaliykononenko/.rvm/gems/ruby-3.1.2/bin/pod SDKs: iOS SDK: Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1 Android SDK: Not Found (PROBABLY BECAUSE I USE JetBains Toolbox) IDEs: Android Studio: Flamingo 2022.2.1 Beta 3 Flamingo 2022.2.1 Beta 3 Xcode: 14.2/14C18 - /usr/bin/xcodebuild Languages: Java: 11.0.17 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 16.13.1 => 16.13.1 react-native: 0.63.3 => 0.63.3 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:** - `16.4.6` - **`Firebase` module(s) you're using that has the issue:** - `Authentication` - **Are you using `TypeScript`?** - `Y` & `4.7.4`


VitoFromEarth commented 1 year ago

I went to the stacktrace it led me here image Then here image It looks like we get a null from error.getString("sessionId") and it leads to getNullableValue error. But it's only an assumption

VitoFromEarth commented 1 year ago

If we look at getJSError then we see that we record sessionId only in this case

image
mikehardy commented 1 year ago

This version is old enough I'm not sure it works:

"react-native": "0.63.3",

I imagine that could be the cause of the issue. react-native support is generally 2 prior versions https://github.com/reactwg/react-native-releases#releases-support-policy

VitoFromEarth commented 1 year ago

ok. So as i understand the only option right now is to upgrade the RN platform

mikehardy commented 1 year ago

You could stay on outdated react-native and code around the problem some how (it is open source after all) However, given react-native 0.63 is about 3 years old now and does not even compile with Xcode 13 - which is a requirement for uploading new versions I think at this point? - delaying the upgrade does not appear to make sense.

And I believe the error will go away once you are on the current version. So, probably worth it.

VitoFromEarth commented 1 year ago

Sure I understand that. Just wanted to know if there is a solution that could help fast while the migration is on the way. Thank you for help :)

Akshay-Niveus commented 1 year ago

@VitoFromEarth Is it resolved now? If so, then which version did you upgrade react-native to?

VitoFromEarth commented 1 year ago

@VitoFromEarth Is it resolved now? If so, then which version did you upgrade react-native to?

Updated to latest RN version. But on older RN you can drop support for auto code insert and it also fixes the issue for some reason on older RN version

luketgriffith commented 1 year ago

@Akshay-Niveus We ran into this issue on 0.63.3, and it turned out the root of the problem was the app's debug hash not being registered in the firebase console

lucifer-crybaby commented 1 year ago

I run into this problem also

I'm using: "react": "16.9.0" "react-native": "0.61.5" "@react-native-firebase/app": "^18.3.0"

The error: com.facebook.react.bridge.NoSuchKeyException: sessionId

Using logcat of adb it gave other error: signInWithCustomToken: onComplete:failure com.google.firebase.FirebaseNetworkException: A network error (such as timeout, interrupted connection or unreachable host) has occurred.

It led me here but still don't have any idea how to fix.