itinance / itinance/react-native-fs

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

Open
#1,205 1 comment 6 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
5k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

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!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.