React Native: No dimension set for key window in production - react-native

I'm getting this error
RCTFatalException: Unhandled JS Exception: No dimension set for key windowmh_execute_header
Unhandled JS Exception: No dimension set for key window, stack: value#75:505
in production. I believe that it's an issue with RN: https://github.com/facebook/react-native/issues/13758
All of the solutions in that thread look like they are for the development environment. Is there a way to fix this for production (after uploading a new build of course)?
"dependencies": {
"#yfuks/react-native-action-sheet": "latest",
"bugsnag-react-native": "^2.2.3",
"iap-receipt-validator": "^1.0.6",
"js-uuid": "^0.0.6",
"lodash": "^4.17.4",
"moment": "^2.17.1",
"phoenix": "^1.2.1",
"react": "16.0.0-alpha.6",
"react-native": "0.44.0",
"react-native-animatable": "^1.1.0",
"react-native-aws3": "^0.0.8",
"react-native-code-push": "^2.0.3-beta",
"react-native-collapsible": "^0.8.0",
"react-native-elevated-view": "^0.0.3",
"react-native-firestack": "^2.3.9",
"react-native-flags": "^1.0.0",
"react-native-geocoder": "^0.4.8",
"react-native-image-picker": "^0.26.1",
"react-native-image-resizer": "^0.1.0",
"react-native-in-app-utils": "^5.2.3",
"react-native-incall-manager": "^2.1.0",
"react-native-keep-awake": "^2.0.4",
"react-native-loading-spinner-overlay": "latest",
"react-native-localization": "^0.1.30",
"react-native-modalbox": "^1.3.9",
"react-native-permissions": "^0.2.7",
"react-native-progress": "^3.2.1",
"react-native-push-notification": "^2.2.1",
"react-native-sound": "^0.10.0",
"react-native-spinkit": "^1.0.2",
"react-native-swiper": "^1.5.4",
"react-native-vector-icons": "^4.0.0",
"react-native-webrtc": "^1.57.0",
"react-native-zzy-toast": "^0.1.3",
"react-redux": "^5.0.3",
"redux": "^3.6.0",
"redux-logger": "^2.8.2",
"redux-observable": "^0.14.1",
"redux-persist": "^4.5.0",
"rn-splash-screen": "^4.0.0",
"rxjs": "^5.2.0"
},

If have you installed react-native-router-flux 3.38.0 after removing "^" from dependencies?

Related

react-native - ExceptionsManager.js:151 Invariant Violation: `new NativeEventEmitter()` requires a non-null argument

