tesshucom / jpsonic

This is a repository for development. See https://github.com/jpsonic/jpsonic
GNU General Public License v3.0
14 stars 13 forks source link

Can't log in with android client substreamer #2648

Closed KeenVox closed 4 months ago

KeenVox commented 4 months ago

System information

Please fill in your question.

Hi there, I set up jpsonic as standalone on my raspberry pi and everthing works as it should when I enter jpsonic through the localhost web adress. I can add and play my music files.

Now I want to connect with substreamer from my android phone as I have with airsonic before.

But all I get is "500 Could not connect to server". Password and username is correct as is the web adress.

Logfile gives me:

2024-05-22 19:21:35.043 ERROR --- c.t.j.s.LoggingExceptionResolver : 192.168.178.96: An exception occurred while loading http://192.168.178.29:4040/rest/ping.view?v=1.13.0&c=substreamer&f=json&p=&u=

java.util.concurrent.CompletionException: jakarta.xml.bind.PropertyException: name: eclipselink.media-type value: application/json at com.tesshu.jpsonic.controller.JAXBWriter.createJsonMarshaller(JAXBWriter.java:104) ~[classes!/:114.1.0] at com.tesshu.jpsonic.controller.JAXBWriter.writeResponse(JAXBWriter.java:140) ~[classes!/:114.1.0] at com.tesshu.jpsonic.controller.SubsonicRESTController.ping(SubsonicRESTController.java:282) ~[classes!/:114.1.0] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na] at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na] at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:255) ~[spring-web-6.1.6.jar!/:6.1.6] at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:188) ~[spring-web-6.1.6.jar!/:6.1.6] at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:118) ~[spring-webmvc-6.1.5.jar!/:6.1.5] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:925) ~[spring-webmvc-6.1.5.jar!/:6.1.5] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:830) ~[spring-webmvc-6.1.5.jar!/:6.1.5] at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-6.1.5.jar!/:6.1.5] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1089) ~[spring-webmvc-6.1.5.jar!/:6.1.5] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:979) ~[spring-webmvc-6.1.5.jar!/:6.1.5] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014) ~[spring-webmvc-6.1.5.jar!/:6.1.5] at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:903) ~[spring-webmvc-6.1.5.jar!/:6.1.5] at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:527) ~[jakarta.servlet-api-6.0.0.jar!/:6.0.0] at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885) ~[spring-webmvc-6.1.5.jar!/:6.1.5] at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:614) ~[jakarta.servlet-api-6.0.0.jar!/:6.0.0] at org.eclipse.jetty.ee10.servlet.ServletHolder.handle(ServletHolder.java:736) ~[jetty-ee10-servlet-12.0.7.jar!/:12.0.7] at org.eclipse.jetty.ee10.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1614) ~[jetty-ee10-servlet-12.0.7.jar!/:12.0.7] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:110) ~[spring-web-6.1.6.jar!/:6.1.6] at org.eclipse.jetty.ee10.servlet.FilterHolder.doFilter(FilterHolder.java:205) ~[jetty-ee10-servlet-12.0.7.jar!/:12.0.7] at org.eclipse.jetty.ee10.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1586) ~[jetty-ee10-servlet-12.0.7.jar!/:12.0.7] at com.tesshu.jpsonic.security.JWTRequestParameterProcessingFilter.doFilterInternal(JWTRequestParameterProcessingFilter.java:81) ~[classes!/:114.1.0] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.1.6.jar!/:6.1.6] at org.eclipse.jetty.ee10.servlet.FilterHolder.doFilter(FilterHolder.java:205) ~[jetty-ee10-servlet-12.0.7.jar!/:12.0.7] at org.eclipse.jetty.ee10.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1586) ~[jetty-ee10-servlet-12.0.7.jar!/:12.0.7] at com.tesshu.jpsonic.filter.FontSchemeFilter.doFilter(FontSchemeFilter.java:80) ~[classes!/:114.1.0] at org.eclipse.jetty.ee10.servlet.FilterHolder.doFilter(FilterHolder.java:205) ~[jetty-ee10-servlet-12.0.7.jar!/:12.0.7] at org.eclipse.jetty.ee10.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1586) ~[jetty-ee10-servlet-12.0.7.jar!/:12.0.7] at com.tesshu.jpsonic.filter.RequestEncodingFilter.doFilter(RequestEncodingFilter.java:51) ~[classes!/:114.1.0] at org.eclipse.jetty.ee10.servlet.FilterHolder.doFilter(FilterHolder.java:205) ~[jetty-ee10-servlet-12.0.7.jar!/:12.0.7] at org.eclipse.jetty.ee10.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1586) ~[jetty-ee10-servlet-12.0.7.jar!/:12.0.7] at com.tesshu.jpsonic.filter.RESTFilter.doFilter(RESTFilter.java:60) ~[classes!/:114.1.0] at org.eclipse.jetty.ee10.servlet.FilterHolder.doFilter(FilterHolder.java:205) ~[jetty-ee10-servlet-12.0.7.jar!/:12.0.7] at org.eclipse.jetty.ee10.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1586) ~[jetty-ee10-servlet-12.0.7.jar!/:12.0.7] at com.tesshu.jpsonic.filter.ParameterDecodingFilter.doFilter(ParameterDecodingFilter.java:65) ~[airsonic-taglibs-114.1.0.jar!/:114.1.0] at org.eclipse.jetty.ee10.servlet.FilterHolder.doFilter(FilterHolder.java:205) ~[jetty-ee10-servlet-12.0.7.jar!/:12.0.7] at org.eclipse.jetty.ee10.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1586) ~[jetty-ee10-servlet-12.0.7.jar!/:12.0.7] at com.tesshu.jpsonic.filter.BootstrapVerificationFilter.doFilter(BootstrapVerificationFilter.java:68) ~[classes!/:114.1.0] at org.eclipse.jetty.ee10.servlet.FilterHolder.doFilter(FilterHolder.java:205) ~[jetty-ee10-servlet-12.0.7.jar!/:12.0.7] at org.eclipse.jetty.ee10.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1586) ~[jetty-ee10-servlet-12.0.7.jar!/:12.0.7] at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:108) ~[spring-web-6.1.6.jar!/:6.1.6] at org.springframework.security.web.FilterChainProxy.lambda$doFilterInternal$3(FilterChainProxy.java:231) ~[spring-security-web-6.2.4.jar!/:6.2.4] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:365) ~[spring-security-web-6.2.4.jar!/:6.2.4] at org.springframework.security.web.access.intercept.AuthorizationFilter.doFilter(AuthorizationFilter.java:100) ~[spring-security-web-6.2.4.jar!/:6.2.4] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.2.4.jar!/:6.2.4] at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:126) ~[spring-security-web-6.2.4.jar!/:6.2.4] at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:120) ~[spring-security-web-6.2.4.jar!/:6.2.4]

