Fabrizz / MMM-OnSpotify

Highly customizable MM2 module that displays what you are listening to in Spotify. Compatible with MMM-LiveLyrics and DynamicTheming.
MIT License
65 stars 10 forks source link

Module breaks after a while #71

Open simphide opened 5 months ago

simphide commented 5 months ago

Since the update the Module sometimes randomly breaks and is stuck on "Connecting to Spotify...".

Is there a problem with the access token renewal?

Here are the logs for the module:

magicmirror  | 2024-05-15T20:12:05.005924894Z [2024-05-15 22:12:05.005] [LOG]   [MMM-OnSpotify] Access token expiration 🗝  >>  22:12:02
magicmirror  | 2024-05-15T21:12:06.994279880Z [2024-05-15 23:12:06.993] [LOG]   [MMM-OnSpotify] Access token expiration 🗝  >>  23:12:04
magicmirror  | 2024-05-15T22:12:07.065876210Z [2024-05-16 00:12:07.065] [LOG]   [MMM-OnSpotify] Access token expiration 🗝  >>  24:12:06
magicmirror  | 2024-05-15T23:12:08.991088644Z [2024-05-16 01:12:08.990] [LOG]   [MMM-OnSpotify] Access token expiration 🗝  >>  01:12:06
magicmirror  | 2024-05-16T00:12:08.984004457Z [2024-05-16 02:12:08.983] [LOG]   [MMM-OnSpotify] Access token expiration 🗝  >>  02:12:08
magicmirror  | 2024-05-16T01:12:11.015346601Z [2024-05-16 03:12:11.015] [LOG]   [MMM-OnSpotify] Access token expiration 🗝  >>  03:12:08
Fabrizz commented 5 months ago

Is experimentalCanvas enabled?

simphide commented 5 months ago

No, that is the config


        {
            module: "MMM-OnSpotify",
            position: "bottom_right", /* bottom_left, bottom_center */
            config: {
                clientID: "x",
                clientSecret: "x",
                accessToken: "x",
                refreshToken: "x-x-x-x-x-x-x"
                /* Add here your theming and behaviour configurations */
            }
        },
Fabrizz commented 5 months ago

That is strange, I guess that your MM2 installation is relatively new, so that is a non issue. Is it a base install in a raspberrypi or is it just the server MM2? Any logs from the browser that displays MM2?

simphide commented 5 months ago

It is just the MM2 server - no logs beside the undocumented API call warning

simphide commented 5 months ago

I had exactly the same issue this night again

magicmirror  | 2024-05-16T20:41:11.894558622Z [2024-05-16 22:41:11.894] [LOG]   [MMM-OnSpotify] Access token expiration 🗝  >>  22:41:11
magicmirror  | 2024-05-16T21:41:13.837900014Z [2024-05-16 23:41:13.837] [LOG]   [MMM-OnSpotify] Access token expiration 🗝  >>  23:41:11
magicmirror  | 2024-05-16T22:41:13.838838088Z [2024-05-17 00:41:13.838] [LOG]   [MMM-OnSpotify] Access token expiration 🗝  >>  24:41:13
magicmirror  | 2024-05-16T23:41:13.838048249Z [2024-05-17 01:41:13.837] [LOG]   [MMM-OnSpotify] Access token expiration 🗝  >>  01:41:13
magicmirror  | 2024-05-17T00:41:15.842643091Z [2024-05-17 02:41:15.842] [LOG]   [MMM-OnSpotify] Access token expiration 🗝  >>  02:41:13
magicmirror  | 2024-05-17T01:41:15.907691563Z [2024-05-17 03:41:15.907] [LOG]   [MMM-OnSpotify] Access token expiration 🗝  >>  03:41:15
simphide commented 5 months ago

When I go back to version 4 it works