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.

v1.3.10 TypeError: null is not an object (evaluating 'NativeClipboard_1.default.getString')

See original GitHub issue

Native 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 WhatsApp Image 2020-07-10 at 4 19 10 PM

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:closed
  • Created 3 years ago
  • Comments:44 (4 by maintainers)

github_iconTop GitHub Comments

45reactions
eric-dao37commented, Jul 10, 2020

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

29reactions
minaibrahimsaidcommented, Feb 3, 2021

For Expo users

  1. install yarn add @twotalltotems/react-native-otp-input@1.3.7
  2. install yarn add @react-native-community/clipboard
  3. Run expo start -c to clear the cache

Good luck

Read more comments on GitHub >

github_iconTop 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 >

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