question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

0.65 Android repeated app crash. catalyst instance has already disappeared.

See original GitHub issue

Description

I recently upgraded my react-native version from 0.64.2 to 0.65.1. The iOS version works fine but the android version has started throwing errors for basically all native modules: Screen Shot 1400-06-13 at 13 50 51 Screen Shot 1400-06-13 at 13 52 01 Previously i had seen such issue with reanimated 2 in this issue however it is happening constantly on the new version with all sorts of modules. The app worked fine on 0.64.2 and no other packages were updated. Hermes is also enabled on the Android version.

React Native version:

    OS: macOS 11.5.2
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 191.53 MB / 16.00 GB
    Shell: 5.8 - /usr/local/bin/zsh
  Binaries:
    Node: 16.5.0 - ~/.nvm/versions/node/v16.5.0/bin/node
    Yarn: 1.22.5 - /usr/local/bin/yarn
    npm: 7.19.1 - ~/.nvm/versions/node/v16.5.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.1 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
    Android SDK:
      API Levels: 28, 29, 30
      Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.2
      System Images: android-28 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom
      Android NDK: 22.0.7026061
  IDEs:
    Android Studio: Arctic Fox 2020.3.1 Patch 1 Arctic Fox 2020.3.1 Patch 1
    Xcode: 12.5.1/12E507 - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_242 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2 
    react-native: 0.65.1 => 0.65.1 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

  1. Updated existing app from 0.64.2 to 0.65.1 using react-native upgrade helper that had hermes enabled
  2. npx react-native start
  3. npx react-native run-android
  4. see the above errors in flipper

Expected Results

Expected to run without crashing as nothing else was changed.

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

currently incapable of giving a code snippet as the app in it’s full has a problem but here is the package.json file:

{
  "name": "ourAppName",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "clean-grade": "cd android && ./gradlew clean",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "build": "npm run build-ts",
    "build-ts": "tsc",
    "lint": "eslint . --ext .js,.jsx,.ts,.tsx"
  },
  "dependencies": {
    "@ovalmoney/react-native-fitness": "^0.5.3",
    "@persian-tools/persian-tools": "1.6.1",
    "@react-native-async-storage/async-storage": "^1.15.1",
    "@react-native-community/masked-view": "^0.1.10",
    "@react-native-community/netinfo": "^6.0.0",
    "@react-native-community/progress-view": "^1.2.4",
    "@react-native-community/slider": "^3.0.3",
    "@react-native-firebase/analytics": "^12.7.3",
    "@react-native-firebase/app": "^12.7.3",
    "@react-native-firebase/messaging": "^12.7.3",
    "@react-native-google-signin/google-signin": "^6.0.0",
    "@react-navigation/bottom-tabs": "^5.11.9",
    "@react-navigation/native": "^5.9.3",
    "@react-navigation/stack": "^5.14.3",
    "axios": "^0.21.1",
    "i18next": "^20.2.1",
    "jalali-moment": "^3.3.10",
    "lottie-ios": "3.1.8",
    "lottie-react-native": "^4.0.2",
    "react": "17.0.2",
    "react-i18next": "^11.8.13",
    "react-native": "0.65.1",
    "react-native-animatable": "^1.3.3",
    "react-native-background-timer": "^2.4.1",
    "react-native-chart-kit": "^6.11.0",
    "react-native-circular-progress": "^1.3.7",
    "react-native-color-matrix-image-filters": "^5.2.10",
    "react-native-device-info": "^8.1.3",
    "react-native-gesture-handler": "^1.10.3",
    "react-native-image-crop-picker": "^0.36.2",
    "react-native-indicators": "^0.17.0",
    "react-native-keyboard-spacer": "^0.4.1",
    "react-native-linear-gradient": "^2.5.6",
    "react-native-modal": "^11.7.0",
    "react-native-notifications": "^3.4.2",
    "react-native-orientation-locker": "^1.3.1",
    "react-native-paper": "^4.7.2",
    "react-native-restart": "^0.0.22",
    "react-native-safe-area-context": "^3.2.0",
    "react-native-screens": "^3.0.0",
    "react-native-share": "^6.2.0",
    "react-native-sound-player": "^0.10.8",
    "react-native-splash-screen": "^3.2.0",
    "react-native-svg": "^12.1.0",
    "react-native-toast-message": "^1.4.9",
    "react-native-track-player": "^2.0.3",
    "react-native-tts": "^4.1.0",
    "react-native-vector-icons": "^8.1.0",
    "react-native-video": "^5.1.1",
    "react-native-view-shot": "^3.1.2",
    "react-native-webview": "^11.3.2",
    "react-native-wheel-pick": "^1.1.0",
    "react-redux": "^7.2.3",
    "react-timer-hook": "^3.0.3",
    "redux": "^4.0.5",
    "redux-saga": "^1.1.3"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@babel/runtime": "^7.12.5",
    "@react-native-community/eslint-config": "^2.0.0",
    "@types/enzyme": "^3.10.8",
    "@types/jest": "^26.0.23",
    "@types/react-native": "^0.64.0",
    "@types/react-native-restart": "^0.0.0",
    "@types/react-native-video": "^5.0.4",
    "@types/react-test-renderer": "^16.9.2",
    "@wojtekmaj/enzyme-adapter-react-17": "^0.6.1",
    "babel-jest": "^26.6.3",
    "babel-plugin-module-resolver": "^4.1.0",
    "enzyme": "^3.11.0",
    "enzyme-adapter-react-16": "^1.15.6",
    "eslint": "^7.14.0",
    "jest": "^27.0.3",
    "jest-enzyme": "^7.1.2",
    "jest-svg-transformer": "^1.0.0",
    "jsdom": "^16.6.0",
    "jsdom-global": "^3.0.2",
    "metro-react-native-babel-preset": "^0.66.0",
    "react-dom": "^17.0.2",
    "react-native-svg-transformer": "^0.14.3",
    "react-test-renderer": "17.0.2",
    "react-native-codegen": "^0.0.7",
    "redux-devtools-extension": "^2.13.9",
    "redux-saga-test-plan": "^4.0.3",
    "ts-jest": "^27.0.2",
    "typescript": "^4.3.2"
  },
  "resolutions": {
    "@types/react": "^17"
  },
  "jest": {
    "preset": "react-native",
    "moduleFileExtensions": [
      "ts",
      "tsx",
      "js",
      "jsx",
      "json",
      "node"
    ],
    "setupFiles": [
      "<rootDir>/jest/setup.ts"
    ],
    "setupFilesAfterEnv": [
      "<rootDir>/jest/setup-tests.ts"
    ],
    "moduleNameMapper": {
      "^.+\\.svg$": "<rootDir>/jest/__mocks__/svgMock.ts"
    },
    "transformIgnorePatterns": [
      "node_modules/(?!(@react-native|react-native|i18next|react-native-video|react-native-svg|react-native-spacing-system|@react-navigation|react-native-iphone-x-helper)/)"
    ]
  },
  "isSwift": true
}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:8

