Page 1 of 1

Marshmallow: A network error occurred.

PostPosted: Fri Feb 26, 2016 1:58 pm
by mikes
Upgraded phone (HTC M9) to Marshmallow. Restored DSub from backup. Everything sorted out with file locations, I can see and play previously cached files.

But when trying to connect to my server I get an error. Doing a "Test Connection," I immediately get "A network error occurred." 4 times, then Connection failure. I've tried reconfiguring the server, installing the latest DSub (5.1.4), no luck. I can "Open in browser," and that works fine.

Maybe a permissions issue? This is in the log: "02-26 08:33:15.673 W/BackgroundTask_( 2288): type=1400 audit(0.0:286898): avc: denied { getopt } for scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:r:zygote:s0 tclass=unix_dgram_socket permissive=0"

Full log at http://pastebin.com/yKf4WU32

Re: Marshmallow: A network error occurred.

PostPosted: Fri Feb 26, 2016 5:37 pm
by daneren2005
Is this an official Marshmallow ROM or a custom one? From a little bit of googling it looks like a SE Linux issue. In Marshmallow there should also be a place to edit the permissions for a given app. Internet is NOT supposed to be one of the permissions that users are able to take away, but who knows what OEMs/custom ROMers screwed up.

Re: Marshmallow: A network error occurred.

PostPosted: Fri Feb 26, 2016 8:26 pm
by mikes
It's a rooted stock "ROM." Stock with bloatware frozen, WiFi tether enabled, not really any other changes. It was previously on Lollipop, set up the same way. For the permissions, only 3 are user configurable (Microphone, Phone, and Storage), and are enabled. "Full network access" is shown under "All permissions."

I did try the "official" Subsonic client, it does the same thing. But, it works fine with the demo server it's preconfigured for. So, I configured DSub to use the demo server (http://demo.subsonic.org, guest5/guest). That works too.

The difference between the demo server and my own is that I'm using https, on a non-standard port (4041), with my own certificate (the root CA is installed, and https access is fine from an browser on the same device). As I said, my server worked before, and is still working with other devices. I'm not sure how the sub clients connect, but guess there's a built-in library for http/s access?

Re: Marshmallow: A network error occurred.

PostPosted: Sat Feb 27, 2016 4:41 pm
by mikes
Odd. I upgraded the Subsonic server to 5.3, and the problem was resolved. I found a reference to the log message "javax.net.ssl.SSLHandshakeException: Handshake failed" on Android, which had the comment:
his code works in Android 2.3-4.4, but fails on Android 5.0 (devices and emulator) with error Connection closed by peer. Of course this is understandable because Android 5.0 tries to connect this old server with TLSv1.2 and modern ciphers and it does not support them.
So, there apparently was some change in the Subsonic server which fixed it. The above refers to Android 5.0 (Lollipop), which was working fine for me, it was only after upgrading to 6.0 (Marshmallow) that I had problems.

In any case, all working now, and not DSub's issue. Sorry to trouble you.

Re: Marshmallow: A network error occurred.

PostPosted: Wed Mar 30, 2016 7:26 pm
by matycakes
I had a very similar issue after upgrading my phone to Marshmallow only my subsonic server was already at 5.3. In my case, the dsub client on my phone was out of date. After upgrading to the latest version of dsub the problem went away.