Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

No connection to subsonic server after update to Ultrasonic 2.0.0 #99

Closed
WannabeNerd opened this issue Dec 19, 2017 · 16 comments
Closed
Assignees
Labels

Comments

@WannabeNerd
Copy link

Problem description

Since the last Update of Ultrasonic I cannot access my subsonic server anymore. When I try to browse my libary or even just use the "test" function in the server setting screen I get a pop up window with the following text:
"Error A network error occurred. Please check the server address or try again later."
Before the update to 2.0.0 everything was fine. Also the offical app does not show this kind of error.

Steps to reproduce

browse the server library or
use the "test" function in the server setting screen

System information

Ultrasonic version: 2.0.0
Android version: 8.0.0
Device info: Oneplus 3T
Subsonic-Server version: 6.1.3 (build e408c9) – 31. October 2017

@ogarcia
Copy link
Collaborator

ogarcia commented Dec 20, 2017

@Tapchicoma I make the lab probes for this issue and try to discover what is failing

@ogarcia ogarcia self-assigned this Dec 20, 2017
@ogarcia
Copy link
Collaborator

ogarcia commented Dec 20, 2017

@WannabeNerd I'm making tests with latest 6.1.3 Subsonic Standalone version and works well.

Can you check in server what request is coming and what reply is given?

The requests should be something like this two:

yourserver.example.com/rest/ping.view?u=USERNAME&c=UltraSonic%2520for%2520Android&f=json&v=1.7.0&p=enc:ENCODEDPASS
yourserver.example.com/rest/getLicense.view?u=USERNAME&c=UltraSonic%2520for%2520Android&f=json&v=1.16.0&t=TOKEN&s=SALT

Simply copy it and make a CURL to your server an give us the responses. Should be something like this:

$ curl 'http://yourserver.example.com/rest/ping.view?u=USERNAME&c=UltraSonic%2520for%2520Android&f=json&v=1.7.0&p=enc:ENCODEDPASS'
{
   "subsonic-response" : {
      "status" : "ok",
      "version" : "1.16.0"
   }
}

$ curl 'http://yourserver.example.com/rest/getLicense.view?u=USERNAME&c=UltraSonic%2520for%2520Android&f=json&v=1.16.0&t=TOKEN&s=SALT'
{
   "subsonic-response" : {
      "status" : "ok",
      "version" : "1.16.0",
      "license" : {
         "valid" : true,
         "email" : "foo@bar.com",
         "trialExpires" : "2016-05-13T07:31:40.726Z"
      }
   }
}

@ogarcia ogarcia added the bug label Dec 20, 2017
@weendigo
Copy link

weendigo commented Dec 20, 2017

@ogarcia I have the same problem. What comes to my mind is that I'm using HTTPS connection without a certificate. Could that be the issue?
Version 1.8.0 from F-Droid is connecting just fine.

Moreover, many other Subsonic-streaming apps are not connecting for me either, while the original Subsonic works well.

I was trying the requests from your last post but I don't know how to obtain the ENCODEDPASS value.

@Tapchicoma
Copy link
Collaborator

@weendigo does it mean that you are using self-signed certificate on your server?

@ogarcia
Copy link
Collaborator

ogarcia commented Dec 20, 2017

@weendigo we test the client with latest versions of oficial Subsonic server, Airsonic and Supysonic and in all of them works well.

The ENCODEDPASS value is simply your password but Hex Enconde, you can get it for example in this page. Remember put enc: to given value.

@Tapchicoma I think that with self-signed certificate @weendigo want to say us that are using a not recognized o valid https certificate in his server. I make the test with a no-valid certificate and tell you the results.

@ogarcia
Copy link
Collaborator

ogarcia commented Dec 20, 2017

Ok. We have an "issue" with self-signed or non-valid https certificates. The new API don't support it. This not is really a bug because it is working as expected, but I think that we need to add an option to ignore non-valid certificates.

@weendigo please, test your server using http or better, pick a Let's Encrypt certificate.

@Tapchicoma
Copy link
Collaborator

Personally I don't like the idea of enabling self-signed certificates by default, but possible solution will be add additional server setting that enables self-signed certificate (disabled by default).

@WannabeNerd
Copy link
Author

Hey guys, sry I am in the office at the moment and cannot check anything right now, but I dont get the last statement of @ogarcia : "The new API don't support it" If the new subsonic API doesn't support self sgined certs, why does the app of sindre mehus does not show this behavior?

And yes: I am using a self signed cert and wasn't keen about getting LE to work with my enviroment ;)

@ogarcia
Copy link
Collaborator

ogarcia commented Dec 20, 2017

@WannabeNerd I'm referring to our new Ultrasonic API 2.0.0 version 😉

@WannabeNerd
Copy link
Author

WannabeNerd commented Dec 20, 2017

@ogarcia ahh sry I didn't realize that. But I think @Tapchicoma is right: It would be great if you guys could implement an option to allow self signed certs.

@TcM1911
Copy link

TcM1911 commented Dec 25, 2017

You can also solve this issue by installing the root CA on your phone.

  1. Email the CA to yourself.
  2. Download it as a .crt file
  3. Under settings/security & locations/encryption & credentials select install from storage. Pick your root CA from the downloads.
  4. You are all set.

@ogarcia
Copy link
Collaborator

ogarcia commented Dec 26, 2017

@WannabeNerd and @weendigo please test with the latest version 2.1.0 (may take a while to appear in Store). It have an option to permit self-signed certificates that must fix this issue. 😉

@mgoldeyy
Copy link

The option to permit self-signed certificates does fix this issue.

I had upgraded subsonic server to the latest version and then I could no longer connect to it via my Ultrasonic app. Same error message reported above.

Upgrading Ultrasonic to 2.1.0 and checking the "self-signed certificates" box solved the problem.

@WannabeNerd
Copy link
Author

WannabeNerd commented Dec 26, 2017

I folks I'am very sorry, but unfortunately upgrading ultrasonic and checking the box "self-signed certificats" doesn't fix the issue for me :( I sitll get the error mentioned above.
It almost seems as if the box "Allow self-signed HTTPS certificate" does not have any effect at all. I doublechecked loggin in via desktop-PC browsers (Chrome & Firefox) and the offical subsonic app as well.

Is there anything I can do for you to provide some supporting data? Any of the curl commands from above?

@Tapchicoma
Copy link
Collaborator

@WannabeNerd the best option will be if you provide temporary user access to your server - just create a new user and say to me or @ogarcia login credentials in https://gitter.im/ultrasonic/ultrasonic

@Tapchicoma
Copy link
Collaborator

After testing with common user setting checkbox on solves this particular problem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants