# My app (v6) with API Rest call works fine on browser but don't works on app-debug.apk

**URL:** <https://forum.ionicframework.com/t/my-app-v6-with-api-rest-call-works-fine-on-browser-but-dont-works-on-app-debug-apk/224495>\
**Category:** Ionic Angular\
**Created:** [June 23, 2022, 5:49pm UTC](https://forum.ionicframework.com/t/my-app-v6-with-api-rest-call-works-fine-on-browser-but-dont-works-on-app-debug-apk/224495 "2022-06-23T17:49:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![HugoVersiani](https://avatars.discourse-cdn.com/v4/letter/h/e95f7d/32.png) [@HugoVersiani](https://forum.ionicframework.com/u/HugoVersiani)\
**Post date:** [June 23, 2022, 5:49pm UTC](https://forum.ionicframework.com/t/my-app-v6-with-api-rest-call-works-fine-on-browser-but-dont-works-on-app-debug-apk/224495/1 "2022-06-23T17:49:27Z")

</div>

So my app works perfectly on the chrome but when I install the app-debug.apk on my device they just not work. I open the app but they don’t return the data from api call.  
I defined a enviromental variable with de url api on the enviroment.prod.ts  
Do someone can help me, please?

---

<div class="post-metadata">

**Author:** ![twestrick](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/twestrick/32/136131_2.png) [@twestrick](https://forum.ionicframework.com/u/twestrick)\
**Post date:** [June 23, 2022, 7:43pm UTC](https://forum.ionicframework.com/t/my-app-v6-with-api-rest-call-works-fine-on-browser-but-dont-works-on-app-debug-apk/224495/2 "2022-06-23T19:43:14Z")

</div>

If you connect your phone to your computer via USB, you can open Dev Tools in Chrome for the app by going to chrome://inspect/#devices. There you can see if there are any errors. My guess is that it is a CORS issue.

The following origins need to be allowed:

```auto
'capacitor://localhost', // iOS
'http://localhost', // Android

```
