I have a web service running in my local machine. I created an app that runs on my Android device. Both of them are in the same Wi-Fi. I am able to access the web service from my Android mobile using Chrome. However, when I try to access it from my app, I get Connection Refused error regularly. But some times, it works fine. I am using this for enabling port forwarding: chrome://inspect/#devices
What could be the reason for this intermittent error?