react-native-fs icon indicating copy to clipboard operation
react-native-fs copied to clipboard

The operation couldn’t be completed. No space left on device

Open nijarv opened this issue 2 years ago • 1 comments

I'm encountering an issue with the react-native-fs (version 2.20.0) where I receive an error message saying "The operation couldn’t be completed. No space left on device" even though there are GBs of space available on the device. This issue occurs when I attempt to download images and videos. Any assistance or insights into this issue would be greatly appreciated.

Environment:

  • Device: iPhone 12 Mini
  • iOS Version: 17.0.3
  • Mac Model: MacBook Pro 13-inch, M1, 2020
  • Mac OS Version: Sonoma 14.0
  • Xcode Version: 15.0
  • NPM Version: 2.20.9
  • react: 18.2.0
  • react-native: 0.71.10

Code Snippet:

Here's a snippet of the code that triggers this error:

let path = RNFS.DocumentDirectoryPath + '/image.png';

RNFS.downloadFile({ fromUrl: eachTemplate.uri, toFile: path }).promise.then((resp) => {
    if (resp.statusCode === 200)
        setImagePath(path);
}).catch((err) => {
    console.log(err);
});

Error Message:

The operation couldn’t be completed. No space left on device

Steps to Reproduce:

Ensure the device has ample storage space. Attempt to download an image or video file using the downloadFile method from react-native-fs. Expected Result:

The file should download successfully without any errors since there is sufficient storage space on the device.

Actual Result:

The error message "The operation couldn’t be completed. No space left on device" is displayed.

I look forward to your suggestions and help. Thanks in advance!

nijarv avatar Oct 09 '23 08:10 nijarv

Has anyone found an answer to this yet?

NathanNovak avatar Jul 18 '24 20:07 NathanNovak