admin管理员组

文章数量:1314587

I'm working on mobile application (angular ionic capacitor). Our test-server with api is reachable only when you are connected to VPN.

When I run application on real android device (vpn is ON) everything works fine. But when I try to send any request from application running in Android Studio Emulator (VPN on laptop is also ON) I get error: Unable to resolve host "our-host-name".

Is there any way to setup Emulator or smth else to let people test application in Emulator?

Thanks.

I noticed also that our-host-name is not reachable even if I send some simple GET from Chrome in Emulator. But if I put ip-address instead of hostname - it works.

BTW: requests are on http protocols for testing (not https).

I'm working on mobile application (angular ionic capacitor). Our test-server with api is reachable only when you are connected to VPN.

When I run application on real android device (vpn is ON) everything works fine. But when I try to send any request from application running in Android Studio Emulator (VPN on laptop is also ON) I get error: Unable to resolve host "our-host-name".

Is there any way to setup Emulator or smth else to let people test application in Emulator?

Thanks.

I noticed also that our-host-name is not reachable even if I send some simple GET from Chrome in Emulator. But if I put ip-address instead of hostname - it works.

BTW: requests are on http protocols for testing (not https).

Share Improve this question asked Jan 30 at 12:43 Halyna KyryliukHalyna Kyryliuk 11 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 0

there can be many ways to check the issue but generally it sounds like You need to set up that VPN host in the capacitor.config.ts file. https://capacitorjs/docs/guides/live-reload#using-with-framework-clis

本文标签: Error Unable to resolve host when run ionic application in Android studio emulatorStack Overflow