Property storage exceeds 196607 properties when sending a file via fetch()
- Dominant language
- JavaScript
- Stars
- 11.3k
- Forks
- 859
- Avg merge
- 1h 30m
- Merged PRs (30d)
- 3
Description
## Bug Description
In my app I am using fetch to upload a file to a server. The server accepts the data in the same format as a HTML form would send it. I am using FormData to prepare the data. The error occurs when sending the data. This happens with axios, fetch and XMLHttpRequest. (probably because it's all the same)
### Using XMLHttpRequest


### Using axios


- [x] I have run `gradle clean` and confirmed this bug does not occur with JSC
- [x] The issue is reproducible with the latest version of React Native.
Hermes git revision (if applicable): -
React Native version: 0.74.1
OS: Host: Linux, Phone: Android 12
Platform (most likely one of arm64-v8a, armeabi-v7a, x86, x86_64): x86_64 (emulator)
## Steps To Reproduce
1. Create a ~2MB Uint8Array (for example a binary for OTA updating a MCU)
2. Add it to a FormData instance
3. Make a request
code example:
### axios
```ts
const uploadOTA = async (data: Uint8Array) => {
const formData = new FormData();
formData.append('firmware', data);
const axiosOptions = {
url: 'http://localhost:3000/', // test server
method: 'POST',
data: formData,
headers: {
'Content-Type': 'multipart/form-data',
},
};
const res = await axios(axiosOptions);
return res.status === 200;
};
uploadOTA(data); // In my code, this data is the result of a fetch request that is downloading a binary from github releases
```
### fetch
```ts
const uploadOTA = async (data: Uint8Array) => {
const formData = new FormData();
formData.append('firmware', data);
const fetchOptions: RequestInit = {
method: 'POST',
body: formData,
headers: new Headers({
'Content-Type': 'multipart/form-data',
}),
};
const res = await fetch('http://localhost:3000/', fetchOptions);
return res.status === 200;
};
uploadOTA(data); // In my code, this data is the result of a fetch request that is downloading a binary from github releases
```
## The Expected Behavior
No crash, file uploading.
Contributor guide
Research direction
Start by reproducing the axios, fetch, or XMLHttpRequest FormData upload with a roughly 2MB Uint8Array on React Native 0.74.1, Android 12 x86_64, using Hermes and then JSC for comparison. The issue mentions no source file or test entry point; done means the request uploads the file without the “Property storage exceeds 196607 properties” error or a crash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100