Description
I have an React Native sample where trying to render image copied from Clipboard.
On iOS I get following error and image is not rendered:
WARN Could not find image file:///private/var/containers/Bundle/Application//ClipboardTestApp.app/.png
I use following Clipboard module: https://github.com/react-native-clipboard/clipboard/
NOTE: it is reproducible on device with iOS 16.7.1
React Native Version
0.72.7
Output of npx react-native info
System:
OS: macOS 14.1.1
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 27.57 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 18.17.1
path: /var/folders/c9/26x5c4kd5ggcl4z_lg_5gnsr0000gq/T/yarn--1700584616538-0.6727902694916463/node
Yarn:
version: 1.22.19
path: /var/folders/c9/26x5c4kd5ggcl4z_lg_5gnsr0000gq/T/yarn--1700584616538-0.6727902694916463/yarn
npm:
version: 9.6.7
path: /usr/local/bin/npm
Watchman:
version: 2023.06.08.00
path: /usr/local/bin/watchman
Managers:
CocoaPods:
version: 1.14.3
path: /Users/vtaliar/.rvm/gems/ruby-2.7.5/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.0
- iOS 17.0
- macOS 14.0
- tvOS 17.0
- watchOS 10.0
Android SDK: Not Found
IDEs:
Android Studio: 2022.2 AI-222.4459.24.2221.9971841
Xcode:
version: 15.0.1/15A507
path: /usr/bin/xcodebuild
Languages:
Java:
version: 11.0.18
path: /Users/vtaliar/.jenv/shims/javac
Ruby:
version: 2.7.5
path: /Users/vtaliar/.rvm/rubies/ruby-2.7.5/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.72.7
wanted: 0.72.7
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false
Steps to reproduce
- Copy some PNG image from Safari browser on device
- Click on 'Get Image from clipboard'
- See an error
WARN Could not find image file:///private/var/containers/Bundle/Application//ClipboardTestApp.app/.png
NOTE: imageIos has correct base64 string but
tries to load it as local image in native code
Snack, screenshot, or link to a repository
Snack link: https://snack.expo.dev/aQr08Pfec
Description
I have an React Native sample where trying to render image copied from Clipboard.
On iOS I get following error and image is not rendered:
WARN Could not find image file:///private/var/containers/Bundle/Application//ClipboardTestApp.app/.png
I use following Clipboard module: https://github.com/react-native-clipboard/clipboard/
NOTE: it is reproducible on device with iOS 16.7.1
React Native Version
0.72.7
Output of
npx react-native infoSystem:
OS: macOS 14.1.1
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 27.57 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 18.17.1
path: /var/folders/c9/26x5c4kd5ggcl4z_lg_5gnsr0000gq/T/yarn--1700584616538-0.6727902694916463/node
Yarn:
version: 1.22.19
path: /var/folders/c9/26x5c4kd5ggcl4z_lg_5gnsr0000gq/T/yarn--1700584616538-0.6727902694916463/yarn
npm:
version: 9.6.7
path: /usr/local/bin/npm
Watchman:
version: 2023.06.08.00
path: /usr/local/bin/watchman
Managers:
CocoaPods:
version: 1.14.3
path: /Users/vtaliar/.rvm/gems/ruby-2.7.5/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.0
- iOS 17.0
- macOS 14.0
- tvOS 17.0
- watchOS 10.0
Android SDK: Not Found
IDEs:
Android Studio: 2022.2 AI-222.4459.24.2221.9971841
Xcode:
version: 15.0.1/15A507
path: /usr/bin/xcodebuild
Languages:
Java:
version: 11.0.18
path: /Users/vtaliar/.jenv/shims/javac
Ruby:
version: 2.7.5
path: /Users/vtaliar/.rvm/rubies/ruby-2.7.5/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.72.7
wanted: 0.72.7
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false
Steps to reproduce
WARN Could not find image file:///private/var/containers/Bundle/Application//ClipboardTestApp.app/.png
NOTE:
tries to load it as local image in native code
imageIoshas correct base64 string butSnack, screenshot, or link to a repository
Snack link: https://snack.expo.dev/aQr08Pfec