skuethe / MMM-Spotify

Spotify display and controller for MagicMirror
MIT License
68 stars 17 forks source link

Spotify error messages in the log #197

Closed Egnos87 closed 1 year ago

Egnos87 commented 1 year ago

SETUP: RPI 4 4GB O.S. Buster MM version "2.23.0" MMM-Spotify latest version

CONFIG

{
          module: "MMM-Spotify",
          position: "top_right", // "bottom_bar" or "top_bar" for miniBar
          config: {
            debug: false, // debug mode
            style: "default", // "default" or "mini" available (inactive for miniBar)
            moduleWidth: 280, // width of the module in px
            control: "hidden", // "default" or "hidden"
            showAlbumLabel: true, // if you want to show the label for the current song album
            showVolumeLabel: true, // if you want to show the label for the current volume
            showAccountName: false, // also show the current account name in the device label; usefull for multi account setup
            showAccountButton: false, // if you want to show the "switch account" control button
            showDeviceButton: false, // if you want to show the "switch device" control button
            useExternalModal: false, // if you want to use MMM-Modal for account and device popup selection instead of the build-in one (which is restricted to the album image size)
            updateInterval: 1000, // update interval when playing
            idleInterval: 30000, // update interval on idle
            defaultAccount: 0, // default account number, attention : 0 is the first account
            defaultDevice: null, // optional - if you want the "SPOTIFY_PLAY" notification to also work from "idle" status, you have to define your default device here (by name)
            allowDevices: [], //If you want to limit devices to display info, use this. f.e. allowDevices: ["RASPOTIFY", "My Home speaker"],
            onStart: null, // disable onStart feature with `null`

          }
        },

ISSUE: Sometimes this error appears in the "MagicMirror-error.log" in the "/home/pi/.pm2/logs" directory:

[13.10.2023 18:10.04.927] [ERROR] [SPOTIFY - Daniele] Failed to request API: /v1/me/player
[13.10.2023 18:10.04.935] [ERROR] [SPOTIFY - Daniele] Invalid response
[13.10.2023 18:10.04.936] [ERROR] [SPOTIFY - Daniele] Response error code: 503
[13.10.2023 18:10.04.937] [ERROR] [SPOTIFY - Daniele] Response error text: Service Unavailable

Could you fix this problem? Can I help you with some tests?

Thanks.

skuethe commented 1 year ago

I am not sure if I can help here. You received a 503 response from Spotify API.

https://developer.spotify.com/documentation/web-api/concepts/api-calls

503 Service Unavailable - The server is currently unable to handle the request due to a temporary condition which will be alleviated after some delay. You can choose to resend the request again.

skuethe commented 1 year ago

Maybe I have misread your issue. You wrote that you "sometimes" receive this error. Does this mean it works but just sometimes it does not? If that is the case, there is, as mentioned, not much I can do. The return code is from Spotify itself. Weird if this happens a lot, as usually there are no issues with spotify API availability.

Egnos87 commented 1 year ago

I am not sure if I can help here. You received a 503 response from Spotify API.

https://developer.spotify.com/documentation/web-api/concepts/api-calls

503 Service Unavailable - The server is currently unable to handle the request due to a temporary condition which will be alleviated after some delay. You can choose to resend the request again.

  • Did you retry this already?
  • Do you have Spotify premium?

The module seems work properly, but sometimes in the LOG I found these errors. No, I didn't have Spotify Premium.

Maybe I have misread your issue. You wrote that you "sometimes" receive this error. Does this mean it works but just sometimes it does not? If that is the case, there is, as mentioned, not much I can do. The return code is from Spotify itself. Weird if this happens a lot, as usually there are no issues with spotify API availability.

Exactly, only sometimes. It seems that these errors do not affect the functioning of the module.

Have you ever found these types of errors in your LOG file?

Thanks

skuethe commented 1 year ago

No, I didn't have Spotify Premium.

Please have a look at:
https://github.com/skuethe/MMM-Spotify#restrictions

You need to have Spotify Premium for this to work correct. Sorry.

I will close the issue for now.