facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
119.47k stars 24.37k forks source link

com.facebook.react.common.JavascriptException: TypeError: l._unsubscribe1 is not a function. (In 'l._unsubscribe1()', 'l._unsubscribe1' is undefined) Issue #32639

Closed vicky123saini closed 2 years ago

vicky123saini commented 3 years ago

Description

Using Play Console, i view data for crashes and application not responding (ANR) errors for apps.

com.facebook.react.common.JavascriptException: TypeError: l._unsubscribe1 is not a function. (In 'l._unsubscribe1()', 'l._unsubscribe1' is undefined)

com.facebook.react.common.JavascriptException

java.lang.RuntimeException


pid: 0, tid: 0 >>> com.abc <<<

backtrace:

00 pc 00000000000f7748 /data/app/~~aDyezj1AvOH9O33Xp2FvZQ==/com.abc-XQMblOlSV1hKuBuTHHwWfA==/lib/arm64/libjsc.so (JSC::AccessCase::propagateTransitions(JSC::SlotVisitor&) const+16)

00 pc 0000000000143fe8 /data/app/~~aDyezj1AvOH9O33Xp2FvZQ==/com.abc-XQMblOlSV1hKuBuTHHwWfA==/lib/arm64/libjsc.so (JSC::PolymorphicAccess::propagateTransitions(JSC::SlotVisitor&) const+48)

00 pc 000000000012f0a8 /data/app/~~aDyezj1AvOH9O33Xp2FvZQ==/com.abc-XQMblOlSV1hKuBuTHHwWfA==/lib/arm64/libjsc.so (JSC::CodeBlock::propagateTransitions(JSC::ConcurrentJSLocker const&, JSC::SlotVisitor&)+556)

00 pc 0000000000139484 /data/app/~~aDyezj1AvOH9O33Xp2FvZQ==/com.abc-XQMblOlSV1hKuBuTHHwWfA==/lib/arm64/libjsc.so (JSC::ExecutableToCodeBlockEdge::runConstraint(JSC::ConcurrentJSLocker const&, JSC::VM&, JSC::SlotVisitor&)+40)

00 pc 000000000013900c /data/app/~~aDyezj1AvOH9O33Xp2FvZQ==/com.abc-XQMblOlSV1hKuBuTHHwWfA==/lib/arm64/libjsc.so (JSC::ExecutableToCodeBlockEdge::visitChildren(JSC::JSCell*, JSC::SlotVisitor&)+1044)

00 pc 00000000001fb9c4 /data/app/~~aDyezj1AvOH9O33Xp2FvZQ==/com.abc-XQMblOlSV1hKuBuTHHwWfA==/lib/arm64/libjsc.so (JSC::SlotVisitor::drain(WTF::MonotonicTime)::$_3::operator()(JSC::MarkStackArray&) const+324)

00 pc 00000000001f8e90 /data/app/~~aDyezj1AvOH9O33Xp2FvZQ==/com.abc-XQMblOlSV1hKuBuTHHwWfA==/lib/arm64/libjsc.so (JSC::SlotVisitor::drain(WTF::MonotonicTime)+132)

00 pc 00000000001f96bc /data/app/~~aDyezj1AvOH9O33Xp2FvZQ==/com.abc-XQMblOlSV1hKuBuTHHwWfA==/lib/arm64/libjsc.so (JSC::SlotVisitor::drainFromShared(JSC::SlotVisitor::SharedDrainMode, WTF::MonotonicTime)+580)

00 pc 00000000001e41a0 /data/app/~~aDyezj1AvOH9O33Xp2FvZQ==/com.abc-XQMblOlSV1hKuBuTHHwWfA==/lib/arm64/libjsc.so (WTF::SharedTaskFunctor<void (), JSC::Heap::runBeginPhase(JSC::GCConductor)::$_17>::run()+580)

