Не удалось завершить операцию phphotoserrordomain ошибка 1

This error message pops up when I try to use the sharing function in Photos. It pops up as soon as I select Airdrop or email a photo from Photos (Version 5.0 (121.17.170)) with Catalina (10.15.2). Not sure what’s happening or how to fix it. This doesn’t happen with I use GraphicConverter 11.1.2 and share photos.

Also, my computer is experiencing frequent crashes of photoanalysisd. I tried rebuilding my photo library (~38K photos); that didn’t do anything.

Anyone else seeing this?

Posted on Jan 1, 2020 11:29 AM

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

  1. I am just calling the CameraRoll.saveToCameraRoll with the remote url

Describe what you expected to happen:

  1. I expected the video to be saved in the photos
  2. 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',
          );
        });

Question

I am trying to store images which is getting from link to Gallery.

code:
let image = 'https://i.picsum.photos/id/190/200/300.jpg' CameraRoll.saveToCameraRoll(image, 'photo').then(r => { Alert.alert('alert', 'saved successfully .', [{ text: 'okay'}]); }) .catch((err) => { console.log(err); Alert.alert('error', ' error '+ err, [{ text: 'okay'}]); })

Error:

Error: The operation couldn’t be completed. (PHPhotosErrorDomain error -1.)

Я только что столкнулся с такой же ситуацией, вот как я ее решил:

Я скачал файл, используя rn-fetch-blob:

let file
RNFetchBlob
    .config({
        fileCache: true,
        appendExt: path.substring(path.lastIndexOf('.')+1, path.length)
           //get the file's extension from the URL it's coming from and append to the file name that RNFectchBlob will create locally
    })
    .fetch('GET', path) //GET request to URL which has your file
    .then((res) => {
        file = res //var 'file' is the temp object which contains all data from our file
    })

с файлом, сохраненным локально в вашем приложении, теперь мы можем вызвать CameraRoll чтобы сохранить файл:

CameraRoll.saveToCameraRoll(file.path())
.then(Alert.alert("Done!", "Your file has been saved."))


Go to ios


r/ios


r/ios

Everything Apple iOS & iPadOS




Members





Online



by

JoshiiWashy9oofs



How do I fix the error “(PHPhotosErrorDomain error -1)”?

I’m trying to move a video on the app Documents to my camera roll, but it keeps on saying this error. What does it mean and do I fix it? Any help would be appreciated.

Понравилась статья? Поделить с друзьями:
  • Не удалось завершить операцию officeimporterrordomain ошибка 912
  • Не удалось завершить операцию nsurlerrordomain ошибка 1012
  • Не удалось завершить операцию mcmailerrordomain ошибка 1030
  • Не удалось завершить операцию coremediaerrordomain ошибка 17383
  • Не удалось завершить операцию cocoa ошибка 1