I'm having an error on iOS.
Where's the error coming from? I cannot track which library it came from.
I already did cleaning up the Pods
I also tried to clean the cache and reinstalling the packages.
But no luck.
I'm currently upgrading the react-native into 0.70.
Here's my package
"#react-native-async-storage/async-storage": "^1.17.11",
"#react-native-clipboard/clipboard": "^1.11.1",
"#react-native-community/art": "^1.2.0",
"#react-native-community/netinfo": "^9.3.6",
"#react-native-firebase/analytics": "14.1.0",
"#react-native-firebase/app": "14.1.0",
"#react-native-firebase/auth": "14.1.0",
"#react-native-firebase/firestore": "14.1.0",
"#react-native-firebase/messaging": "14.1.0",
"#react-native-masked-view/masked-view": "^0.2.8",
"#react-navigation/native": "^6.0.14",
"#react-navigation/native-stack": "^6.9.2",
"#reduxjs/toolkit": "^1.9.0",
"add": "^2.0.6",
"appcenter": "^4.4.5",
"appcenter-analytics": "^4.4.5",
"appcenter-crashes": "^4.4.5",
"axios": "0.19.2",
"deprecated-react-native-prop-types": "^2.3.0",
"moment": "^2.29.4",
"postinstall-postinstall": "^2.1.0",
"react": "18.1.0",
"react-native": "0.70.6",
"react-native-actions-sheet": "^0.8.10",
"react-native-android-location-services-dialog-box": "^2.8.2",
"react-native-animatable": "^1.3.3",
"react-native-background-fetch": "^4.1.5",
"react-native-background-geolocation": "^4.9.3",
"react-native-cardview": "^2.0.5",
"react-native-code-push": "^7.0.5",
"react-native-config": "1.4.6",
"react-native-contacts": "^7.0.5",
"react-native-date-picker": "^4.2.6",
"react-native-datepicker": "^1.7.2",
"react-native-device-info": "^10.3.0",
"react-native-fast-image": "^8.6.3",
"react-native-fbsdk": "^3.0.0",
"react-native-flash-message": "^0.3.1",
"react-native-geolocation-service": "^5.3.1",
"react-native-gesture-handler": "^2.8.0",
"react-native-image-picker": "^4.10.1",
"react-native-ionicons": "^4.6.5",
"react-native-keyboard-aware-scrollview": "^2.1.0",
"react-native-linear-gradient": "^2.6.2",
"react-native-loader": "^1.3.1",
"react-native-maps": "^1.3.2",
"react-native-pager-view": "^6.1.1",
"react-native-paper": "^4.12.5",
"react-native-rate": "^1.2.9",
"react-native-ratings": "^8.1.0",
"react-native-reanimated": "^2.13.0",
"react-native-render-html": "^6.3.4",
"react-native-restart": "^0.0.24",
"react-native-safe-area-context": "^4.4.1",
"react-native-screens": "^3.18.2",
"react-native-shadow-cards": "^1.0.2",
"react-native-simple-radio-button": "^2.7.4",
"react-native-skeleton-placeholder": "^5.2.4",
"react-native-splash-screen": "^3.3.0",
"react-native-svg": "^13.6.0",
"react-native-swipeable-row": "^0.8.1",
"react-native-tab-view": "^3.3.0",
"react-native-vector-icons": "^9.2.0",
"react-native-web-swiper": "^2.2.4",
"react-native-webview": "^11.23.1",
"react-navigation": "^4.4.4",
"react-navigation-stack": "^2.10.4",
"react-redux": "^8.0.5",
"redux-persist": "^6.0.0",
"redux-saga": "^1.2.1",
"rn-bootstrap-utilities": "^0.0.6",
"util": "^0.12.5",
"uuidv4": "^6.2.13"
Thank you in advance.

Invariant Violation: Tried to register two views with the same name RNSVGSvgView

