v1.3.10 TypeError: null is not an object (evaluating 'NativeClipboard_1.default.getString')
See original GitHub issueNative clipboard error
As the title says, I upgraded package to latest version and it stopped working throwing the above mentioned error. Might be because of the release notes that says Change to use Clipboard from @react-native-community/clipboard
To Reproduce The below code was working fine when I am using the older version 1.3.7
<OTPInputView
style={{ width: '60%', height: 50, marginBottom: 20 }}
pinCount={4}
onCodeChanged={code => { this.setState({ code: parseInt(code) }) }}
autoFocusOnLoad
codeInputFieldStyle={styles.underlineStyleBase}
onCodeFilled={(code => {
this.verifyOtp(code);
})}
/>
Screenshots
Smartphone (please complete the following information):
- Device: Android 9.0.0
- OS: Did not check on IOS yet
- Version 1.13.10
- Expo SDK 38.0.0
Issue Analytics
- State:
- Created 3 years ago
- Comments:44 (4 by maintainers)
Top Results From Across the Web
TypeError: null is not an object (evaluating 'NativeClipboard_1 ...
Try this. 1: install yarn add @twotalltotems/react-native-otp-input@1.3.7. 2: install yarn add @react-native-community/clipboard.
Read more >How to Fix TypeError: Null is Not an Object in JavaScript
The JavaScript error TypeError: null is not an object occurs when a property is accessed or a method is called on a null...
Read more >null is not an object (evaluating 'RNPurchases ...
I installed the expo managed workflow and also followed the revenuecat/react-native-purchases guide and trying a simple code to setDebugLogs ...
Read more >Typeerror:Null Is Not An Object(Evaluating 'Wifip2Pmanager.Init
Ask questionsv1.3.10 TypeError: null is not an object (evaluating 'NativeClipboard1.default.getString'). Native clipboard error As the title says, ...
Read more >TypeError: null is not an object (evaluating 'WebRTCModule ...
I'm building an React-native-app with openvidu, I've already went through the tutorial and even tested the demo, and made some changes to ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi, i think you can fix this by install @react-native-community/clipboard.
Install the library using either Yarn:
yarn add @react-native-community/clipboard or npm:
npm install --save @react-native-community/clipboard
For Expo users
yarn add @twotalltotems/react-native-otp-input@1.3.7
yarn add @react-native-community/clipboard
expo start -c
to clear the cacheGood luck