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 badge1 Answer
Reset to default 0there 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