react-native-ui-lib
react-native-ui-lib copied to clipboard
Invariant Violation: requireNativeComponent: "KeyboardTrackingViewTemp" was not found in the UIManager
Description
I receive the following error when I use KeyboardAccessoryView
in my RN app.
Invariant Violation: requireNativeComponent: "KeyboardTrackingViewTemp" was not found in the UIManager.
More details:
This error is located at: in KeyboardTrackingViewTemp (at KeyboardTrackingView.ios.js:24) in KeyboardTrackingView (at KeyboardTrackingView/index.js:16) in Unknown (at KeyboardAccessoryView.js:149) in KeyboardAccessoryView (at BottomInput.js:142)
Related to
KeyboardAccessoryView
Steps to reproduce
Import KeyboardAccessoryView
within the environment listed below.
Expected behavior
I recently updated my dependencies and this error just started appearing. I expect, and it used to run without this error.
Actual behavior
I receive this error when trying to use KeyboardAccessoryView
Code snippet
return ( <KeyboardAccessoryView renderContent={renderBottomInput} useSafeArea={false} kbInputRef={textInputRef} kbComponent={customKeyboard.component} kbInitialProps={customKeyboard.initialProps} onItemSelected={onCustomKeyboardItemSelected} onKeyboardResigned={onKeyboardResigned} manageScrollView={false} requiresSameParentToManageScrollView revealKeyboardInteractive /> )
Environment
"react-native": "0.69.4",
"react-native-ui-lib": "^6.19.2",
Here are my dependencies:
"dependencies": { "@invertase/react-native-apple-authentication": "^2.2.2", "@miblanchard/react-native-slider": "^2.1.0", "@notifee/react-native": "^5.6.0", "@react-native-async-storage/async-storage": "^1.17.8", "@react-native-firebase/app": "^15.3.0", "@react-native-firebase/auth": "^15.3.0", "@react-native-firebase/firestore": "^15.3.0", "@react-native-firebase/messaging": "^15.3.0", "@react-native-picker/picker": "^2.4.3", "@react-navigation/bottom-tabs": "^6.3.2", "@react-navigation/drawer": "^6.4.3", "@react-navigation/native": "^6.0.11", "@react-navigation/stack": "^6.2.2", "@reduxjs/toolkit": "^1.8.3", "crypto-js": "^4.1.1", "expo": "^46.0.2", "expo-av": "^12.0.4", "expo-document-picker": "^10.3.0", "expo-file-system": "^14.1.0", "expo-localization": "~13.1.0", "firebase-admin": "^11.0.1", "firebase-functions": "^3.22.0", "i18n-js": "^4.0.2", "lodash": "^4.17.21", "moment": "^2.29.4", "prop-types": "^15.8.1", "react": "18.0.0", "react-addons-shallow-compare": "^15.6.3", "react-native": "0.69.4", "react-native-actionsheet": "^2.4.2", "react-native-autogrow-textinput": "^5.4.0", "react-native-confirmation-code-field": "^7.3.0", "react-native-date-picker": "^4.2.5", "react-native-dialog-input": "^1.0.8", "react-native-file-viewer": "^2.1.5", "react-native-gesture-handler": "^2.5.0", "react-native-get-random-values": "^1.8.0", "react-native-image-picker": "^4.8.5", "react-native-image-progress": "^1.2.0", "react-native-image-view": "^2.1.9", "react-native-keyboard-aware-scroll-view": "^0.9.5", "react-native-keyboard-aware-view": "^0.0.14", "react-native-modal-selector": "^2.1.1", "react-native-modalbox": "^2.0.2", "react-native-paper": "^5.0.0-rc.4", "react-native-parsed-text": "^0.0.22", "react-native-phone-input": "^1.3.4", "react-native-reanimated": "^2.9.1", "react-native-safe-area-context": "^4.3.1", "react-native-screens": "^3.16.0", "react-native-sectioned-multi-select": "^0.9.1", "react-native-ui-lib": "^6.20.1", "react-native-vector-icons": "^9.2.0", "react-redux": "^8.0.2", "redux": "^4.2.0", "redux-logger": "^3.0.6", "redux-thunk": "^2.4.1" }, "devDependencies": { "@babel/core": "^7.12.9", "@babel/runtime": "^7.12.5", "@react-native-community/eslint-config": "^2.0.0", "babel-jest": "^26.6.3", "eslint": "^7.32.0", "jest": "^26.6.3", "metro-react-native-babel-preset": "^0.70.3", "prettier": "^2.7.1", "react-test-renderer": "18.0.0" }, "jest": { "preset": "react-native" }
Affected platforms
iOS
Any solution to this? Even temporarily? I have exactly the same issue.
I got similar requireNativeComponent: "KeyboardTrackingView" was not found in the UIManager.
import {KeyboardTrackingView} from 'react-native-ui-lib/keyboard'
"react-native": "0.69.3"
"react-native-ui-lib": "6.19.2"
Had to install react-native-keyboard-tracking-view
back.
Had to install
react-native-keyboard-tracking-view
back.
To get a dependency installed or switch back and use that instead?
Switched back to use it instead of this package.
I still haven't found a solution to this. Is this being investigated?
for some reason autolink is not working. I had to manually add it to Podfile
:
pod 'ReactNativeUiLib', :path => '../node_modules/react-native-ui-lib/lib
I added dependencies
in react-native.config.js
. It's worked in Expo managed workflow and Expo SDK version is 46.
const path = require('path');
module.exports = {
dependencies: {
'react-native-ui-lib': {
root: path.join(__dirname, './node_modules/react-native-ui-lib/lib'),
},
},
};
I added dependencies
in react-native.config.js
. It's worked in Expo managed workflow and Expo SDK version is 46
const path = require('path');
module.exports = {
dependencies: {
'react-native-ui-lib': {
root: path.join(__dirname, './node_modules/react-native-ui-lib/lib'),
platforms: {
ios: {
podspecPath: path.join(
__dirname,
'./node_modules/react-native-ui-lib/lib/ReactNativeUiLib.podspec',
),
},
android: {
sourceDir: path.join(
__dirname,
'./node_modules/react-native-ui-lib/lib/android',
),
packageImportPath:
'import com.wix.reactnativeuilib.highlighterview.HighlighterViewPackage;\nimport com.wix.reactnativeuilib.keyboardinput.KeyboardInputPackage;\nimport com.wix.reactnativeuilib.textinput.TextInputDelKeyHandlerPackage;\nimport com.wix.reactnativeuilib.wheelpicker.WheelPickerPackage;',
packageInstance:
'new HighlighterViewPackage(),\n new WheelPickerPackage(),\n new TextInputDelKeyHandlerPackage(),\n new KeyboardInputPackage(getApplication())',
},
},
},
},
};
same issue
This issue is still present, I'm surprised the PR wasn't included in the latest release. Is there anything we can help with here to get the PR reviewed and merged?
I'm having the same issue, the suggested "react-native.config.js" additions have no effect for me (running expo@~46.0.16)
Go to the node_module and change the line below and run npx patch-package react-native-ui-lib
platforms: {
ios: {
- project: './lib/ios/'
+ podspecPath: './lib/ReactNativeUiLib.podspec'
}
I added
dependencies
inreact-native.config.js
. It's worked in Expo managed workflow and Expo SDK version is 46.const path = require('path'); module.exports = { dependencies: { 'react-native-ui-lib': { root: path.join(__dirname, './node_modules/react-native-ui-lib/lib'), }, }, };
I wasn't using expo so after adding this dependency to my react-native.config.js
file, I had to run npx pod-install
in the project's root directory before it worked.
I'm not using the package anymore, so I'll close the issue unless someone else in the thread is still having issues.
@rsaxby could you please open this issue again? It is not solved and I can't help but worry that it hasn't been corrected in the last few releases because the issue here is closed... :( Thanks!
I added
dependencies
inreact-native.config.js
. It's worked in Expo managed workflow and Expo SDK version is 46const path = require('path'); module.exports = { dependencies: { 'react-native-ui-lib': { root: path.join(__dirname, './node_modules/react-native-ui-lib/lib'), platforms: { ios: { podspecPath: path.join( __dirname, './node_modules/react-native-ui-lib/lib/ReactNativeUiLib.podspec', ), }, android: { sourceDir: path.join( __dirname, './node_modules/react-native-ui-lib/lib/android', ), packageImportPath: 'import com.wix.reactnativeuilib.highlighterview.HighlighterViewPackage;\nimport com.wix.reactnativeuilib.keyboardinput.KeyboardInputPackage;\nimport com.wix.reactnativeuilib.textinput.TextInputDelKeyHandlerPackage;\nimport com.wix.reactnativeuilib.wheelpicker.WheelPickerPackage;', packageInstance: 'new HighlighterViewPackage(),\n new WheelPickerPackage(),\n new TextInputDelKeyHandlerPackage(),\n new KeyboardInputPackage(getApplication())', }, }, }, }, };
This was the only thing that worked for me across both platforms and in Dev & prod builds.
Is it possible this issue has started with react-native 0.69?
this is still happening on 6.27.1 React native on 0.70.5
i did upgrade from 6.26.0 did pod install again.
same here on 0.68.5 but with HighlighterView
Invariant Violation: requireNativeComponent: "HighlighterView" was not found in the UIManager.
Heads up, I've patched the library locally with this change:
diff --git a/react-native.config.js b/react-native.config.js
index fe49ca64f71a5109b8dc6cdbb3f806e889c0e8e1..e9969e402a036334cafa43df2a89048c009ea90d 100644
--- a/react-native.config.js
+++ b/react-native.config.js
@@ -2,7 +2,8 @@ module.exports = {
dependency: {
platforms: {
ios: {
- project: './lib/ios/'
+ project: './lib/ios/',
+ podspecPath: './lib/ReactNativeUiLib.podspec'
},
android: {
sourceDir: './lib/android/',
If anyone wants to get their setup working locally, you can run yarn patch
to make this change in your repository. I don't know enough about the project or this change to open a PR, but I'm happy to, if a maintainer thinks this should go to main here? (Just a 1-line change)
this is still happening on "react-native-ui-lib": "^6.27.3" and "react-native": "0.70.6" . anyone can suggest suggest another library with similar functionality ?
Still reproduced and not fixed
"react-native-ui-lib": "7.0.0",
"react-native": "0.71.2"
Oops, it's my fault because I am in managed monorepo that required extra steps for auto linking works
I stumbled upon the same issue on following env (Expo managed workflow with Expo GO):
"react-native-ui-lib": "^7.15.0",
"react-native": "0.73.2",
"expo": "~50.0.4",
Is there anything I can do to make it work?