Closed sathwik77 closed 4 years ago
Working fine in IOS 13.3, issue is only with Android
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
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
I have this already!
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
I have this already!
H @sathwik77 the problem is @react-native-community/clipboard is not automatically linking in Android. And install @react-native-community/clipboard helps solve the problem. It really works for me so can you please try again?
Thank you.
Please I really need a fix for this! I installed the clipboard and nothing. The issue is on android!
"@react-native-community/clipboard": "^1.2.3" is installed
Please I really need a fix for this! I installed the clipboard and nothing. The issue is on android!
"@react-native-community/clipboard": "^1.2.3" is installed
Hi @karimcambridge
Can you try to run
cd android && ./gradlew clean
in your terminal before building project.
Thank you
Using expo :/
Using expo :/
Hi @karimcambridge Expo doesn’t use @react-native-community/x packages. Can you try the older version of our package (v1.3.7)? Thank you
Using expo :/
Hi @karimcambridge Expo doesn’t use @react-native-community/x packages. Can you try the older version of our package (v1.3.7)? Thank you
Version 1.3.7 works with Expo 37.0.0 perfectly, both v1.3.7 and v1.3.10 does not work with expo SDK 38.0.0. I did not try v1.3.10 with expo 37 though
Im on expo sdk 38.
I tried 1.3.7 and 1.3.10... same issue
Damn /:
As @ericdao-ttt said, Expo does not use community packages, they added support for few in SDK 38, but not for community clipboard yet. But, in this case v1.3.7 should work with expo 38 as it does not use community clipboard in it, I guess. Don't know why v1.3.7 is failing in expo 38
Thanks, @ericdao-ttt
Working after adding @react-native-community/clipboard
I am using react-native 0.63.0
Ok, it works in expo sdk 38 with 1.3.7. Maybe I wasn't installing the version right before as I was rushing.
im still getting this error on sdk 38, version 1.3.7, and after installing the clipboard package
finally got it worked after cleaning npm cache, android simulator cache (wiped) and expo cache (expo start -c).
Confirming expo 38 does work with 1.3.8
I was getting the same issue. Tried all suggestions here but the issue persisted.
Still managed to get away with it by using the older way of clipboard by importing it from react-native in the index.js in the node modules where react-native community where there is a folder named clipboard or you can look into the red box to see the specific path..
1)
import React, { Component } from 'react'; import { View, TextInput, TouchableWithoutFeedback, Keyboard, Platform, I18nManager, Clipboard } from 'react-native'; //import Clipboard from '@react-native-community/clipboard'; import styles from './styles';
after that I used Async and Await in the function where the clipboard was being used.
2)
this.checkPinCodeFromClipBoard =async () => { const { pinCount, onCodeFilled } = this.props; const regexp = new RegExp(
^\d{${pinCount}}$); await Clipboard.getString().then(code => { if (this.hasCheckedClipBoard && regexp.test(code) && (this.clipBoardCode !== code)) { this.setState({ digits: code.split(""), }, () => { this.blurAllFields(); this.notifyCodeChanged(); onCodeFilled && onCodeFilled(code); }); } this.clipBoardCode = code; this.hasCheckedClipBoard = true; }).catch(() => { }); };
Note: The issue got away with the step in (2) but somehow the function was getting called repeatedly infinitely. This was solved when I imported clipboard from react-native in step(1). Don't know how this happened but it worked.
Use react-native link @react-native-community/clipboard after install clipboard library worked for me.
finally got it worked after cleaning npm cache, android simulator cache (wiped) and expo cache (expo start -c).
Confirming expo 38 does work with 1.3.8
1.3.8 is not available ..
Use react-native link @react-native-community/clipboard after install clipboard library worked for me.
Using expo bare workflow, this fixes the android issue.
i just re-install app
Doesn't work for: "react-native": "https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz", "@twotalltotems/react-native-otp-input": "^1.3.7"
Hey guys, is there any update for this, please?
Hey guys, is there any update for this, please?
Hi. use expo-clipboard!
For Expo users
1) install yarn add @twotalltotems/react-native-otp-input@1.3.7
2) install yarn add @react-native-community/clipboard
2) Run expo start -c
to clear the cache
Good luck
Doesn't work for: "react-native": "https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz", "@twotalltotems/react-native-otp-input": "^1.3.7"
make sure you run expo using -c
flag
For Expo users
- install
yarn add @twotalltotems/react-native-otp-input@1.3.7
- install
yarn add @react-native-community/clipboard
- Run
expo start -c
to clear the cacheGood luck
Thanks, I didn't really need step2 and it works fine
Using react-native@0.61.2 (bare workflow). What I did to resolve this error was:
0: Stop react-native server (if running)
1: remove node_modules folder
2: Re-install node_modules
3: cd android && ./gradlew clean
4: cd .. && yarn start
5: Open a new terminal tab and run: react-native run-android
Wait for the app to be installed on your emulator.
For Expo users
- install
yarn add @twotalltotems/react-native-otp-input@1.3.7
- install
yarn add @react-native-community/clipboard
- Run
expo start -c
to clear the cacheGood luck
Thanks, I didn't really need step2 and it works fine
Thank you so much. This worked for me
Btw. I was also fighting with that issue:
react-native-otp-input@1.3.7
<- 1.3.7 is important. I had ^1.3.11
and no matter what I did the above solution only works with that version.
I understand that we have to use 1.3.7 when we're with Expo. But what if we find a glitch on 1.3.7? Will you fix it only for the latest version or also for 1.3.7(like 1.3.7.2)?
Hey guys, is there any update for this, please?
Hi. use expo-clipboard!
I understand that we have to use 1.3.7 when we're with Expo. But what if we find a glitch on 1.3.7? Will you fix it only for the latest version or also for 1.3.7(like 1.3.7.2)?
Pleasee use expo-clipboard.
Its running on simulator and Emulator but not working in android phones. is there any solution comment please....
i am using "expo": "~44.0.0", and "@twotalltotems/react-native-otp-input": "^1.3.11", still failing :( Any luck for this issue ??
Not sure how they can close the issue when it's not working on the latest versions.
this latest version killed my whole day :(
@devcoderbuzz you have to use 1.3.7 https://github.com/tttstudios/react-native-otp-input/issues/87#issuecomment-903655096
@devcoderbuzz you have to use 1.3.7 #87 (comment)
Now in android when I navigate from the previous screen to this, the keyboard does not show up :( If the previous screen keyboard was open, then when I come to this screen its shows. But if I close in the previous screen and then navigate, then this screen does not show. Also, how do we integrate this from auto-populating the otp from messages?
with Expo 44, nothing is working !!
Also happens on Expo 42, only fix I found is using v1.3.7, all others crash
For Expo users
- install
yarn add @twotalltotems/react-native-otp-input@1.3.7
- install
yarn add @react-native-community/clipboard
- Run
expo start -c
to clear the cacheGood luck
Thanks, I didn't really need step2 and it works fine
This worked like charm
Thanks @wandieinnocents your solution is what worked for me. I am pretty much on the latest Expo at the time of writing.
@UmarFKhawaja You are most welcome :)-
This will work, uninstall the app and install again it will work
Yes it will work well.
On Sun, May 15, 2022 at 11:16 PM Allisson Lima @.***> wrote:
This will work, uninstall the app and install again it will work
— Reply to this email directly, view it on GitHub https://github.com/tttstudios/react-native-otp-input/issues/87#issuecomment-1127018471, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADZLGIQBXPKX67KP6RY77WLVKFLSTANCNFSM4OWNFPQQ . You are receiving this because you were mentioned.Message ID: @.***>
--
ABOUT ME:“ Name: Wenareeba Innocent Facebook: Wandie Innocents Twitter: @InnocentsWandie Instagram: @coolwandie Mobile/Whatsapp: +256 706 382 - 817 Other: +256 770 440-053
Pursuing : Masters of Science in Computer Science Profession: Software Engineer / UX Designer
If your actions inspire others to dream more, learn more, do more and become more, you are a leader.” i love to inspire the young generation.
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
Screenshots
Smartphone (please complete the following information):