Search code examples
ionic-frameworkionic2ionic-devapp

Allow IONIC DevApp through the firewall


I am able to connect to IONIC DEVAPP via my personal computer but unable to connect it when hosted on the office laptop even on my home wifi network.

I can see my app on both office and personal laptop.

$ionic serve -c

I am able to access the Devapp hosted URL via my browser

http://192.168.1.115:8100/?devapp=true

But, from my Android device, on my office laptop it gives the following error

net::ERR:CONNECTION_TIMED_OUT( http://192.168.1.115:8100/?devapp=true)

It seems more like a Firewall Issue rather than a network issue.


Solution

  • You just need to open the port in windows firewall, since you told that you're using windows...

    • Go to Control Panel and find Windows Firewall.
    • Click the Advanced Settings.
    • On the left you must click Inbound Rules and under Actions, click the New Rule.
    • Select Port.
    • Type the ports you want to open.
    • Allow the Connection and configure the rest.

    Done;

    Add this line to your config.xml file:

        <preference name="loadUrlTimeoutValue" value="700000" />
    

    Now test your DevApp again. You can use Android Emulator on your device instead if you want.