facebook / react-native

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

Invariant Violation: Native module cannot be null #30790

Closed roxanne-4731 closed 8 months ago

roxanne-4731 commented 3 years ago

Description

In ios version, after xcode build succeeded and install app on device not simulator i get this error. I can run the app using react-native run-ios command on simulator without any bug or error, however through xcode i get this error.

"Terminating app due to uncaught exception 'RCTFatalException: Unhandled JS Exception: Invariant Violation: Native module cannot be null.', reason: 'Unhandled JS Exception: Invariant Violation: Native module cannot be null."

package.json:

{ "name": "emzami", "version": "0.0.3", "private": true, "scripts": { "android": "react-native run-android", "ios": "react-native run-ios", "start": "react-native start", "test": "jest", "lint": "eslint .", "bump-patch": "npm version patch --no-git-tag-version && bundle exec fastlane bump", "bump-minor": "npm version minor --no-git-tag-version && bundle exec fastlane bump", "bump-major": "npm version major --no-git-tag-version && bundle exec fastlane bump" }, "rnpm": { "assets": [ "./src/assets/fonts/" ] }, "dependencies": { "@haskkor/react-native-pincode": "^1.22.5", "@mohamadkh75/react-native-jalali-datepicker": "^1.1.0", "@react-native-community/async-storage": "^1.11.0", "@react-native-community/blur": "^3.6.0", "@react-native-community/progress-bar-android": "^1.0.3", "@react-native-community/progress-view": "^1.1.1", "@react-native-community/push-notification-ios": "^1.8.0", "axios": "^0.19.2", "lodash": "^4.17.20", "lottie-react-native": "^3.5.0", "md5": "^2.3.0", "moment-jalaali": "^0.9.2", "pdf-lib": "^1.11.1", "prop-types": "^15.7.2", "react": "16.13.1", "react-native": "0.63.1", "react-native-base64": "^0.2.1", "react-native-confirmation-code-field": "^6.5.0", "react-native-device-info": "^7.0.2", "react-native-fingerprint-scanner": "^6.0.0", "react-native-flash-message": "^0.1.16", "react-native-fs": "^2.16.6", "react-native-gesture-handler": "^1.7.0", "react-native-linear-gradient": "^2.5.6", "react-native-loading-spinner-overlay": "^1.1.0", "react-native-pdf": "^6.2.0", "react-native-push-notification": "^6.1.2", "react-native-reanimated": "^1.13.0", "react-native-restart": "0.0.17", "react-native-router-flux": "^4.2.0", "react-native-rsa-native": "^2.0.3", "react-native-screens": "^2.10.1", "react-native-segmented-control-tab": "^3.4.1", "react-native-sensitive-info": "^6.0.0-alpha.2", "react-native-shadow": "^1.2.2", "react-native-share": "^4.1.0", "react-native-signature-canvas": "^3.1.0", "react-native-svg": "^12.1.0", "react-native-vector-icons": "^7.0.0", "react-native-webview": "^10.9.0", "react-redux": "^7.2.1", "redux": "^4.0.5", "redux-thunk": "^2.3.0", "rn-fetch-blob": "^0.12.0", "utf8": "^3.0.0", "validate.js": "^0.13.1" }, "devDependencies": { "@babel/core": "^7.8.4", "@babel/preset-env": "^7.12.1", "@babel/runtime": "^7.8.4", "@react-native-community/eslint-config": "^1.1.0", "babel-jest": "^25.5.1", "babel-plugin-module-resolver": "^4.0.0", "babel-plugin-transform-remove-console": "^6.9.4", "babel-preset-react-native": "^4.0.1", "eslint": "^6.5.1", "jest": "^25.5.4", "jest-react-native": "^18.0.0", "metro-react-native-babel-preset": "^0.64.0", "react-test-renderer": "^16.13.1" }, "jest": { "preset": "react-native" } }

Results

Screen Shot 2021-01-25 at 9 25 20 PM

Thanks.

tanz98 commented 1 year ago

same here, i try to run my release architecture but got this error. but if i run debug architecture is run smoothly. Any idea?

github-actions[bot] commented 8 months 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.

github-actions[bot] commented 8 months ago

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