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.

RCTSwitch was not found in UIManager

See original GitHub issue

Current behaviour

I try to navigate to a screen with the Switch component, and the app crashes on both production and development throwing a Component Exception error.

Screenshot from 2020-10-11 20-21-15

Expected behaviour

I expected the Switch component to be properly rendered.

Invariant Violation: requireNativeComponent: "RCTSwitch" was not found in the UIManager.
- node_modules/react-native/Libraries/LogBox/LogBox.js:148:8 in registerError
- node_modules/react-native/Libraries/LogBox/LogBox.js:59:8 in errorImpl
- node_modules/react-native/Libraries/LogBox/LogBox.js:33:4 in console.error
- node_modules/expo/build/environment/react-native-logs.fx.js:27:4 in error
- node_modules/react-native/Libraries/Core/ExceptionsManager.js:104:6 in reportException
- node_modules/react-native/Libraries/Core/ExceptionsManager.js:171:19 in handleException
- node_modules/react-native/Libraries/Core/setUpErrorHandling.js:24:6 in handleError
- node_modules/expo-error-recovery/build/ErrorRecovery.fx.js:9:32 in ErrorUtils.setGlobalHandler$argument_0
- node_modules/regenerator-runtime/runtime.js:63:36 in tryCatch
- node_modules/regenerator-runtime/runtime.js:293:29 in invoke
- node_modules/regenerator-runtime/runtime.js:63:36 in tryCatch
- node_modules/regenerator-runtime/runtime.js:154:27 in invoke
- node_modules/regenerator-runtime/runtime.js:164:18 in PromiseImpl.resolve.then$argument_0
- node_modules/react-native/node_modules/promise/setimmediate/core.js:37:13 in tryCallOne
- node_modules/react-native/node_modules/promise/setimmediate/core.js:123:24 in setImmediate$argument_0
- node_modules/react-native/Libraries/Core/Timers/JSTimers.js:130:14 in _callTimer
- node_modules/react-native/Libraries/Core/Timers/JSTimers.js:181:14 in _callImmediatesPass
- node_modules/react-native/Libraries/Core/Timers/JSTimers.js:441:30 in callImmediates
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:387:6 in __callImmediates
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:135:6 in __guard$argument_0
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:364:10 in __guard
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:134:4 in flushedQueue
* [native code]:null in flushedQueue
* [native code]:null in invokeCallbackAndReturnFlushedQueue

What have you tried

I tried to run expo upgrade to install all the compatible libraries for SDK39, I have now commented out the switch to keep the app to work.

Your Environment

software version
ios or android android
react-native 0.63.3
react-native-paper 4.2.0
node v10.19.0
npm 6.14.8
expo 39.0.3
react-native-vector-icons 7.1.0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
Svartocommented, Nov 10, 2020

For people coming after me, this was due to me mistyping an instance of using Platform.OS as Platform.OS = “ios”. Changing it to === fixed the issue.

0reactions
ramvilla997commented, Jan 31, 2022

For people coming after me, this was due to me mistyping an instance of using Platform.OS as Platform.OS = “ios”. Changing it to === fixed the issue.

worked nicely

Read more comments on GitHub >

github_iconTop Results From Across the Web

requireNativeComponent: "RNCWebView" was not found in ...
Invariant Violation: requireNativeComponent: "RNCWebView" was not found in the UIManager. This error is located at: in RNCWebView (at ...
Read more >
A brand new website interface for an even better experience!
RCTSwitch was not found in UIManager.
Read more >
Native UI Components · React Native
They expose native views to the RCTUIManager , which delegates back to them to set and update the properties of the views as...
Read more >
Code - thorwel.theminerva/git-test - Yona
This source code is licensed under the MIT license found in the ... uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary<NSNumber * ...
Read more >
React Native使用指南-原生UI组件_jingcheng345413的博客
var RCTSwitch = requireNativeComponent('RCTSwitch', Switch, { ... 关于requireNativeComponent: "RNCWKWebView" was not foun的问题.
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