I am running into a issue with react-native app on android,
app was built using expo
the app runs fine on iOS devices as well as iOS simulator
running on android simulator, it give an warning at startup..
Possible Unhandled Promise Rejection (id: 0):
TypeError: Network request failed
image of error from simulator is attached
- any subsequent calls to fetch hang with following error
[Unhandled promise rejection: TypeError: Network request failed]
- node_modules/whatwg-fetch/dist/fetch.umd.js:535:17 in setTimeout$argument_0
- node_modules/react-native/Libraries/Core/Timers/JSTimers.js:130:14 in _callTimer
- node_modules/react-native/Libraries/Core/Timers/JSTimers.js:383:16 in callTimers
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:416:4 in __callFunction
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:109:6 in __guard$argument_0
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:364:10 in __guard
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:108:4 in callFunctionReturnFlushedQueue
- [native code]:null in callFunctionReturnFlushedQueue
the fetch call is made to https, however, after reading several posts on the net I added the following to the app.json with not effect
"android": {
"UsesCleartextTraffic": "true"
}
app dependencies from package.json are listed below
"dependencies": {
"@react-native-community/hooks": "^2.6.0",
"expo": "~39.0.2",
"expo-status-bar": "~1.0.2",
"graphql": "^14.7.0",
"graphql-request": "^3.3.0",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-39.0.4.tar.gz",
"react-native-maps": "^0.27.1",
"react-native-web": "~0.13.12"
},
any help on what may be the issue ??