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

In react native iOS build getting timeout error when requesting api, It was working fine in iOS 14.4 but after that it was getting timeout error randomly

Open rbHACKer opened this issue 4 years ago • 3 comments

In react native iOS build getting timeout error randomly when requesting api, It was working fine in iOS 14.4 but after that it was getting timeout error randomly.

Description

I'm using axios library for api request,When I hit api then it is taking longer time in iOS real device compare to android and simulator,I'm getting (finished with error [-1001] Error Domain=NSURLErrorDomain Code=-1001 "The request timed out.")in Xcode

React Native version:

 "react": "16.13.1",
"react-native": "0.63.2",

Snack, code example, screenshot, or link to a repository:

import Axios from 'axios'; const axios = Axios.create({ baseURL: BASE_URL, timeout: 90000, headers: { 'Content-Type': 'application/json', }, validateStatus: function (status) { return status == 200; } }); componentDidMount = async()=>{ let key = new FormData(); key.append("key","xyzwrtychbcvdvhdbjscsjdd"); let headers = { 'Content-Type': 'multipart/form-data' } const result = await axios.post(${baseURL},key, { headers: headers }); }

rbHACKer avatar Jul 05 '21 06:07 rbHACKer

我也遇到了 同样的情况 image

xiaoliuxiansheng avatar Jul 27 '21 06:07 xiaoliuxiansheng

我也遇到了 同样的情况 image

@xiaoliuxiansheng Did you find any solution ?

luckysamansco avatar Jul 28 '21 12:07 luckysamansco

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Feb 22 '24 05:02 github-actions[bot]

This issue was closed because it has been stalled for 7 days with no activity.

github-actions[bot] avatar Feb 29 '24 05:02 github-actions[bot]