I added this lib:
https://github.com/mdjfs/expo-image-multiple-picker
then I get this err:
Invariant Violation: Tried to register two views with the same name RNSVGSvgView
ERROR Invariant Violation: "main" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called.
package.json
"dependencies": {
"#babel/preset-typescript": "^7.17.12",
"#gorhom/bottom-sheet": "^4.4.0",
"#ramotion/react-native-circle-menu": "^1.0.0",
"#react-native-community/datetimepicker": "6.2.0",
"#react-navigation/bottom-tabs": "6.3.3",
"#react-navigation/native": "6.0.12",
"#react-navigation/native-stack": "6.8.0",
"#reduxjs/toolkit": "^1.8.0",
"#shopify/flash-list": "1.1.0",
"#testing-library/react-native": "^9.0.0",
"#types/jest": "^27.4.1",
"#types/react-native-countdown-component": "^2.7.0",
"axios": "^0.26.1",
"d3-shape": "^3.1.0",
"date-fns": "^2.28.0",
"expo": "^46.0.0",
"expo-app-loading": "~2.1.0",
"expo-constants": "~13.2.3",
"expo-facebook": "~12.2.0",
"expo-font": "~10.2.0",
"expo-haptics": "~11.3.0",
"expo-image-multiple-picker": "^4.5.0",
"expo-image-picker": "~13.3.1",
"expo-linear-gradient": "~11.4.0",
"expo-linking": "~3.2.2",
"expo-media-library": "~14.2.0",
"expo-screen-capture": "~4.3.0",
"expo-screen-orientation": "~4.3.0",
"expo-secure-store": "~11.3.0",
"expo-sharing": "~10.3.0",
"expo-status-bar": "~1.4.0",
"formik": "^2.2.9",
"i18next": "^21.6.14",
"i18next-browser-languagedetector": "^6.1.3",
"i18next-http-backend": "^1.4.0",
"intl": "^1.2.5",
"jest": "^26.6.3",
"jest-expo": "^46.0.0",
"lodash": "^4.17.21",
"lottie-react-native": "5.1.3",
"prop-types": "^15.8.1",
"re-reselect": "^4.0.0",
"react": "18.0.0",
"react-dom": "18.0.0",
"react-fast-compare": "^3.2.0",
"react-freeze": "^1.0.0",
"react-hook-form": "^7.31.3",
"react-i18next": "^11.16.1",
"react-native": "0.69.6",
"react-native-big-list": "^1.5.4",
"react-native-chart-kit": "^6.12.0",
"react-native-collapsible-tab-view": "^5.0.0-rc.6",
"react-native-confirmation-code-field": "^7.3.0",
"react-native-countdown-component": "^2.7.1",
"react-native-gesture-handler": "~2.5.0",
"react-native-image-viewing": "^0.2.2",
"react-native-interactions": "^0.4.0",
"react-native-keyboard-aware-scroll-view": "^0.9.5",
"react-native-modalize": "^2.0.13",
"react-native-pager-view": "5.4.24",
"react-native-portalize": "^1.0.7",
"react-native-reanimated": "~2.9.1",
"react-native-reanimated-carousel": "3.1.0",
"react-native-redash": "^16.2.3",
"react-native-safe-area-context": "4.3.1",
"react-native-screens": "~3.15.0",
"react-native-select-dropdown": "^2.0.0",
"react-native-skeleton-content": "^1.0.28",
"react-native-slider": "^0.11.0",
"react-native-svg": "12.3.0",
"react-native-tab-view": "^3.1.1",
"react-native-toast-message": "^2.1.5",
"react-native-uuid": "^2.0.1",
"react-native-web": "~0.18.7",
"react-redux": "^7.2.6",
"react-verification-input": "^2.0.6",
"reanimated-bottom-sheet": "^1.0.0-alpha.22",
"recyclerlistview": "^3.0.5",
"reselect": "^4.1.5",
"tinycolor2": "^1.4.2",
"yup": "^0.32.11"
},
"devDependencies": {
"#babel/core": "^7.18.6",
"#types/react": "~18.0.0",
"#types/react-native": "~0.69.1",
"#types/react-redux": "^7.1.23",
"#types/tinycolor2": "^1.4.3",
"babel-eslint": "^10.1.0",
"babel-plugin-module-resolver": "^4.1.0",
"deprecated-react-native-prop-types": "^2.3.0",
"eslint": "^8.12.0",
"react-native-dotenv": "^3.3.1",
"typescript": "^4.6.3"
},
"private": true
so what can I do to prevent this error message ? thank you for your answers
................................................................................................................................................................................................................
This usually resolves by stopping the Metro bundler, deleting your /node_modules and /ios/Pods folders, running yarn install && npx pod-install, restarting the bundler -- yarn start, and rebuilding your application.
N.B. Replace yarn with npm if you are using npm for package management.

instagram login error:- Invariant Violation: Tried to register two views with the same name RNCWebview when instagram login in react native