github_iconTop GitHub Comments

2reactions
TheRogue76commented, Oct 7, 2021

Hi @TheRogue76

… While i did eventually stabilize the app (The crash was happening due to react native splash screen on android, as the way react native behaves had changed once we got to 0.65) …

How did you stabilize your application?

I am also encountering this issue and currently using react-native-splash-screen with version 3.2.0 (but with react-native 0.63.4).

In my case, what was happening was that i did not have a native splash screen on Android, only iOS, and once the app would launch i would call the SplashScreen.hide() method on both versions. In debug mode and in the production version of the app, before 0.65.1, this would cause a silent background error upon the app’s first launch ONLY. Once we got to 0.65.1 however this turned into a full blown crash as something had changed under the hood. handling this edge case got it stable again.

0reactions
github-actions[bot]commented, Jan 26, 2022

This issue was closed because it has been stalled for 7 days with no activity.

Read more comments on GitHub >

github_iconTop Results From Across the Web

java.lang.runtimeexception: catalyst instance has already ...
I've been trying to solve this problem for a long time. Tried all installation options. Bug report. Android application crashes when calling RNCallKeep.setup( ......
Read more >
Catalyst Instance has already disappeared: requested by ...
Description. I am integrating react-native with cross-platform support, android (error found), ios (not tested), web (works correctly).
Read more >
Crashes - Android Developers
An Android app crashes whenever there's an unexpected exit caused by an unhandled exception or signal. An app that is written using Java...
Read more >
Avoiding the Stock Market May Cost Millennials 3 3 Million ...
If there are years when you don't save money, the money you've already invested continues to work for you during that time. Funds...
Read more >
App Center Crashes for React Native - Microsoft Learn
App Center Crashes will automatically generate a crash log every time your app crashes. The log is first written to the device's storage...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found