react-native-cameraroll: Error: The operation couldn’t be completed. (PHPhotosErrorDomain error -1.) iOS
Bug
Error: The operation couldn’t be completed. (PHPhotosErrorDomain error -1.) at Object.fn [as saveToCameraRoll] (NativeModules.js:99) at Function.save (CameraRoll.js:163) at Function.saveToCameraRoll (CameraRoll.js:169) at _callee2$ (VM5 index.bundle:209) at tryCatch (runtime.js:45) at Generator.invoke [as _invoke] (runtime.js:274) at Generator.prototype.<computed> [as next] (runtime.js:97) at tryCatch (runtime.js:45) at invoke (runtime.js:135) at runtime.js:170
Environment info
react-native info
output:
System:
OS: macOS 10.15.3
CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
Memory: 60.19 MB / 16.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 12.14.0 - /var/folders/7n/tg8wdbns7yvg3wqwnh_mzmp40000gn/T/yarn--1585096434645-0.8370493466760465/node
Yarn: 1.22.1 - /var/folders/7n/tg8wdbns7yvg3wqwnh_mzmp40000gn/T/yarn--1585096434645-0.8370493466760465/yarn
npm: 6.13.7 - /usr/local/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.6010548
Xcode: 11.2.1/11B53 - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.5 => 0.61.5
Library version: 1.4.0
Steps To Reproduce
- I am just calling the CameraRoll.saveToCameraRoll with the remote url …
Describe what you expected to happen:
- I expected the video to be saved in the photos
- I even tried it on the latest version and its still the same
Reproducible sample code
CameraRoll.saveToCameraRoll(url, 'video')
.then(response => {
console.log('***RES**');
console.log(response);
console.log('***RES**');
this.setState({isDownloading: false});
this.refs.completionToast.show('Download completed!');
})
.catch(error => {
console.log('*****');
console.log(error);
console.log('*****');
this.setState({isDownloading: false});
this.refs.completionToast.show(
'There was a problem downloading the video, please try again later',
);
});
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 10
- Comments: 22 (1 by maintainers)
Commits related to this issue
- fix: Error Domain=PHPhotosErrorDomain Code=-1 (#172) fixes #157 fixes #143 * Update RNCCameraRollManager.m — committed to react-native-cameraroll/react-native-cameraroll by ShotSkydiver 4 years ago
- chore(release): 1.6.1 [skip ci] ## [1.6.1](https://github.com/react-native-community/react-native-cameraroll/compare/v1.6.0...v1.6.1) (2020-05-08) ### Bug Fixes * Error Domain=PHPhotosErrorDomain C... — committed to react-native-cameraroll/react-native-cameraroll by semantic-release-bot 4 years ago
I solved it by roll back to version 1.4.0. yarn upgrade @react-native-community/cameraroll@1.4.0
@bartolkaruza Still happen to me “@react-native-community/cameraroll”: “^4.0.0”,
still happen to me. “@react-native-community/cameraroll”: “^4.0.0”,
@bartolkaruza I just opened a new PR #172 with the fixes! Works perfectly for me!
I got it working also using react-native
0.63.2
, react-native-cameraroll1.4.0
and rn-fetch-blob0.12.0
Here is a sample code:
still happen to me. “@react-native-community/cameraroll”: “^4.0.0”
🎉 This issue has been resolved in version 1.6.1 🎉
The release is available on:
Your semantic-release bot 📦🚀
thanks it’s work