callstack / react-native-paper

Material Design for React Native (Android & iOS)
https://reactnativepaper.com
MIT License
12.87k stars 2.09k forks source link

snack example app on iOS error: RNC requireNativeComponent "RNCSafeAreaProvider" was not found in the UIManager #2234

Closed louiechristie closed 3 years ago

louiechristie commented 4 years ago

Current behaviour

When trying to run the React Native Paper example snack by callstack.

It shows a red screen error message: RNC requireNativeComponent "RNCSafeAreaProvider" was not found in the UIManager

Expected behaviour

The app should load in Expo client app and work.

Code sample

https://snack.expo.io/@react-native-paper/github.com-callstack-react-native-paper:example

Screenshots (if applicable)

IMG_2914

What have you tried

I Googled the error message and found this stack overflow question: https://stackoverflow.com/questions/62846457/having-rncsafeareaprovider-error-on-snack-io

They had the same error on using react-navigation 5 (example app I think) and solved it by manually changing snack to use Expo v38.

So I tried changing to Expo v38.

And got a new error message: Unable to resolve module 'create-react-context.js' Evaluating create-react-context.js Evaluating App.js Loading App.js

IMG_2915

Then, after some time it worked.

Your Environment

My iOS 13 iPhone X with the latest Expo client:

software version
ios or android 13
react-native N/A
react-native-paper 4.0.0-alpha.0 (according to the package.json)
node N/A
npm or yarn N/A
expo sdk 37 (the snack defaults to v37)
snack It's hard to tell what version of the react native paper example app code this snack is using. The project description says "callstack/react-native-paper @ Nov 8, 2018" but it shows it was last saved 14 days ago

The snack that produces the issue: https://snack.expo.io/@react-native-paper/github.com-callstack-react-native-paper:example

github-actions[bot] commented 4 years ago

Couldn't find version numbers for the following packages in the issue:

Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.

The versions mentioned in the issue for the following packages differ from the latest versions on npm:

Can you verify that the issue still exists after upgrading to the latest versions of these packages?

flycj commented 4 years ago

And when I run here, the following error appears Error: ENOENT: no such file or directory, scandir react-native-paper/example/assets/icons'

louiechristie commented 4 years ago

May be related to https://github.com/callstack/react-native-paper/issues/1893

aangeles2807 commented 3 years ago

The same error in android:

[Wed Nov 11 2020 19:12:15.331] ERROR Invariant Violation: requireNativeComponent: "RNCSafeAreaProvider" was not found in the UIManager.

This error is located at: in RNCSafeAreaProvider (at SafeAreaContext.tsx:74) in SafeAreaProvider (at SafeAreaProviderCompat.tsx:34) in SafeAreaProviderCompat (at StackView.tsx:376) in GestureHandlerRootView (at GestureHandlerRootView.android.js:31) in GestureHandlerRootView (at StackView.tsx:375) in StackView (at createStackNavigator.tsx:69) in StackNavigator (at Screens.js:182) in OnboardingStack (at App.js:88) in RCTView (at View.js:34) in View (at Block.js:58) in Block (at theme/index.js:50) in EnhancedComponent (at theme/index.js:63) in ForwardRef (at App.js:87) in GalioProvider (at App.js:86) in EnsureSingleNavigator (at BaseNavigationContainer.tsx:407) in ForwardRef(BaseNavigationContainer) (at NavigationContainer.tsx:39) in ThemeProvider (at NavigationContainer.tsx:38) in ForwardRef(NavigationContainer) (at App.js:85) in App (created by Wrapper) in Wrapper (at renderApplication.js:45) in RCTView (at View.js:34) in View (at AppContainer.js:106) in RCTView (at View.js:34) in View (at AppContainer.js:132) in AppContainer (at renderApplication.js:39) [Wed Nov 11 2020 19:12:17.347] WARN Possible Unhandled Promise Rejection (id: 0): Invariant Violation: requireNativeComponent: "RNCSafeAreaProvider" was not found in the UIManager. invariant@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:2437:26 getNativeComponentAttributes@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:45990:14 get@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:45728:28 createInstance@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:12021:46 completeWork@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:19602:48 completeUnitOfWork@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:22084:34 performUnitOfWork@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:22062:36 workLoopSync@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:21995:45 renderRootSync@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:21968:25 performSyncWorkOnRoot@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:21739:40 performSyncWorkOnRoot@[native code] http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:13028:38 unstable_runWithPriority@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:47783:30 flushSyncCallbackQueueImpl@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:13023:28 flushSyncCallbackQueue@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:13012:35 scheduleUpdateOnFiber@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:21365:37 dispatchAction@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:17066:23 dispatchAction@[native code] http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:114042:25 tryCallOne@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:27649:16 http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:27750:27 _callTimer@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:31189:17 _callImmediatesPass@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:31228:17 callImmediates@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:31445:33 callImmediates@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:3327:35 http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:3113:34 guard@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:3310:15 flushedQueue@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:3112:21 flushedQueue@[native code] invokeCallbackAndReturnFlushedQueue@[native code] [Wed Nov 11 2020 19:12:18.884] WARN Possible Unhandled Promise Rejection (id: 1): Error: No credentials, applicationId or region http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:172910:53 step@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:174116:27 http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:174046:22 fulfilled@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:174000:32 tryCallOne@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:27649:16 http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:27750:27 _callTimer@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:31189:17 _callImmediatesPass@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:31228:17 callImmediates@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:31445:33 callImmediates@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:3327:35 http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:3113:34 guard@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:3310:15 flushedQueue@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:3112:21 flushedQueue@[native code] invokeCallbackAndReturnFlushedQueue@[native code]

github-actions[bot] commented 3 years ago

Hello 👋, this issue has been open for more than 2 months with no activity on it. If the issue is still present in the latest version, please leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution on workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix the issue.

joelbentham commented 1 year ago

Any updates on this?