You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After updating react-native in the application to version 0.71.1 and targetSDK to version 33, a problem began to appear when loading pictures. Moreover, the loading is strange, the first picture does not go away, an error comes. Following it, I send the next one - the picture is sent without problems. I noticed that the bug is observed on Android versions below 12 (tested on this device)
The image is attached to formData and sent as a POST request to the server. Memo used, used the XMLHttpRequest class separately. Flipper is not used in the project, so many of the upgrade tips are out of date.
It is not an issue with the API.
To Reproduce
No response
Code snippet
constxhrRequest=(data)=>{const{ accessToken, fileName, type, uri }=dataconstxhr=newXMLHttpRequest()constbody=newFormData()xhr.open('POST',`${URL}${ENDPOINTS.ATTACH_FILE}`)xhr.setRequestHeader('Authorization',`Bearer ${accessToken}`)xhr.setRequestHeader('Content-type','multipart/form-data')body.append('file',{ uri,name: fileName, type })xhr.send(body)}exportconstattachFile=({ accessToken, fileName, type, uri })=>{constbody=newFormData()body.append('file',{name: fileName,uri: Platform.OS==='android' ? uri : uri.replace('file://',''),
type,})if(Platform.OS==='android'){xhrRequest({accessToken, fileName, type, uri})}returnapi.post(ENDPOINTS.ATTACH_FILE,body,{headers: {Authorization: `Bearer ${accessToken}`,'Content-type': 'multipart/form-data',},maxContentLength: Infinity,}).then(R.prop('data'))}
Expected behavior
No response
Axios Version
0.24.0
Adapter Version
No response
Browser
No response
Browser Version
No response
Node.js Version
18.16.1
OS
No response
Additional Library Versions
react: 18.2.0,
react-native: 0.71.10
Additional context/Screenshots
No response
The text was updated successfully, but these errors were encountered:
Liptor
changed the title
FATAL undefined undefined Error: Network Error
FATAL undefined undefined Error: Network Error (Android)
Jul 12, 2023
Describe the bug
After updating react-native in the application to version 0.71.1 and targetSDK to version 33, a problem began to appear when loading pictures. Moreover, the loading is strange, the first picture does not go away, an error comes. Following it, I send the next one - the picture is sent without problems. I noticed that the bug is observed on Android versions below 12 (tested on this device)
The image is attached to formData and sent as a POST request to the server. Memo used, used the XMLHttpRequest class separately. Flipper is not used in the project, so many of the upgrade tips are out of date.
It is not an issue with the API.
To Reproduce
No response
Code snippet
Expected behavior
No response
Axios Version
0.24.0
Adapter Version
No response
Browser
No response
Browser Version
No response
Node.js Version
18.16.1
OS
No response
Additional Library Versions
Additional context/Screenshots
No response
The text was updated successfully, but these errors were encountered: