Closed
Description
Is this a bug report?
Yes
Have you read the Bugs section of the Contributing to React Native Guide?
Yes
Environment
react-native -v
: react-native-cli: 2.0.1 react-native: 0.46.3node -v
: v7.7.3npm -v
: 4.1.2yarn --version
(if you use Yarn): ---
Then, specify:
- Target Platform: Android
- Development Operating System: macOS Sierra 10.12.5 (16F73)
- Build tools: Android Studio
Steps to Reproduce
fetch('https://pricesea.ru/api/auth/info', {
credentials: 'include'
}).then(res => {
...
}).catch((e) => {
console.log(e);
});
Expected Behavior
Request should return HTTP code 200 and some data or HTTP code 401.
Actual Behavior
I have an error:
TypeError: Network request failed
at XMLHttpRequest.xhr.onerror (fetch.js:441)
at XMLHttpRequest.dispatchEvent (event-target.js:172)
at XMLHttpRequest.setReadyState (XMLHttpRequest.js:546)
at XMLHttpRequest.__didCompleteResponse (XMLHttpRequest.js:381)
at XMLHttpRequest.js:485
at RCTDeviceEventEmitter.emit (EventEmitter.js:181)
at MessageQueue.__callFunction (MessageQueue.js:260)
at MessageQueue.js:101
at MessageQueue.__guard (MessageQueue.js:228)
at MessageQueue.callFunctionReturnFlushedQueue (MessageQueue.js:100)
Reproducible Demo
(Paste the link to an example project and exact instructions to reproduce the issue.)
I have tested different API SDK Platform versions (from 22 up to 26), the problem reproduces only on API SDK Platform 24 (Android 7.0).
I also did this request via native Android app and it was successful on all Platform versions, even 24.
Activity