I want to implement an Instagram login. but when I install react-native-instagram-login npm and place this code
import InstagramLogin from 'react-native-instagram-login';
<InstagramLogin
ref={ref => (this.instagramLogin = ref)}
appId='your-app-id'
appSecret='your-app-secret'
redirectUrl='your-redirect-Url'
scopes={['user_profile', 'user_media']}
onLoginSuccess={this.setIgToken}
onLoginFailure={(data) => console.log(data)}
/>
and run this code, get an error -
1.Invariant Violation: Tried to register two views with the same name RNCWebview when instagram login in react native
2.Module AppRegistry is not registered callable module (calling runApplication)
how to get rid of this error.
here package.json
"dependencies": {
"#react-native-community/cookies": "^5.0.1",
"#react-native-community/masked-view": "^0.1.10",
"#react-native-community/viewpager": "^5.0.11",
"#react-native-google-signin/google-signin": "^6.0.0",
"firebase": "^8.6.0",
"html-entities": "^1.3.1",
"lottie-react-native": "^3.5.0",
"native-base": "^2.13.12",
"react": "^17.0.2",
"react-dom": "^16.13.1",
"react-native": "0.63.2",
"react-native-agora": "^3.2.2",
"react-native-animated-loader": "0.0.8",
"react-native-awesome-alerts": "^1.3.3",
"react-native-banner-carousel": "^1.0.3",
"react-native-checkbox-heaven": "^0.1.6",
"react-native-datepicker": "^1.7.2",
"react-native-document-picker": "^5.0.3",
"react-native-fbsdk-next": "^4.1.0",
"react-native-gesture-handler": "^1.7.0",
"react-native-get-random-values": "^1.6.0",
"react-native-gifted-chat": "^0.16.3",
"react-native-image-view": "^2.1.9",
"react-native-image-viewing": "^0.2.0",
"react-native-image-zoom-viewer": "^3.0.1",
"react-native-instagram-login": "^2.0.4",
"react-native-keyboard-aware-scrollview": "^2.1.0",
"react-native-linear-gradient": "^2.5.6",
"react-native-login-twitter": "^3.0.4",
"react-native-material-dropdown": "^0.11.1",
"react-native-media-controls": "^2.3.0",
"react-native-pager-view": "^5.1.6",
"react-native-reanimated": "^1.12.0",
"react-native-render-html": "^4.2.3",
"react-native-responsive-dimensions": "^3.1.1",
"react-native-safe-area-context": "^3.1.4",
"react-native-screens": "^2.10.1",
"react-native-share": "^3.7.0",
"react-native-shimmer-placeholder": "^1.0.36",
"react-native-splash-screen": "^3.2.0",
"react-native-star-rating": "^1.1.0",
"react-native-tab-view": "^2.15.2",
"react-native-thumbnail-video": "^0.1.2",
"react-native-vector-icons": "^7.0.0",
"react-native-video": "^5.1.1",
"react-native-video-controls": "^2.7.1",
"react-native-web": "^0.13.6",
"react-native-webview": "^11.6.2",
"react-navigation": "^4.4.0",
"react-navigation-drawer": "^2.5.0",
"react-navigation-stack": "^2.8.2",
"react-navigation-tabs": "^2.9.0",
"react-redux": "^7.2.1",
"redux": "^4.0.5",
"uuid": "^8.3.2"
},
remove "react-native-webview" in "react-native-instagram-login"
rm -rf node_modules/react-native-instagram-login/node_modules/react-native-webview
because duplicate "react-native-webview"

Unable to build react-native android app after updating to AndroidX and react-native version 0.59.10

