Spotcast fails with 'serverTime' error

@Tomm206
Here’s a quick chatGPT search I did for how to force an update - use it at your own risk, and I would definitely take a system backup first before doing anything. I would read through it completely BEFORE attempting any of the upgrade options. The Step 4 — Check Supervisor connectivity might be a good thing to check first.

chatGPT results

Updating Home Assistant Core is very straightforward, even when the UI doesn’t show the new version after 2025.7.1.

Below is the exact process that works reliably on HAOS.


:white_check_mark: How to Update Home Assistant Core on HAOS (when no update notification appears)

Step 1 — Try the normal update command

Open Terminal & SSH (or the physical console) and run:

ha core update

This forces the Supervisor to update Core even if the UI didn’t show it.

If you want to target a specific version:

ha core update --version 2025.9.4

:white_check_mark: Step 2 — If “no update available” appears incorrectly

This is common after 2025.7.1.
Run:

ha supervisor repair
ha supervisor refresh

Then:

ha core update

If still nothing, reboot the host (not just HA):

ha host reboot

:white_check_mark: Step 3 — Check for skipped updates

In the UI:

Settings → System → Updates → (⋮ menu) → Show skipped updates

Sometimes HAOS hides an update if it was dismissed earlier.


:white_check_mark: Step 4 — Check Supervisor connectivity

Go to Settings → System → Repairs → System information.

If you see:

supervisor_connectivity: false

then HA cannot check for new versions.

Fix it by correcting DNS:

Settings → System → Network → IPv4/IPv6 DNS → set manually:

  • 1.1.1.1
  • 8.8.8.8

Then:

ha supervisor repair
ha host reboot

Now try:

ha core update

:warning: Step 5 — Update the OS first (important)

If your HAOS version is more than 4 releases behind, Supervisor will NOT offer Core updates until OS is updated.

Check:

Settings → System → Updates → Operating System

If there is an OS update waiting, install it first.

Then Core updates will appear again.


:star: Summary (Typical Fix for 2025.7.1 → latest)

The sequence that works for most people:

ha supervisor repair
ha supervisor refresh
ha host reboot
ha core update

You were right that my Home Assistant Core was not updated. The “supervisor_connectivity” was really false. I didn’t recognise that.
So I tried to find out how to easily solve it. It was quite easy - just “Reboot the system” using the red button in Advanced Options in Restart Home Assistant options (Advanced Mode must be switched on).
So I did the upgrade and successfully installed the Spotify Plus integration. Then I created the following script where I tried to play a Spotify playlist on my Chromecast Audio device.

action: spotifyplus.player_media_play_context
metadata: {}
data:
  entity_id: media_player.spotifyplus_tom
  context_uri: spotify:playlist:19PgP2QSGPcm6Ve8VhbtpG
  device_id: Garáž Audio

Then I received this message:

Spotify Cast Application could not be activated on Chromecast device "xxxxxxxxx": Spotify Desktop Player authorization token was not found in the token cache file.

I don’t know what I am doing wrong. I tried to study your documentation but I am lost. Could you please advise me. Sorry, I am not such an advanced user. Thank you.

@Tomm206
There is an extra configuration step for Google and Sonos devices. Check out this wiki document for instructions on how to configure it.

I finally made it. Thank you for your help and also for this great integration development.

1 Like

Could you please help me with adding a second account to the Spotify Plus integration? The original one worked without any issues.

I followed the instructions. I ran the script using the command: python AuthTokenGenerator.py. Then I logged into the second account and completed the process (at the end there was a message saying the process was completed successfully). I checked the file spotifyplus_tokens.json and there really was an additional token added.

However, I was then unable to add the new user to the Spotify Plus integration. So I went to developer.spotify.com/dashboard and added the email address of the second account in User Management. That worked, and I can now see two users in the integration. I can see, for example, favorite playlists, etc. However, when I try to play something, I get this error:

Validation error: Spotify Cast Application could not be activated on Chromecast device ".........": Spotify Desktop Player authorization token was not found in the token cache file.

Of course, the first account doesn’t work anymore either.

I then tried to run the script again, but the login window doesn’t open and I get this error:

** Exception: SAM1001E - Spotify Web API returned an error status while processing the "SetAuthTokenAuthorizationCodePKCE" method. Status: 429 - Too Many Requests Message: "{ "error": { "status": 429, "message": "API rate limit exceeded" } }"

Please advise how to resolve this. I backed up the original spotifyplus_tokens.json.

1 Like

@Tomm206
Check out this Discussion Forum post for the solution, or this Community Thread as well.

Also, I don’t know if just adding the second account as a user in the Spotify Dev App will work long term. I believe you might run into conflicts when using both accounts at the same time. I believe the proper way to do that would be to create a 2nd Spotify Developer App (with its own client id and secret) and define a new HA App Credential for the second account. The problem there is that Spotify has disabled creating new Dev Apps. But give it a try and let me know how it goes.

Thanks for the links. I’ll try downloading the updated library so the script runs correctly. What’s strange is that yesterday it worked on the first try for the new account without any issues. The 429 error only started happening when I tried to obtain the tokens for the second time.

