abarisain / dmix

A modern MPD Client for Android.
Apache License 2.0
588 stars 205 forks source link

Connection UI problems #763

Open hurzl opened 9 years ago

hurzl commented 9 years ago

I switch WLAN off and on (I go out and come back) and get the dialog "connect failed: ENETUNREACH (Network is unreachable)." I can't get past this dialog no matter what I do other than kill the program completely.

dav01it commented 8 years ago

Investigating on connection problems I noticed that if you lock the phone/tablet, after resuming it you get connection error even if you quit and restart the app; but, if you open another app that uses wifi, download some data, and then switch back to mpdroid the error vanishes. So it could be caused by a wrong managment of connectivity change when android suspends an then resumes from powersave. I'm not android expert nor I have knowledge of mpdroid code but googling I found this article http://developer.android.com/training/monitoring-device-state/connectivity-monitoring.html supporting my thesis on how tricky could be handling this aspect.... maybe I'm wrong.. only hoping to give some useful clues. :-)

hurzl commented 8 years ago

I can't confirm this, downloading sth. via another app doesn't help.

But if restart the mpd server MPDroid has no problem reconnecting (without interrupting wifi of course).

dav01it commented 8 years ago

Perhaps we can try to play with some mpd server config options such as "connection_timeout ... (look at the man page "http://linux.die.net/man/5/mpd.conf" ) or "max_connections " I'll try too and I'll write here the results.

abarisain commented 8 years ago

Usually this happens when mpdroid bugs out and maxes out mpd's connections. This got insanely better in the betas though

Le 1 déc. 2015 à 12:52, dav01it notifications@github.com a écrit :

Perhaps we can try to play with some mpd server config options such as "connection_timeout ... (look at the man page "http://linux.die.net/man/5/mpd.conf" ) or "max_connections " I'll try too and I'll write here the results.

— Reply to this email directly or view it on GitHub.

dav01it commented 8 years ago

@hurzl please try again in this way because for me works every time: start some music in mpd. Lock phone for.. lets say a minute. Re enable phone, you get network error. Switch to chrome or other browser open a link and FORCE PAGE RELOAD, now switch back to mpd .. should work. Thanks for trying.

hurzl commented 8 years ago

No sorry it doesn't help. (What do you mean by "lock phone"? I mean wifi lost or switched off) The error I get is "socket failed: errno 64 (Machine is not on the network)" Anyway it wouldn't be a solution having to switch to a browser and download something.

dav01it commented 8 years ago

@hurzl I get "no response from server" when reactivating after the phone goes in standby ( in stand by when you activate it again i have a lock screen). I never got errno 64 before. I found another way that works for me without switching: in settings->connection ignore the "default" and use the "Wlan based connection settyings" and in the "host" and "streaming host" fields put the server's network hostname NOT THE IP. I think you must have samba installed and active in the server in order to operate this way.

hurzl commented 8 years ago

If I use the name of my samba server (I don't want to depend on samba anyway) it connects, but after wifi was gone I get "No address associated with hostname" and I have to kill it just the same. In that state even entering the ip number doesn't solve it.

dav01it commented 8 years ago

In my case setting samba name both in HOST and also STREAMING HOSTI get error after wifi on off but i do not need to kill retry usually works and in the worst case i solve with quit and reopen. My version 1.07.2

hurzl commented 8 years ago

Is a trick possible in android to make the app crash so that it really quits if I want?

abarisain commented 8 years ago

System.exit(0) iirc.

Or throw a new runtime exception ¯(ツ)/¯

Le 14 déc. 2015 à 19:15, hurzl notifications@github.com a écrit :

Is a trick possible in android to make the app crash so that it really quits if I want?

— Reply to this email directly or view it on GitHub.

hurzl commented 8 years ago

I thought exiting was somehow forbidden nowadays, but that works :)

dav01it commented 8 years ago

you do not need to kill app if you go to home screen or any other app before the phone goes to powersave mode.

hurzl commented 8 years ago

I have no problem reconnecting after suspend

dav01it commented 8 years ago

try if you reconnect after changing wifi no?

Il 16/12/2015 10:32, hurzl ha scritto:

I have no problem reconnecting after suspend

— Reply to this email directly or view it on GitHub https://github.com/abarisain/dmix/issues/763#issuecomment-165046115.

abarisain commented 8 years ago

Note that hurzl running a bleeding edge version might change his experience compared to yours

dav01it commented 8 years ago

ah ok thanks clarifying!

Il 16/12/2015 11:23, Arnaud Barisain-Monrose ha scritto:

Note that hurzl running a bleeding edge version might change his experience compared to yours

— Reply to this email directly or view it on GitHub https://github.com/abarisain/dmix/issues/763#issuecomment-165058011.

hurzl commented 8 years ago

It seems this whole problem doesn't exist on Android 4.4 - ?

fin0 commented 7 years ago

When will you publish a new version where this fix/commits are included?