facebook / react-native

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

Blank screen on any error after upgrade to RN 0.71.7 #37315

Closed richardReitz closed 1 year ago

richardReitz commented 1 year ago

Description

My application building and works fine, but if get any error in app returns the white screen instead of the LogBox. That white screen seems to break the app, even when the app is reloaded the white screen do not disappear, but it looks like it calls the app's functions. Only building again to get this white screen out.

My AppDelegate.mm:

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  self.moduleName = @"appName";
  // You can add your custom initial props in the dictionary below.
  // They will be passed down to the ViewController used by React Native.
  self.initialProps = @{};
  [FIRApp configure];

  [super application:application didFinishLaunchingWithOptions:launchOptions];

  [AppCenterReactNative register];
  [AppCenterReactNativeAnalytics registerWithInitiallyEnabled:true];

  UIView *rootView = self.window.rootViewController.view; // ⬅️ ❗️ only required for react-native >= 0.71
  [RNBootSplash initWithStoryboard:@"BootSplash" rootView:rootView]; // ⬅️ initialize the splash screen

  return YES;
}

React Native Version

0.71.7

Output of npx react-native info

OS: macOS 12.6.4 CPU: (4) x64 Intel(R) Core(TM) i7-4578U CPU @ 3.00GHz Memory: 1.56 GB / 16.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 18.15.0 - ~/.nvm/versions/node/v18.15.0/bin/node Yarn: 1.22.19 - ~/Documents/client-mobile-v2/node_modules/.bin/yarn npm: 9.5.0 - ~/.nvm/versions/node/v18.15.0/bin/npm Watchman: 2023.04.03.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.12.0 - /Users/developer/.rvm/gems/ruby-3.2.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 IDEs: Android Studio: 2022.2 AI-222.4459.24.2221.9862592 Xcode: 14.2/14C18 - /usr/bin/xcodebuild Languages: Java: 11.0.18 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 18.2.0 => 18.2.0 react-native: 0.71.7 => 0.71.7 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Steps to reproduce

  1. When I get any error in app returns the white screen instead of the LogBox.

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