I still have a few questions before I start.

  1. First, I need to restore the original account that was working. What should I do with the spotifyplus_tokens.json file? Should I delete/clear it somehow, or leave it as it is? It contains two tokens (for the original and the new account). I understood that additional accounts are added below the existing ones, but I need to restore the original one.
  2. When the new account didn’t work, I put the original file back into /homeassistant/.storage. But the original account still doesn’t work. I don’t understand that. I even found out that Home Assistant modifies this file.
    I’m getting this error:
    Validation error: Spotify Cast Application could not be activated on Chromecast device “xxxxxxxx”: (invalid_grant) Refresh token revoked**

You’re right that Spotify doesn’t allow creating new Dev Apps. Who knows when it will be possible again. If it was possible, I would also create one for the new account.

  1. Do I then need to add this new account to the Spotify integration as well (using the client ID and secret)?
  2. Should I first remove the new account from the Spotify Plus integration and link it again (after generating a new token)?
  3. Should I first remove the connection between the original account and the new account’s email address (in User Management on developer.spotify.com), or will it not matter?

Sorry for the many questions — I’m not very experienced with this topic.
Thank you.

@Tomm206
The issue is that you configured the environment to share the same authorization token between 2 different instances (services) of the integration. This is a problem, as the first instance that utilizes the token that needs to be refreshed will work; once the token has been refreshed, the old token (and refresh token) is no longer valid and will result in the “token revoked” error. That’s why I think adding the user email to the “User Management” will not work for this scenario (they both share the same token).

Answers to your questions …

  1. You can’t put the original spotifyplus_tokens.json file back, as it contains older tokens that have been refreshed (or revoked). I would delete the spotifyplus_tokens.json file in the tokengen location, and rerun the AuthTokenGenerator.py script for both user accounts. You can then copy the spotifyplus_tokens.json file to the HA /config/.storage/ location. Make sure you update the AuthTokenGenerator.py and the spotifywebapipython library as instructed in the discussion forum thread first.

  2. HA does modify the spotifyplus_tokens.json file (in the HA /config/.storage/ location) when a token is refreshed or revoked. That is normal behavior. Functionality should be restored by replacing the spotifyplus_tokens.json file via step 1 above.

In order to anser questions 3,4,5, I need to know how you added the second SpotifyPlus service instance to HA, as well as how the accounts are configured. Do the following:

  1. Execute the following action (via Developer Tools \ Actions), which will tell me what HA Application Credentials are being used for which account. Feel free to redact suffixes for logon id’s and client id’s, though leave a small prefix for each so that I can differenctiate between them.
action: spotifyplus.list_application_credential_mappings
data: {}

This will produce output like the following:

result: |
  **Domain: spotifyplus**
    Application Credentials:
      - ID: `spotifyplus_eab07793bcxxxxxx `, Client ID: `eab07793bcxxxxxx `, Name: `Todd L Premium`
        - Entity ID: `media_player.spotifyplus_todd_l`, Name: `SpotifyPlus Todd L`, Unique ID: `31l77y2xxxxxx _spotifyplus`
      - ID: `spotifyplus_fd8d567505xxxxxx `, Client ID: `fd8d567505xxxxxx `, Name: `Todd L Free`
        - Entity ID: `media_player.spotifyplus_todd_l_free`, Name: `SpotifyPlus Todd L Free`, Unique ID: `31dutb2cjxxxxxxx_spotifyplus`
  1. Go to the Settings \ Devices & Services \ SpotifyPlus screen and take a screen capture of what you see there. This will tell me what SpotifyPlus services / accounts you have configured. It should look something like this:

Thank you for your support. I really appreciate it.
Here is the result:

result: |
  **Domain: spotify**
    Application Credentials:
      - ID: `spotify_0b58a575xxxxxxxx`, Client ID: `0b58a575xxxxxxx`, Name: `Spotify`
        - Entity ID: `media_player.spotify_tom`, Name: `Spotify TOM`, Unique ID: `2edjewxxxxxx`

  **Domain: spotifyplus**
    Application Credentials:
      - ID: `spotifyplus_0b58a575xxxxxxxxx`, Client ID: `0b58a575xxxxxxx`, Name: `Spotify Plus`
        - Entity ID: `media_player.spotifyplus_tom`, Name: `SpotifyPlus TOM`, Unique ID: `2edjewxxxxxx_spotifyplus`
        - Entity ID: `media_player.spotifyplus_eliskajiraskova`, Name: `SpotifyPlus EliskaJiraskova`, Unique ID: `eodvg02xxxxxxx_spotifyplus`

1 Like

@Tomm206
Ya, I think the issue here is that you are sharing the same HA Application Credentials between both SpotifyPlus services. It appears you are sharing the same credentials with the HA Spotify integration as well.

I would suggest the following:

  1. remove (or disable) the HA Spotify integration service.
  2. remove (or disable) one of the SpotifyPlus integration services.

When (if?!) Spotify opens up their Developer App process again, create a new App for the disabled SpotifyPlus integration service, as well as a new App for the HA Spotify integration service. You can then create new HA Application Credentials for the new Dev Apps, and add them back into HA.