I am getting the below error after updating my react-native version to 0.59.10 on android.
(0,react.memo) is not a function.(in '(0,_react.memo)(FastimageBase)')'),'(0,_react.memo)' is undefined)
My Package.json file is as follows:
"dependencies": {
"#ptomasroos/react-native-multi-slider": "^1.0.0",
"#pusher/chatkit-client": "^1.4.1",
"axios": "^0.18.0",
"base-64": "^0.1.0",
"esdoc": "^1.1.0",
"esdoc-standard-plugin": "^1.0.0",
"moment": "^2.22.2",
"native-base": "^2.13.4",
"npm": "^6.1.0",
"password-validator": "^4.1.1",
"react": "^16.6.0",
"react-native": "0.59.10",
"react-native-actionsheet": "^2.4.2",
"react-native-animatable": "^1.3.0",
"react-native-aws3": "0.0.8",
"react-native-base64": "0.0.2",
"react-native-circular-progress": "^1.1.0",
"react-native-confirmation-code-field": "^3.1.2",
"react-native-document-picker": "^2.2.0",
"react-native-dynamic-cropper": "^0.1.0",
"react-native-easy-toast": "^1.2.0",
"react-native-email": "^1.0.2",
"react-native-fast-image": "^6.1.1",
"react-native-firebase": "^5.4.2",
"react-native-floating-action": "^1.13.0",
"react-native-fs": "^2.13.3",
"react-native-gifted-chat": "^0.7.3",
"react-native-image-crop-picker": "^0.24.1",
"react-native-image-pan-zoom": "^2.1.11",
"react-native-image-progress": "^1.1.1",
"react-native-imagepicker": "^2.0.0",
"react-native-localization": "^2.0.1",
"react-native-material-textfield": "^0.12.0",
"react-native-mixpanel": "^1.1.1",
"react-native-modal": "^7.0.2",
"react-native-modal-datetime-picker": "^6.1.0",
"react-native-open-settings": "^1.0.1",
"react-native-pdf": "^5.1.3",
"react-native-permissions": "^1.1.1",
"react-native-phone-call": "^1.0.9",
"react-native-popup-dialog": "^0.18.2",
"react-native-progress": "^3.5.0",
"react-native-shadow": "^1.2.2",
"react-native-share": "^1.2.1",
"react-native-simple-radio-button": "^2.7.3",
"react-native-svg": "^8.0.11",
"react-native-uuid-generator": "^5.0.0",
"react-native-version-number": "^0.3.5",
"react-navigation": "^2.17.0",
"react-redux": "^5.1.1",
"redux": "^4.0.4",
"redux-thunk": "^2.3.0",
"rn-fetch-blob": "^0.10.15",
"rn-sliding-up-panel": "^1.3.1",
"rollbar-react-native": "^0.5.0"
}
Please change version by running following command:
`npm install react-redux#6.0.1 --save`
Make sure you have react version 16.8.3 and then reset cache before running app with
npm start -- --reset-cache

React-Native: Constantly get XCode break stops

