# Fetch() not working on Android

**URL:** <https://forum.ionicframework.com/t/fetch-not-working-on-android/208108>\
**Category:** Capacitor\
**Created:** [April 13, 2021, 11:22pm UTC](https://forum.ionicframework.com/t/fetch-not-working-on-android/208108 "2021-04-13T23:22:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wingedpig](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/wingedpig/32/134879_2.png) [@wingedpig](https://forum.ionicframework.com/u/wingedpig)\
**Post date:** [April 13, 2021, 11:22pm UTC](https://forum.ionicframework.com/t/fetch-not-working-on-android/208108/1 "2021-04-13T23:22:55Z")

</div>

I’m using fetch() to get web pages, which I then display. This works fine on iOS and in Chrome on the desktop. But using the Android emulator, I can’t seem to get web pages. The fetch returns without error, but when I try to access the returned data, I can’t. If I do a simple console.log() of the response.text(), the log entry never shows up in Android Studio (if I surround that line with other console.log() lines, those do show up). I can display the length of the response, but I can’t see/do anything with the data. Again, this all works on iOS and Chrome on the desktop. I’m using the Pixel\_3a\_API\_30\_x86 emulator in Android Studio.

EDIT: The network call never appears to happen.

Is this a permissions issue? I’m using https for the calls.

---

<div class="post-metadata">

**Author:** ![wingedpig](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/wingedpig/32/134879_2.png) [@wingedpig](https://forum.ionicframework.com/u/wingedpig)\
**Post date:** [April 28, 2021, 4:41pm UTC](https://forum.ionicframework.com/t/fetch-not-working-on-android/208108/2 "2021-04-28T16:41:14Z")

</div>

Following up on this. The problem was as follows. I was setting the server.hostname in the capacitor.config.json file to the domain of our service. On iOS, xhr calls into that domain would succeed. On Android, however, those calls would always just return our local index.html file.

In the end, I switched to using the HTTP community plugin and now everything works as expected.
