Coder Social home page Coder Social logo

Comments (32)

foloinfo avatar foloinfo commented on May 24, 2024 21

I have the same issue (expo SDK 38).
I ended up reverting to clipboard from react-native for now.
import { Clipboard } from 'react-native'

updated:
You can use import * as Clipboard from 'expo-clipboard' now. I'm usgin SDK 43.

from clipboard.

rafaellelis avatar rafaellelis commented on May 24, 2024 18

I had the same problem on Android. Solved uninstalling the app and reinstalling it.

from clipboard.

Naturalclar avatar Naturalclar commented on May 24, 2024 16

currently managed workflow for expo does not support this clipboard module.
Please continue using import {Clipboard} from 'react-native' for now until the support is added to expo.

This module should work for bare workflow of expo and regular react-native via react-native-cli
sorry about the inconvenience!

from clipboard.

benediktdertinger avatar benediktdertinger commented on May 24, 2024 9

Same here on Expo SDK 38 + 39 and @react-native-community/clipboard: ^1.2.3

Solved it by using @foloinfo solution by using import { Clipboard } from 'react-native'

from clipboard.

Naturalclar avatar Naturalclar commented on May 24, 2024 4

There is honestly nothing I can do about using this package on a managed workflow of expo, as managed workflow of expo has predetermined sets of native modules it can use and this package isn't one of them.

Please use import {Clipboard} from 'react-native' for managed workflow of expo.

from clipboard.

afreeland avatar afreeland commented on May 24, 2024 3

Same here on Expo SDK 38 + 39 and @react-native-community/clipboard: ^1.2.3

Solved it by using @foloinfo solution by using import { Clipboard } from 'react-native'

The only issue with that method is it has been declared as deprecated even though it still works. Also, it points them here to where things are broken...
image

from clipboard.

xhbisme avatar xhbisme commented on May 24, 2024 3

I have the same issue,
I solved it this way:
import {useClipboard} from '@react-native-community/clipboard';

from clipboard.

Abhishek-Sankey avatar Abhishek-Sankey commented on May 24, 2024 3

don't think it's the library issue
try to clean your project(reset metro bundler cache, delete build folder) and do fresh npm install and pod install.
That worked for me!

from clipboard.

super-potion avatar super-potion commented on May 24, 2024 2

I'm getting the same issue on iOS 13.6, react-native 0.59 - any workaround?

from clipboard.

Jorciney avatar Jorciney commented on May 24, 2024 2

I had the same issue with Android.
Weird enough I had to do a pod install:
cd ios && pod install && cd ../
after that, I ran react-native run-android and it worked.

from clipboard.

mrKorg avatar mrKorg commented on May 24, 2024 2

The same problem with v1.5.1 on android and web app.
I tried to use Clipboard.setString and hook realization, both have this problem.

from clipboard.

sichan75 avatar sichan75 commented on May 24, 2024 2

I solved it

cd ios && pod install

from clipboard.

remi-cbd avatar remi-cbd commented on May 24, 2024 2

Same issue here, using deprecated version from "react-native" temporarily solves my issue.

import { Clipboard } from "react-native"

from clipboard.

kejn avatar kejn commented on May 24, 2024 2

the solution is as simple as:
import Clipboard from '@react-native-community/clipboard'
instead of
import { Clipboard } from '@react-native-community/clipboard'

from clipboard.

matinSurchi avatar matinSurchi commented on May 24, 2024 2

cd ios && pod install
then yarn start --reset-cache
then remove the app from your simulator or phone and rebuild/reinstall it

from clipboard.

vivek2dx avatar vivek2dx commented on May 24, 2024 1

Hi,
Need to release the app so cannot go with deprecated one, please fix this issue ASAP 🙏

from clipboard.

JasmineSun33 avatar JasmineSun33 commented on May 24, 2024 1

don't think it's the library issue
try to clean your project(reset metro bundler cache, delete build folder) and do fresh npm install and pod install.
That worked for me!

Just solved the issue by restart the metro bundler. i.e. re-run react-native start. Thank you :)

from clipboard.

afreeland avatar afreeland commented on May 24, 2024

Seeing the same issue...any word on what causes this? You see it with the useHook too except you will see it here:

getString: function () {
        return NativeClipboard_1.default.getString();
    }

from clipboard.

filiptronicek avatar filiptronicek commented on May 24, 2024

@afreeland Yes, but it's a temporary solution, and until it gets fixed, we are stuck with it😢

from clipboard.

AkshaySanas19 avatar AkshaySanas19 commented on May 24, 2024

Any update on this issue??... I'm also facing the same issue but only on iOS. It's working correctly on android.

from clipboard.

junhoyeo avatar junhoyeo commented on May 24, 2024

Any solutions?

from clipboard.

rukmanary avatar rukmanary commented on May 24, 2024

I had the same problem on Android. Solved uninstalling the app and reinstalling it.

This is works for me. But is it safe for production update? I mean when we just add this library and deploy this new updated app to play store

from clipboard.

Abhishek-Sankey avatar Abhishek-Sankey commented on May 24, 2024

Facing the same issue...Any update on this?

from clipboard.

Naturalclar avatar Naturalclar commented on May 24, 2024

For expo users, please use the expo-clipboard module provided by expo.
For non-expo users, if you're facing the issue, please provide a minimal repository that can reproduce the issue.

from clipboard.

iqorlobanov avatar iqorlobanov commented on May 24, 2024

For android use this way: #80 (comment)

from clipboard.

MahmonirB avatar MahmonirB commented on May 24, 2024

I did these, but problem is not resolved:

  1. rm -rf node_modules && npm install
  2. cd android && ./gradlew clean
  3. cd ios && pod install && cd ..

I Have this error:
TypeError: Cannot read property 'setString' of null

from clipboard.

ovideliu avatar ovideliu commented on May 24, 2024

I solved it by reinstalling the app

from clipboard.

EyadAlghamdi avatar EyadAlghamdi commented on May 24, 2024

this was solved for me by restarting metro.. ( i was running on IOS thought) i closed the simulator and metro and restarted again using npx react-native run-ios and it finally worked after hours of trying to figure it out!
FYI, im not using expo though.

from clipboard.

flunder avatar flunder commented on May 24, 2024

A project clean in xcode and npm start -reset-cache did it for me.

from clipboard.

kg-currenxie avatar kg-currenxie commented on May 24, 2024

Did you all run pod install before building ? :P This package worked for me on the first try. Didn't need to clean XCode build cache, or npm cache, or removing the app.

from clipboard.

SSOURABH58 avatar SSOURABH58 commented on May 24, 2024

the same issue was fixed by manually linking the package react-native link @react-native-clipboard/clipboard. I am ushing RN0.60+ in the dox it says it will auto-link but for me, I have to do it manually and it worked

from clipboard.

Pixel-Panda avatar Pixel-Panda commented on May 24, 2024

Here here! Shit. And also, it just suddenly stopped working. I haven't changed versioning. Verify from something like https://framestack.co/components/rainbow-border

I suddenly cannot copy the actual component.

from clipboard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.