I have upgraded an older React Native project to 0.47, 0.48 and then 0.49.x. Since I've done so, I keep getting XCode breaking at random moments with the following breakpoint (sometimes others).
My dependencies
"dependencies": {
"autobind-decorator": "^2.1.0",
"cheerio-without-node-native": "^0.20.2",
"diacritic": "0.0.2",
"expect": "^1.20.2",
"harmony-proxy": "^1.0.1",
"hoist-non-react-statics": "^2.3.1",
"immutable": "^3.8.1",
"lodash": "^4.17.4",
"lodash-es": "^4.17.4",
"lodash.debounce": "^4.0.8",
"lodash.memoize": "^4.1.2",
"lodash.mergewith": "^4.6.0",
"lodash.sorteduniq": "^4.2.0",
"lodash.sorteduniqby": "^4.7.0",
"lodash.union": "^4.6.0",
"lodash.unionwith": "^4.6.0",
"lodash.uniqby": "^4.7.0",
"mime-types": "^2.1.17",
"moment": "^2.18.1",
"normalizr": "^3.2.3",
"normalizr-immutable": "0.0.4-beta12",
"path": "^0.12.7",
"react": "16.0.0-alpha.12",
"react-immutable-proptypes": "^2.1.0",
"react-intl": "^2.4.0",
"react-intl-redux": "^0.6.0",
"react-native": "^0.49.3",
"react-native-action-button": "^2.7.2",
"react-native-animatable": "^1.2.3",
"react-native-autolink": "^1.1.1",
"react-native-code-push": "5.1.3-beta",
"react-native-cookies": "^3.2.0",
"react-native-deprecated-custom-components": "^0.1.1",
"react-native-drawer": "^2.3.0",
"react-native-fetch-blob": "^0.10.8",
"react-native-fs": "^2.5.2",
"react-native-google-analytics-bridge": "^5.3.3",
"react-native-image-crop-picker": "^0.17.2",
"react-native-image-picker": "^0.26.7",
"react-native-immutable-list-view": "^0.6.2",
"react-native-invertible-scroll-view": "^1.0.0",
"react-native-keyboard-aware-scroll-view": "0.3.0",
"react-native-keychain": "2.0.0-rc",
"react-native-lightbox": "^0.7.0",
"react-native-linear-gradient": "^2.3.0",
"react-native-material-kit": "^0.4.1",
"react-native-modalbox": "^1.4.1",
"react-native-parallax-scroll-view": "^0.19.0",
"react-native-photo-view": "^1.5.2",
"react-native-popup-menu": "^0.8.0",
"react-native-progress": "^3.3.0",
"react-native-scrollable-tab-view": "^0.6.7",
"react-native-sglistview": "^0.4.3",
"react-native-share": "^1.0.23",
"react-native-store": "^0.4.1",
"react-native-swiper": "^1.5.12",
"react-native-vector-icons": "^4.2.0",
"react-navigation": "1.0.0-beta.13",
"react-redux": "^5.0.5",
"react-swipeable-views": "^0.12.5",
"react-swipeable-views-native": "^0.12.5",
"realm": "^1.13.0",
"redux": "^3.7.2",
"redux-form": "^7.0.3",
"redux-logger": "^3.0.6",
"redux-middleware-oneshot": "^0.1.1",
"redux-persist": "^4.8.2",
"redux-persist-immutable": "^4.3.0",
"redux-persist-transform-immutable": "^4.3.0",
"redux-thunk": "^2.2.0",
"reselect": "^3.0.1",
"route-parser": "0.0.5",
"webstomp-client": "^1.0.8"
},
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-core": "^6.26.0",
"babel-eslint": "^7.2.3",
"babel-jest": "^21.2.0",
"babel-plugin-module-resolver": "3.0.0-beta.5",
"babel-plugin-react-intl": "^2.3.1",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-transform-es2015-modules-commonjs": "^6.24.1",
"babel-preset-airbnb": "^2.4.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-preset-react-native": "^4.0.0",
"babel-preset-react-native-stage-0": "^1.0.1",
"babel-register": "^6.24.1",
"chai": "^4.1.0",
"chai-as-promised": "^7.1.1",
"chai-enzyme": "^0.8.0",
"chai-immutable": "^1.6.0",
"commitizen": "^2.9.6",
"cz-conventional-changelog": "^2.0.0",
"enzyme": "^3.0.0",
"eslint": "^4.7.2",
"eslint-config-airbnb": "^15.1.0",
"eslint-plugin-babel": "^4.1.2",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-prettier": "^2.3.1",
"eslint-plugin-react": "^7.4.0",
"eslint-plugin-react-native": "^3.1.0",
"expect.js": "^0.3.1",
"flow": "^0.2.3",
"flow-bin": "^0.56.0",
"immutablediff": "^0.4.3",
"jest": "^21.2.1",
"jest-serializer-enzyme": "^1.0.0",
"jshint": "^2.9.5",
"mocha": "^3.4.2",
"react-addons-test-utils": "^15.6.2",
"react-dom": "16.0.0-beta.5",
"react-intl-cra": "^0.2.8",
"react-native-mock": "^0.3.1",
"react-test-renderer": "^16.0.0",
"redux-debounce": "^1.0.1",
"redux-debounced": "^0.4.0",
"redux-devtools": "^3.4.0",
"redux-devtools-dock-monitor": "^1.1.2",
"redux-devtools-log-monitor": "^1.3.0",
"redux-mock-store": "^1.2.3",
"remote-redux-devtools": "^0.5.12",
"sinon": "^4.0.0",
"why-did-you-update": "0.0.8"
}
Other symptoms:
- react-native run-ios completes with BUILD SUCCEEDED but the app opens and immediately closes on the simulator (works ok from Xcode)
In order to eliminate "old file issues", I created a new react-native project and copied over the newly created xcodeproj file over. To no avail.
Any suggestions?
So, the resolution was executing pod init in the ios directory.
The script identifies some erroneous links that don't become apparent in Xcode. Probably the result of react-native upgrades over a significant amount of time.