woheller69 / solxpect

Android app to forecast the output of your photovoltaic system (PV) or balcony pv using data from Open-Meteo.com. Even shading and the temperature coefficient are taken into account.
GNU General Public License v3.0
78 stars 4 forks source link

No internet connection when on wifi #4

Closed therealstretch closed 1 year ago

therealstretch commented 1 year ago

When connected to wifi, pressing the refresh button the toast "Das Gerät ist nicht mit dem Internet verbunden!" appears and data is not refreshed.

When connected to mobile data (LTE) everything works as expected.

All other applications on the phone do not have any issues with the wifi-connection.

woheller69 commented 1 year ago

probably an issue with a vpn or firewall.

I am using isReachable() https://developer.android.com/reference/java/net/InetAddress#isReachable(int)

It seems Pings are blocked.

woheller69 commented 1 year ago

Can you please try this? I am trying a different way to find if a device is online. This problem sometimes also happens in my weather apps for some users. So maybe this is a solution:

Remove .zip from filename and install. app-release.apk.zip

therealstretch commented 1 year ago

Yes, this is working. Thank you!

woheller69 commented 1 year ago

ok, then I hope it has no other unintended effects and works for others as well...

woheller69 commented 1 year ago

another small change in the new online check. Hope it still works. app-release.apk.zip

therealstretch commented 1 year ago

Yes, still working.

DECALIOC commented 1 year ago

I can confirm issues with the app "Firewall ohne Root". SolXpect is displayed as "uninstalled" and it appears like data are not refreshed, unless the mentioned firewall is stopped.

probably an issue with a vpn or firewall.

I am using isReachable() https://developer.android.com/reference/java/net/InetAddress#isReachable(int)

It seems Pings are blocked.

woheller69 commented 1 year ago

Does it work with the version above?

DECALIOC commented 1 year ago

Thank you! I just realized I still was on version 1.3 from F-Droid.

I updated to 1.4. The "uninstalled" flag is gone now.

However, I still see the message about solXpect being unable to connect to the Internet; both via LTE and WIFI, when the firewall is up.

woheller69 commented 1 year ago

Then you need to check why Firewall ohne Root blocks it and create a rule there

DECALIOC commented 1 year ago

"Firewall ohne Root"'s log says the connection was allowed. Maybe the connection works, but solXpect just thinks it cannot connect.

I will observe, if the data are refreshed, for a few days.

Thank you!

woheller69 commented 1 year ago

If solXpect says there is no Internet connection it will not work. Then a check has been blocked by the firewall