rtista / stockit-api

The API for the StockIt Android application.
0 stars 0 forks source link

Can't connect to the API through the Android App #4

Open Bavilo opened 3 years ago

Bavilo commented 3 years ago

Hello and Thanks for your work!

I compiled the App and set up the API. When running the API Server I get the following:

Starting waitress server on 127.0.0.1:8088 Serving on http://HTPC:8088

so that seems to be working.

In the App I configured the API server to point to: HTPC:8088 (also tried the real IP) This won't work. The app will not connect and logcat just spits out failed to connect to htpc/192.168.1.109 (port 8088) from /192.168.1.44 (port 37398) after 10000ms.

What could be the problem?

Thanks!

rtista commented 3 years ago

Hey, sorry for the delay, I believe I must have missed the email notification!

So, the problem should be that the waitress server is listening on the local network interface (127.0.0.1) and so it is unable to receive requests from other network interfaces, have you tried using "0.0.0.0:8088" as the bind address? You should also make sure that no firewall is blocking the traffic from reaching the waitress port! ;)