Allow IONIC DevApp through the firewall

2.3k Views Asked by At

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.

2

There are 2 best solutions below

0
Frederiko Ribeiro On BEST ANSWER

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.

1
Sam Amira On

I had the same problem and thought as you did, that this was a firewall issue. As I am on Ubuntu, using the ufw firewall...

sudo ufw allow 8100

in a terminal did the trick for me, and IONIC DEVAPP connected to my app.