Any idea what could be the cause and where I should look?

Thx best regards

KeenVox commented 4 months ago

Well that's strange the official app works without problem. Normaly that,'s the one that has problems. That's why I switched to substreamer.

Even more stranger. I first installed jpsonic in docker but it was way to slow on my raspberry pi. But in docker mode substreamer worked perfectly...

Am 22. Mai 2024 19:50:53 schrieb "tesshu.com" @.***>:

I have neglected to check the operation of Sinsonic API recently, so let's check it. (Of course, a very simple ping test is included in the release.)

By the way, have you ever used Subsonic Music Streamer? I'm not saying I recommend it, but it is an official app created by the creator of Subsonic. In other words, it is a very compatible combination for checking operation. If you cannot connect with this app, the possibility of Jpsonic degradation will be very high 😔

On the other hand, I have also seen software called Subsonic clients that originally had problems with the communication method. (I don't know if Substreamer is that, but I feel like some people have used it in the past!)

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.

tesshucom commented 4 months ago

Ah, this might be a bit of a lack of announcement. The connection may be refused due to security requirements. This information was published in Japanese... 😔

I previously introduced an app called ``substreamer'', but it has been removed from the list due to some difficulties with the connection method. When Jpsonic is started alone, Jetty is used as the web container. If you use substreamer in this state, a large amount of warning logs will be output for certain functions. This is by design (there are cases where similar logs are output for malicious connections, so we do not suppress it). Tomcat is a little lenient in this regard, so it is possible to hide this logging issue. If you really want to use substreamer, please deploy it to Tomcat

So substreamer may not be recommended in the normal way. Sorry.

In the previous method I tried, there were two workarounds. (I don't know now though)

I believe substreamer was developed using only Airsonic during the Airsonic era when Tomcat was used. Like Subsonic, Jpsonic uses Jetty for its Application Server. Jetty is faster and a bit more secure.

Or you can make a request to the substreamer. Personally, I think the connection is not very good...


By the way, have you ever used Subsonic Music Streamer? I'm not saying I recommend it, but it is an official app created by the creator of Subsonic. In other words, it is a very compatible combination for checking operation. If you are making a cautious first attempt at access, that is your best bet. If you cannot connect with this app, the possibility of Jpsonic degradation will be very high !

tesshucom commented 4 months ago

Thank you for the information!

Even more stranger. I first installed jpsonic in docker but it was way to slow on my raspberry pi. But in docker mode substreamer worked perfectly...

Since the adjustment is based on DS220+, there is a possibility that the tuning is not appropriate...

Requirements

If I had a real machine, I could help you.. but unfortunately I don't have a raspberry pi...

KeenVox commented 4 months ago

Ah, good to know! Thank you!

I will use another subsonic client. Substreamer is no must for me. I only use the subsonic apps on my phone, because they are free and readily available.

Most of the time I want to use jpsonic with my Denon smart speaker over UPnP. Will test that over the next days. But as of now jpsonic seems to do the job just perfect. :-)

tesshucom commented 4 months ago

UPnP will be gradually improved with the current v114, so please be patient and try it out...

It looks like there are no problems so it will be closed.