00 pc 00000000006171ec /data/app/~~aDyezj1AvOH9O33Xp2FvZQ==/com.abc-XQMblOlSV1hKuBuTHHwWfA==/lib/arm64/libjsc.so (WTF::ParallelHelperClient::runTask(WTF::RefPtr<WTF::SharedTask<void ()>, WTF::DumbPtrTraits<WTF::SharedTask<void ()> > > const&)+40)

00 pc 0000000000617950 /data/app/~~aDyezj1AvOH9O33Xp2FvZQ==/com.abc-XQMblOlSV1hKuBuTHHwWfA==/lib/arm64/libjsc.so (WTF::ParallelHelperPool::Thread::work()+16)

00 pc 000000000060de7c /data/app/~~aDyezj1AvOH9O33Xp2FvZQ==/com.abc-XQMblOlSV1hKuBuTHHwWfA==/lib/arm64/libjsc.so (WTF::Function<void ()>::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0>::call()+376)

00 pc 000000000061b084 /data/app/~~aDyezj1AvOH9O33Xp2FvZQ==/com.abc-XQMblOlSV1hKuBuTHHwWfA==/lib/arm64/libjsc.so (WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*)+212)

00 pc 0000000000646dc8 /data/app/~~aDyezj1AvOH9O33Xp2FvZQ==/com.abc-XQMblOlSV1hKuBuTHHwWfA==/lib/arm64/libjsc.so (WTF::wtfThreadEntryPoint(void*)+4)

00 pc 00000000000ecc10 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64)

00 pc 000000000008c360 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

However, I got this error, and I cannot find any solution

Package.json

{ "name": "", "version": "0.0.1", "private": true, "scripts": { "android": "react-native run-android", "ios": "react-native run-ios", "start": "react-native start", "test": "jest", "lint": "eslint ." }, "dependencies": { "@react-native-community/async-storage": "^1.12.1", "@react-native-community/datetimepicker": "^3.5.0", "@react-native-community/masked-view": "^0.1.11", "@react-native-firebase/analytics": "^12.2.0", "@react-native-firebase/app": "^12.2.0", "@react-native-firebase/messaging": "^12.2.0", "@react-native-google-signin/google-signin": "^6.0.0", "@react-navigation/bottom-tabs": "^5.11.10", "@react-navigation/native": "^5.9.4", "@react-navigation/stack": "^5.14.4", "jwt-decode": "^3.1.2", "moment": "^2.29.1", "native-base": "^2.13.15", "paytm_allinone_react-native": "^1.0.9", "react": "17.0.1", "react-native": "0.64.0", "react-native-autocomplete-input": "^5.0.2", "react-native-background-timer": "^2.4.1", "react-native-device-info": "^8.3.1", "react-native-elements": "^3.4.2", "react-native-gesture-handler": "^1.10.3", "react-native-image-crop-picker": "^0.36.2", "react-native-keep-awake": "^4.0.0", "react-native-keyboard-aware-scroll-view": "^0.9.4", "react-native-linear-gradient": "^2.5.6", "react-native-modal-overlay": "^1.3.1", "react-native-otp-verify": "^1.0.4", "react-native-razorpay": "^2.2.5", "react-native-reanimated": "^2.1.0", "react-native-render-html": "^6.1.0", "react-native-safe-area-context": "^3.2.0", "react-native-screens": "^3.1.1", "react-native-sound-player": "^0.11.1", "react-native-stars": "^1.2.2", "react-native-swiper": "^1.6.0", "react-native-switch": "^2.0.0", "react-native-twilio-video-webrtc": "^2.0.0", "react-native-webview": "^11.6.2", "react-native-wheel-datepicker": "^2.2.3", "rn-swipe-button": "^1.3.4", "singular-react-native": "^2.0.1", "websocket": "^1.0.34" }, "devDependencies": { "@babel/core": "7.14.0", "@babel/runtime": "7.14.0", "@react-native-community/eslint-config": "2.0.0", "babel-jest": "26.6.3", "eslint": "7.14.0", "jest": "26.6.3", "metro-react-native-babel-preset": "0.64.0", "react-test-renderer": "17.0.1" }, "jest": { "preset": "react-native" } }