"dependencies": { "@apollo/client": "^3.7.12", "@gorhom/bottom-sheet": "^4", "@hookform/resolvers": "^3.1.0", "@invertase/react-native-apple-authentication": "^2.2.2", "@jridgewell/gen-mapping": "^0.3.3", "@mapbox/polyline": "^1.2.0", "@native-html/iframe-plugin": "1.1.2", "@react-native-async-storage/async-storage": "^1.18.1", "@react-native-clipboard/clipboard": "^1.11.2", "@react-native-community/datetimepicker": "^7.0.1", "@react-native-community/hooks": "^3.0.0", "@react-native-community/netinfo": "^9.3.9", "@react-native-firebase/analytics": "^17.4.2", "@react-native-firebase/app": "^17.4.2", "@react-native-google-signin/google-signin": "^9.0.2", "@react-native-masked-view/masked-view": "^0.2.9", "@react-native-picker/picker": "^2.4.10", "@react-navigation/bottom-tabs": "^6.5.7", "@react-navigation/drawer": "^6.6.2", "@react-navigation/native": "^6.1.6", "@react-navigation/stack": "^6.3.16", "@rnmapbox/maps": "^10.0.3", "@sentry/react-native": "^5.3.1", "@turf/helpers": "^6.5.0", "appcenter": "^4.4.5", "appcenter-analytics": "^4.4.5", "axios": "^1.3.5", "card-validator": "^8.1.1", "date-fns": "^2.29.3", "deprecated-react-native-prop-types": "^4.0.0", "easy-peasy": "^5.2.0", "formik": "^2.2.9", "graphql": "^15.5.0", "haversine-distance": "^1.2.1", "i18n-js": "3.7.1", "immer": "^10.0.1", "intl": "^1.2.5", "launchdarkly-react-native-client-sdk": "^7.1.4", "lodash": "^4.17.21", "lottie-react-native": "^5.1.5", "meilisearch": "^0.32.3", "ramda": "^0.29.0", "react": "18.2.0", "react-hook-form": "^7.43.9", "react-native": "0.71.7", "react-native-actionsheet": "^2.4.2", "react-native-animatable": "^1.3.3", "react-native-animated-pagination-dot": "^0.4.0", "react-native-autolink": "^4.1.0", "react-native-background-timer": "^2.4.1", "react-native-base64": "^0.2.1", "react-native-bootsplash": "^4.6.0", "react-native-branch": "5.8.0", "react-native-calendar-events": "^2.2.0", "react-native-camera": "^4.2.1", "react-native-circular-progress": "^1.3.8", "react-native-code-push": "^8.0.1", "react-native-confirmation-code-field": "^7.3.1", "react-native-device-info": "^10.6.0", "react-native-document-picker": "^8.2.0", "react-native-draggable-grid": "^2.1.7", "react-native-easy-grid": "^0.2.2", "react-native-error-boundary": "^1.2.3", "react-native-fast-image": "^8.6.3", "react-native-fbsdk-next": "^11.2.1", "react-native-fs": "^2.20.0", "react-native-geocoder-reborn": "^0.9.0", "react-native-geolocation-service": "^5.3.1", "react-native-gesture-handler": "^2.9.0", "react-native-health": "^1.14.0", "react-native-image-cache-wrapper": "^1.0.7", "react-native-image-crop-picker": "^0.39.0", "react-native-image-gallery": "^2.1.5", "react-native-image-pan-zoom": "^2.1.12", "react-native-image-size": "^1.1.3", "react-native-iphone-x-helper": "^1.3.1", "react-native-keyboard-aware-scroll-view": "^0.9.5", "react-native-linear-gradient": "^2.6.2", "react-native-localize": "^2.2.6", "react-native-masked-text": "^1.13.0", "react-native-modal": "^13.0.1", "react-native-modal-datetime-picker": "^15.0.0", "react-native-modalize": "^2.1.1", "react-native-notification-badge": "^1.0.5", "react-native-onesignal": "^4.5.1", "react-native-paper": "^5.7.0", "react-native-pell-rich-editor": "^1.9.0", "react-native-permissions": "3.7.3", "react-native-picker-select": "^8.0.4", "react-native-portalize": "^1.0.7", "react-native-progress": "^5.0.0", "react-native-public-ip": "^1.0.2", "react-native-qrcode-scanner": "^1.5.5", "react-native-qrcode-svg": "^6.2.0", "react-native-reanimated": "^3.1.0", "react-native-render-html": "5.0.1", "react-native-responsive-fontsize": "^0.5.1", "react-native-safe-area-context": "^4.5.1", "react-native-screens": "^3.20.0", "react-native-sectioned-multi-select": "^0.9.1", "react-native-sha256": "^1.4.9", "react-native-share": "^8.2.2", "react-native-simple-radio-button": "^2.7.4", "react-native-simple-toast": "1.1.4", "react-native-skeleton-placeholder": "^5.2.4", "react-native-smart-gallery": "^1.2.1", "react-native-snackbar": "^2.4.0", "react-native-snackbar-component": "^1.1.12", "react-native-snap-carousel": "^3.9.1", "react-native-svg": "^13.9.0", "react-native-svg-charts": "^5.4.0", "react-native-svg-transformer": "^1.0.0", "react-native-swipe-list-view": "^3.2.9", "react-native-switch": "^1.5.1", "react-native-uuid": "^2.0.1", "react-native-video": "^6.0.0-alpha.6", "react-native-view-shot": "^3.6.0", "react-native-webview": "^12.0.2", "react-query": "^3.39.3", "reading-time": "^1.5.0", "realm": "^11.8.0", "reanimated-collapsible-helpers": "^1.0.0", "recoil": "^0.7.7", "recyclerlistview": "^4.2.0", "rn-fetch-blob": "0.13.0-beta.2", "rn-sliding-up-panel": "^2.4.6", "styled-components": "^5.3.9", "styled-system": "^5.1.5", "yarn": "^1.22.19", "yup": "^1.1.1", "zustand": "^4.3.7" }

cortinico commented 1 year ago

Have you turned on the New Architecture @richardReitz ? Also is this happening also on Android?

richardReitz commented 1 year ago

Have you turned on the New Architecture @richardReitz ? Also is this happening also on Android?

No, I had to turn off at the time, due to conflicts with reanimated. In Android I think is the same problem, but the app crash and close.

github-actions[bot] commented 1 year ago

This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.

github-actions[bot] commented 1 year ago

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

github-actions[bot] commented 1 year ago

This issue was closed because the author hasn't provided the requested feedback after 7 days.

choijiho0021 commented 1 year ago

Was there any solution? It's the same for me.

. The cause was determined by removing the AppDelegate library one by one. SplashScreen is the problem, which is an external dependency problem, not a react native! Look at the link below and solve it!

https://github.com/crazycodeboy/react-native-splash-screen/issues/606#issuecomment-1396914012

venjopendoor commented 5 months ago

@cortinico After upgrading the react native from 0.67.1 to 0.73.6 , app is building and running on emulator with metro bundler showing no error but nothing showing on screen , it is all white blank screen.

Have you gotten down to what the error is?

venjopendoor commented 5 months ago

I figured it out and it was due to some package issue which I corrected and its resolved now.

can you specify which package.