Upgrade @react-native-clipboard/clipboard to latest
Problem
align-deps indicates that we must upgrade @react-native-clipboard/clipboard in order to upgrade React Native.
Solution
Bump @react-native-clipboard/clipboard package to latest.
Issue Owner
Current Issue Owner: @mollfpr
Triggered auto assignment to Contributor-plus team member for initial proposal review - @brunovjk (External)
Triggered auto assignment to @lydiabarclay (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
Proposal
Please re-state the problem that we are trying to solve in this issue.
We need to update the package @react-native-clipboard/clipboard
What is the root cause of that problem?
React Native 0.82 requires a newer version of @react-native-clipboard/clipboard. Since the package is not updated, the dependency alignment fails, preventing the React Native upgrade.
What changes do you think we should make in order to solve the problem?
Update @react-native-clipboard/clipboard to the latest stable version in package.json, reinstall dependencies, and ensure the clipboard functionality continues to work correctly on both Android and iOS.
# Remove old version (optional)
yarn remove @react-native-clipboard/clipboard
# or
npm uninstall @react-native-clipboard/clipboard
# Install latest version
yarn add @react-native-clipboard/clipboard
# or
npm install @react-native-clipboard/clipboard
What alternative solutions did you explore? (Optional)
N/A
Proposal
Please re-state the problem that we are trying to solve in this issue.
Upgrade @react-native-clipboard/clipboard to latest
What is the root cause of that problem?
Bump @react-native-clipboard/clipboard package to latest.
What changes do you think we should make in order to solve the problem?
We should
- Update
package.jsonChange the version from"^1.15.0"to"^1.16.3"(latest version) -
npm install - Update iOS dependencies
npm run pod-install(if applicable) - And Run the align-deps check to confirm it's satisfied
npx react-native-align-deps
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
⚠️ @abbasifaizan70 Your proposal is a duplicate of an already existing proposal and has been automatically withdrawn to prevent spam. Please review the existing proposals before submitting a new one.
Please re-state the problem that we are trying to solve in this issue.
The align-deps tool is blocking the React Native upgrade because our current react-navigation packages are incompatible with the target React Native version. We need to upgrade react-navigation to proceed with the React Native upgrade.
What is the root cause of that problem?
The problem exists because the version of @react-native-clipboard/clipboard currently in your app was built for React Native ≤0.81 and depends on native APIs that were deprecated and removed in RN 0.82. When align-deps simulates the RN upgrade, it finds that this older clipboard module declares peer dependencies and native code that no longer compile against the new React Native headers. In short, React Native 0.82 drops support for the native bridge methods that the older clipboard package relies on, so you must bump the clipboard module to a release that implements the updated RN 0.82 interfaces before the RN upgrade can succeed.
What changes do you think we should make in order to solve the problem?
Upgrade Plan for @react-native-clipboard/clipboard
-
Update dependency npm install @react-native-clipboard/clipboard@latest
- Inspect
package-lock.jsonto ensure only this package updated.
- Inspect
-
Rebuild native code
- iOS:
cd ios && pod install && cd .. - Android: clean Gradle caches (
cd android && ./gradlew clean && cd ..ornpm run androidafter cleaning) - This refreshes the native module bindings aligned with RN 0.82.
- iOS:
-
Audit usage
- Search for imports (
search for "@react-native-clipboard/clipboard"). - The API surface (
Clipboard.getString,setString,hasString) might have new async behavior or TypeScript typings. Update any deprecated calls. - If you shimmed clipboard on web/desktop, confirm the module still exports default compat wrappers (some versions drop the default export in favor of named exports).
- Search for imports (
-
Verify build configs
- Ensure the module is autolinked; remove old manual linking instructions (if any).
- On Android, confirm
android/app/src/main/java/.../MainApplication.javadoesn’t manually register the clipboard package.
-
Testing
- Run Metro with cache reset:
npm start -- --reset-cache. - Run automated tests (Jest should pass; if TypeScript typing changed, run
npm run typecheck). - Manual QA: copy/paste actions across platforms (chat composer, expense descriptions, attachments).
- On iOS, verify “copy” actions still show the system toast; on Android, ensure clipboard listeners still work in background/foreground.
- Run Metro with cache reset:
-
Monitor
- Build QA/TestFlight to ensure no runtime errors
- Watch for warnings about missing
android.permission.READ_CLIPBOARD_IN_BACKGROUNDon newer Android
⚠️ @TaduJR Your proposal is a duplicate of an already existing proposal and has been automatically withdrawn to prevent spam. Please review the existing proposals before submitting a new one.
Triggered auto assignment to @mollfpr, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
Update: PR still undes review
This issue has not been updated in over 15 days. @mollfpr, @brunovjk, @AQIB-NAWAB, @lydiabarclay eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
Hi @AQIB-NAWAB! Thanks for your work on this so far.
Since it’s been about three weeks and the changes are still not ready, we’re going to look for another contributor to help finish this issue so we can move it forward.
Thanks for your understanding!
Posted https://expensify.slack.com/archives/C01GTK53T8Q/p1766550806335509 to look for contributor with RN package upgrade experience.
🚫 Duplicated proposal withdrawn by 🤖 ProposalPolice.
⚠️ @marufsharifi Your proposal is a duplicate of an already existing proposal and has been automatically withdrawn to prevent spam. Please review the existing proposals before submitting a new one.
@mollfpr, since the first proposal was accepted, I’ll continue working on the PR. However, my proposal post appears to have been removed by ProposalPolice.
@mollfpr I did a quick check on this package. We’re currently using version 1.15.0, while the latest release is v1.16.3. I reviewed all updates since our current version (https://github.com/react-native-clipboard/clipboard/releases) and didn’t find any breaking or incompatible changes. Based on this, we should be able to safely upgrade the library in our app and run the tests again. Given that, I can help to raise a quick PR now to upgrade this package
Thank you both! Since this issue has been open for few weeks, we want this to get done quickly so it won't block the RN upgrade. We're looking experience contributor and availibility for this avoiding another delay.
@brunovjk Do you agree going with @cretadn22?
We're looking experience contributor and availibility for this avoiding another delay.
I've taken note of this If I work on the PR
@brunovjk I'm also available to take this one since I worked on similar upgradation in past on another project, and will complete this on priority since we're already lagging here. Let me know what you think.
I am also available. Since this also requires updating Podfile.lock in Mobile-Expensify repo, it's quicker to grant this job to C+.
@mollfpr Yes, agreed. I bumped @react-native-clipboard/clipboard from 1.15.0 to 1.16.3 locally and everything looks good (no breaking changes noted). I’m fine with @cretadn22 taking this and raising the PR. Also +1 to @situchan’s point: as we need a Mobile-Expensify Podfile.lock update, C+ might be faster. What do you think? Thank you.
Good point, @situchan!
To keep things fair, I’ll assign @samranahm to upgrade the package in the App repo, since their proposal is next in the queue. I’ll also assign @situchan to handle the Mobile-Expensify upgrade.
Compensation will be $125 for each task.
@samranahm @situchan — does this sound good?
Sounds good to me
Sound good.
@samranahm @situchan Assigning both of you ❤️
App: #78461 MOBILE-EXPENSIFY: https://github.com/Expensify/Mobile-Expensify/pull/13813
cc: @brunovjk @mollfpr
Reviewing label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 9.2.88-7 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
- https://github.com/Expensify/App/pull/78461
If no regressions arise, payment will be issued on 2026-01-06. :confetti_ball:
For reference, here are some details about the assignees on this issue:
- @brunovjk requires payment through NewDot Manual Requests
- @situchan requires payment (Needs manual offer from BZ)
- @samranahm requires payment (Needs manual offer from BZ)
@brunovjk / @situchan @lydiabarclay The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]