app/buile.gradle

apply plugin: "com.android.application" apply plugin: 'com.google.gms.google-services' import com.android.build.OutputFile

/**

project.ext.react = [ enableHermes: false, // clean and rebuild if changing ]

apply from: "../../node_modules/react-native/react.gradle"

/**

/**

/**

/**

android { ndkVersion rootProject.ext.ndkVersion

compileSdkVersion rootProject.ext.compileSdkVersion

compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}

defaultConfig {
    applicationId "com.abc"
    minSdkVersion rootProject.ext.minSdkVersion
    targetSdkVersion rootProject.ext.targetSdkVersion
    versionCode 15
    versionName "2.1.3"
}
signingConfigs {
    release {
        if (project.hasProperty('MYAPP_UPLOAD_STORE_FILE')) {
            storeFile file(MYAPP_UPLOAD_STORE_FILE)
            storePassword MYAPP_UPLOAD_STORE_PASSWORD
            keyAlias MYAPP_UPLOAD_KEY_ALIAS
            keyPassword MYAPP_UPLOAD_KEY_PASSWORD
        }
    }
}
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'
        if (project.hasProperty('MYAPP_UPLOAD_STORE_FILE')) {
            storeFile file(MYAPP_UPLOAD_STORE_FILE)
            storePassword MYAPP_UPLOAD_STORE_PASSWORD
            keyAlias MYAPP_UPLOAD_KEY_ALIAS
            keyPassword MYAPP_UPLOAD_KEY_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.debug
        minifyEnabled enableProguardInReleaseBuilds
        proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
    }
}

// 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
        // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
        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 =
                    defaultConfig.versionCode * 1000 + versionCodes.get(abi)
        }

    }
}

}

dependencies { implementation platform('com.google.firebase:firebase-bom:28.2.1') implementation 'com.google.firebase:firebase-analytics'

implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0'

implementation fileTree(dir: "libs", include: ["*.jar"])
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+"  // From node_modules

implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
//for gif
implementation 'com.facebook.fresco:animated-gif:2.0.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
}

implementation(project(":react-native-google-signin"))

implementation "com.squareup.okhttp3:okhttp:4.2.1"
implementation "com.squareup.okhttp3:logging-interceptor:4.2.1"
implementation "com.squareup.okhttp3:okhttp-urlconnection:4.2.1"

}

// 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)

Version

0.64.0

Output of react-native info

System: OS: Windows 10 10.0.19042 CPU: (4) x64 Intel(R) Core(TM) i5-4440S CPU @ 2.80GHz Memory: 3.83 GB / 9.90 GB Binaries: Node: 12.16.1 - C:\Program Files\nodejs\node.EXE Yarn: Not Found npm: 6.13.4 - C:\Program Files\nodejs\npm.CMD Watchman: Not Found SDKs: Android SDK: API Levels: 16, 22, 23, 25, 27, 28, 29, 30, 31 Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.0, 30.0.2, 30.0.3, 32.0.0 System Images: android-22 | Google APIs Intel x86 Atom, android-22 | Google APIs Intel x86 Atom_64, android-24 | Google APIs Intel x86 Atom_64, android-24 | Google Play Intel x86 Atom, android-25 | Google APIs Intel x86 Atom, android-25 | Google APIs Intel x86 Atom_64, android-29 | Google Play Intel x86 Atom, android-29 | Google Play Intel x86 Atom_64
Android NDK: Not Found Windows SDK: Not Found IDEs: Android Studio: Not Found Visual Studio: 16.9.31129.286 (Visual Studio Community 2019) Languages: Java: 1.8.0_241 npmPackages: @react-native-community/cli: Not Found react: 17.0.1 => 17.0.1 react-native: 0.64.0 => 0.64.0 react-native-windows: Not Found npmGlobalPackages: react-native: Not Found

Steps to reproduce

  1. build apk from android studio.
  2. upload apk to google play store.

Snack, code example, screenshot, or link to a repository

No response

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.