Error: Index 0 out of bounds for length 0
Hey, I sometimes get the error "Error: Index 0 out of bounds for length 0". I can only fix it by restarting my PC.
Here is the output of the java console
Console output
se.michaelthelin.spotify.exceptions.detailed.NotFoundException: Resource not found at spotify.api.SpotifyCall.execute(SpotifyCall.java:80) at spotify.playback.data.visual.ContextProvider.getPlaylistContext(ContextProvider.java:192) at spotify.playback.data.visual.ContextProvider.findContextName(ContextProvider.java:85) at spotify.playback.data.PlaybackInfoProvider.buildBaseInfo(PlaybackInfoProvider.java:242) at spotify.playback.data.PlaybackInfoProvider.buildInfoTrack(PlaybackInfoProvider.java:382) at spotify.playback.data.PlaybackInfoProvider.getCurrentPlaybackInfo(PlaybackInfoProvider.java:155) at spotify.playback.PlaybackController.getCurrentPlaybackInfo(PlaybackController.java:82) at jdk.internal.reflect.GeneratedMethodAccessor8.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1072) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:965) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) at javax.servlet.http.HttpServlet.service(HttpServlet.java:529) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) at javax.servlet.http.HttpServlet.service(HttpServlet.java:623) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:209) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:168) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:481) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:390) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:928) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1794) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:829)
The error seems to suggest that the code failed while it was trying to fetch your context (current playlist, album, artist, etc) and I can't tell right away if that's a bug on my end or on Spotify's. Would you like to help me and say what context you were in while you were experiencing this bug?
Also, why do you restart your entire PC? Restarting the app should be enough.
Also, why do you restart your entire PC? Restarting the app should be enough.
That's the funny part, it doesn't. No clue why, but restarting Spotify, SpotifyBigPicture and clearing the cache in the browser does nothing. Just switching playlists fixes it sometimes.
It's hard for me to recreate the issue. What exactly do you mean by context? If you mean playlist, radio, podcast etc., it seems to happen either
- When I am playing a radio for too long. After a while it switches to "Playing recommended songs for you" and that seems to trigger it, but not always. Normally switching playlists fixes it, but that's not a guarantee either as state above.
- PC locks and waking it up after a few hours
- Waking the PC from hibernation
My go to is 1, since the others could just be coincidental since I listened on my phone so that it changed to the recommended songs when I come back.
On that note, radios are treated as a track - QUEUE with the cover from the last normal playlist / song
That's the funny part, it doesn't. No clue why, but restarting Spotify, SpotifyBigPicture and clearing the cache in the browser does nothing. Just switching playlists fixes it sometimes.
Okay, so if switching playlists at least SOMETIMES fixes it, I really believe it's a context fetch bug.
It's hard for me to recreate the issue. What exactly do you mean by context?
"Context" is the stuff in the top right where it shows the current playlist or album or whatever:
- When I am playing a radio for too long. After a while it switches to "Playing recommended songs for you" and that seems to trigger it, but not always. Normally switching playlists fixes it, but that's not a guarantee either as state above.
What are radios? Some new Spotify feature I wasn't aware of (or unavailable in my country)? I got a slight suspicion what really happened here is me simply knowing Radios existed, so it would naturally break stuff in the app that doesn't account for it... That would also explain why it suddenly works again as you switch to contexts again.
Okay so then the context is definitly not read/displayed correctly with radios.
You can access song / artist radios by right clicking on a song / artist and selecting the radio
The context should show RADIO instead of QUEUE and instead of TRACK the radio name
Example - wrong cover, invalid name and wrong classification:
All of this still doesn't explain the error messages :/ I will have to keep an eye on the next crash, to see if I can replicate it
So i just got it again: Radio which switched to recommended songs and I restarted my PC, so spotify loaded up with that radio / song recommendation overlap.
Is there any debug info I can give you?
Okay, so turns out, I was simply blind. We do have radios in our country, I just straight up never paid any attention to them and thus didn't add strict compatibility for SpotifyBigPicture. Oops. I will take care of finally patching that in properly after the new year has started. Thanks for bringing it to my attention!
As for the error message itself, that's just the resulting context read failing (since SBP doesn't know RADIO stuff even exists yet).
If you want to help me out with more info, one thing that would absolutely help is if you can tell me how consistently this problem is reproducable. Does it happen with every artist's radio or only a few?
Looking forward to it.
I found a way to reproduce it and a temp fix: Steps to reproduce:
- Open Spotify and start a radio (artist or song)
- Close Spotify and SpotifyBigPicture
- Optional: Clear browser cache
- Start SpotifyBigPicture
- Start Spotify and resume the radio, don't switch
Temp fix:
- Swtich to a regular playlist
- Switch back to radio
It seems it only has a problem with radios when starting up SpotifyBigPicture
Thanks! I'll let you know once I got news. Get well into the new year!
Just something to add, the queue is completly wrong and shifts randomly all the time when in the "playing recommended songs for you" mode
I have the same problem, but I do not run any radio on Spotify. I used to run this app successfully a few months ago but suddenly the player does not show any information. (The Play Previous, and Play Next buttons work while the stop button does not work). The problem is reproducible. Following is the message from the terminal
java -jar SpotifyBigPicture.jar
/ | _ __ ___ | |()/ | | __ )() __ | _ () | | _ _ _ __ ___
_ | ' \ / _ | | | || | | | _ | |/ ` | |) | |/ __| | | | | '/ _
) | |) | () | || | | || | |) | | (| | /| | (| || || | | | __/
|___/| ./ _/ _||| _, |/||_, || ||_|_|_,|| _|
|| |/ |___/
2024-12-31 10:33:42.086 INFO 2025 --- [ main] spotify.SpotifyBigPicture : Starting SpotifyBigPicture using Java 11.0.23 on MacBook-Pro-4.local with PID 2025 (/Users/changwookjung/Downloads/SpotifyBigPicture-v1.13.1/SpotifyBigPicture.jar started by changwookjung in /Users/changwookjung/Downloads/SpotifyBigPicture-v1.13.1)
2024-12-31 10:33:42.176 INFO 2025 --- [ main] spotify.SpotifyBigPicture : No active profile set, falling back to 1 default profile: "default"
2024-12-31 10:33:45.592 INFO 2025 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8183 (http)
2024-12-31 10:33:45.617 INFO 2025 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2024-12-31 10:33:45.617 INFO 2025 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.83]
2024-12-31 10:33:45.838 INFO 2025 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2024-12-31 10:33:45.838 INFO 2025 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 3490 ms
2024-12-31 10:33:46.924 INFO 2025 --- [ main] s.p.d.visual.color.ColorProviderService : 'colorfetch.url' not set in application.properties - using internal color fetch service
2024-12-31 10:33:46.949 INFO 2025 --- [ main] o.cache2k.core.Cache2kCoreProviderImpl : cache2k starting. version=2.6.1.Final
2024-12-31 10:33:48.052 INFO 2025 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8183 (http) with context path ''
2024-12-31 10:33:48.077 INFO 2025 --- [ main] spotify.SpotifyBigPicture : Started SpotifyBigPicture in 7.455 seconds (JVM running for 8.698)
2024-12-31 10:33:48.589 INFO 2025 --- [ main] s.playback.data.PlaybackInfoProvider : SpotifyBigPicture is ready! URL: http://localhost:8183
2024-12-31 10:34:01.823 INFO 2025 --- [nio-8183-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2024-12-31 10:34:01.824 INFO 2025 --- [nio-8183-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2024-12-31 10:34:01.829 INFO 2025 --- [nio-8183-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 5 ms
se.michaelthelin.spotify.exceptions.detailed.NotFoundException: Resource not found
at se.michaelthelin.spotify.SpotifyHttpManager.getResponseBody(SpotifyHttpManager.java:332)
at se.michaelthelin.spotify.SpotifyHttpManager.get(SpotifyHttpManager.java:166)
at se.michaelthelin.spotify.requests.AbstractRequest.getJson(AbstractRequest.java:110)
at se.michaelthelin.spotify.requests.data.playlists.GetPlaylistRequest.execute(GetPlaylistRequest.java:38)
at se.michaelthelin.spotify.requests.data.playlists.GetPlaylistRequest.execute(GetPlaylistRequest.java:15)
at spotify.api.SpotifyCall.execute(SpotifyCall.java:57)
at spotify.playback.data.visual.ContextProvider.getPlaylistContext(ContextProvider.java:192)
at spotify.playback.data.visual.ContextProvider.findContextName(ContextProvider.java:85)
at spotify.playback.data.PlaybackInfoProvider.buildBaseInfo(PlaybackInfoProvider.java:242)
at spotify.playback.data.PlaybackInfoProvider.buildInfoTrack(PlaybackInfoProvider.java:382)
at spotify.playback.data.PlaybackInfoProvider.getCurrentPlaybackInfo(PlaybackInfoProvider.java:155)
at spotify.playback.PlaybackController.getCurrentPlaybackInfo(PlaybackController.java:82)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1072)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:965)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:529)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:623)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:209)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:168)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:481)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:390)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:928)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1794)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:829)
se.michaelthelin.spotify.exceptions.detailed.NotFoundException: Resource not found
at spotify.api.SpotifyCall.execute(SpotifyCall.java:80)
at spotify.playback.data.visual.ContextProvider.getPlaylistContext(ContextProvider.java:192)
at spotify.playback.data.visual.ContextProvider.findContextName(ContextProvider.java:85)
at spotify.playback.data.PlaybackInfoProvider.buildBaseInfo(PlaybackInfoProvider.java:242)
at spotify.playback.data.PlaybackInfoProvider.buildInfoTrack(PlaybackInfoProvider.java:382)
at spotify.playback.data.PlaybackInfoProvider.getCurrentPlaybackInfo(PlaybackInfoProvider.java:155)
at spotify.playback.PlaybackController.getCurrentPlaybackInfo(PlaybackController.java:82)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1072)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:965)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:529)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:623)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:209)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:168)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:481)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:390)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:928)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1794)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:829)
se.michaelthelin.spotify.exceptions.detailed.NotFoundException: Resource not found
at se.michaelthelin.spotify.SpotifyHttpManager.getResponseBody(SpotifyHttpManager.java:332)
at se.michaelthelin.spotify.SpotifyHttpManager.get(SpotifyHttpManager.java:166)
at se.michaelthelin.spotify.requests.AbstractRequest.getJson(AbstractRequest.java:110)
at se.michaelthelin.spotify.requests.data.playlists.GetPlaylistRequest.execute(GetPlaylistRequest.java:38)
at se.michaelthelin.spotify.requests.data.playlists.GetPlaylistRequest.execute(GetPlaylistRequest.java:15)
at spotify.api.SpotifyCall.execute(SpotifyCall.java:57)
at spotify.playback.data.visual.ContextProvider.getPlaylistContext(ContextProvider.java:192)
at spotify.playback.data.visual.ContextProvider.findContextName(ContextProvider.java:85)
at spotify.playback.data.PlaybackInfoProvider.buildBaseInfo(PlaybackInfoProvider.java:242)
at spotify.playback.data.PlaybackInfoProvider.buildInfoTrack(PlaybackInfoProvider.java:382)
at spotify.playback.data.PlaybackInfoProvider.getCurrentPlaybackInfo(PlaybackInfoProvider.java:155)
at spotify.playback.PlaybackController.getCurrentPlaybackInfo(PlaybackController.java:82)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1072)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:965)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:529)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:623)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:209)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:168)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:481)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:390)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:928)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1794)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:829)
se.michaelthelin.spotify.exceptions.detailed.NotFoundException: Resource not found
at spotify.api.SpotifyCall.execute(SpotifyCall.java:80)
at spotify.playback.data.visual.ContextProvider.getPlaylistContext(ContextProvider.java:192)
at spotify.playback.data.visual.ContextProvider.findContextName(ContextProvider.java:85)
at spotify.playback.data.PlaybackInfoProvider.buildBaseInfo(PlaybackInfoProvider.java:242)
at spotify.playback.data.PlaybackInfoProvider.buildInfoTrack(PlaybackInfoProvider.java:382)
at spotify.playback.data.PlaybackInfoProvider.getCurrentPlaybackInfo(PlaybackInfoProvider.java:155)
at spotify.playback.PlaybackController.getCurrentPlaybackInfo(PlaybackController.java:82)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1072)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:965)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:529)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:623)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:209)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:168)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:481)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:390)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:928)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1794)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:829)
Oh boy... Now I can't help but feel like Spotify messed with their API over the last couple months again. They like to do that and it wouldn't even be the first time it mysteriously broke the app after running smooth for months on end.
Thanks for the confirmation! I'll investigate this more closely in the coming days.
Hey, so a few updates. The good news, I'll roll out an update in a bit that should make stuff all-around more robust. Radios and autoplay no longer cause the app to display nothing. The bad news... it's still not perfect and it likely won't be for the forseeable future, due to API limitations.
Just something to add, the queue is completly wrong and shifts randomly all the time when in the "playing recommended songs for you" mode
And this is the reason why I'm struggling so much. I don't know what exactly is causing this problem, but for some reason, if you're in the autoplay part of a radio, the queue API endpoint returns a list of songs that only very vaguely resembles what's actually in the queue. Like, I'm not modifying any data here, Spotify is straight up returning bogus data from the source. And to make matters worse, it also seems to randomize on every single API call, resulting in the playlist disco you likely saw as well.
It's a mess. I was hoping to get a clean integration of the autoplay, but there's no special distinction for that (from the API's perspective, autoplay mode is indistinguishable from a regular playlist).
That's good news.
I just took a look at the api myself and it's fcking crazy that the queue is really shifting. 2 thoughts regarding that:
- In the Spoitfy App the queue is fine, so one could take a look what spotify uses themselves. (I think the Spotify App is React based or just use the browser)
- The only difference I found between Radio and the recommended tracks is at the bottom of the /me/player endpoint.
In theory a wack workaround be to disable the queue if playing recommended tracks.
In theory a wack workaround be to disable the queue if playing recommended tracks.
Oh I actually thought about that trick with the disallowed context options, but ngl that's putting a really ugly bandaid on a really ugly problem that shouldn't exist from Spotify's side in the first place. So I won't do any patches there, and instead hope they'll get this sorted out eventually.
Published the update. Please let me know how it goes!
Starting with radio or recomended songs stills shows the same error, but now (or maybe I just never tested it) the discovery weekly playlist throws the same error.
Context is not updating with these when using the normal playlist workaround.
What? I tried it with a dozen different radio stations, I never got the error again. Please tell me, in detail, what you did, including the artist and song.
Okay, here is the radio link: https://open.spotify.com/playlist/37i9dQZF1E8PT4CQ3MbBPA?si=210d0aa514684b91
- Start the radio
- Close Spotify and SpotifyBigPictures
- Start SpotifyBigPictures
- Start Spotify & resume radio
Yup, all good here. I don't get it.
Are you sure you added the files to the newest release?
It shows an old modified date
I also checked the Spotify Web Player. I found the call where they get their queue, but sadly it seems their CORS settings prohibits outside api calls.
I reuploaded the release, try again.
I also checked the Spotify Web Player. I found the call where they get their queue, but sadly it seems their CORS settings prohibits outside api calls.
Okay, so an important concept you need to understand: Intercepting Spotify's OWN calls is strictly against the terms of service. All we can do is figure out how to make the best software possible using the limited stuff the official Spotify API gives us.
It sucks a lot, but those are the rules and I won't risk violating the TOS just because it's more convenient.
I reuploaded the release, try again.
Nope, same problem. The modified date is still the same. Guess, I have to try to compile it later myself.
Nope, same problem. The modified date is still the same. Guess, I have to try to compile it later myself.
You're gaslighting me now.
Directly downloaded three times. Date is correct.
https://streamable.com/s11gtj
I am dead xD
Just checked that's not a winrar thing, windows explorer and Onecommander shows the same
I'm about to cover my face in a pillow and scream as loud as I can. If this still shows you a 2023 date I will make it a reality.
Hey, that worked, but it still isn't showing the radio 😅 I will probably just take the source and see if I can debug it
What really annoys me is that this is yet another goddamn "but it works on my machine" situation. Those are always a pain in the arse...
Anyway, sure, feel free to investigate this yourself. And if you do find the solution, feel free to do a PR. I already invested a day in troubleshooting this mess, I frankly don't have much energy left...
Seeing how this got no more responses, I'm going to close the issue.