question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to get device id from spotify

See original GitHub issue

Hi all, many thanks to @fondberg for the great component. So I was able to manage the requirement that my kids are able to ask our google home minis to play a random album. They are using it since months in during the covid pandemic…

Since yesterday evening the spotcast component can’t start any playback. I already restarted my home assistant instance and inserted new values for sp_dc and sp_key to be sure that the token is valid. No updates are made since last week.

Spotcast is build up a connection to my Google Home (I can hear the “bling”) but then I got the message “Failed to get device id from spotify”.

2021-03-23 08:08:53 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [1860452328] Failed to get device id from Spotify
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 141, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1488, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1523, in _execute_service
await handler.job.target(service_call)
File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 218, in service_handler
await script_entity.async_turn_on(
File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 323, in async_turn_on
await coro
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1041, in async_run
await asyncio.shield(run.async_run())
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 254, in async_run
await self._async_step(log_exceptions=False)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 262, in _async_step
await getattr(
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 466, in _async_call_service_step
await self._async_run_long_action(service_task)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 428, in _async_run_long_action
long_task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1488, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1523, in _execute_service
await handler.job.target(service_call)
File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 218, in service_handler
await script_entity.async_turn_on(
File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 323, in async_turn_on
await coro
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1041, in async_run
await asyncio.shield(run.async_run())
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 254, in async_run
await self._async_step(log_exceptions=False)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 262, in _async_step
await getattr(
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 463, in _async_call_service_step
await service_task
File "/usr/src/homeassistant/homeassistant/core.py", line 1488, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1527, in _execute_service
await self._hass.async_add_executor_job(handler.job.target, service_call)
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/spotcast/__init__.py", line 296, in start_casting
spotify_device_id = spotify_cast_device.getSpotifyDeviceId(client)
File "/config/custom_components/spotcast/__init__.py", line 478, in getSpotifyDeviceId
raise HomeAssistantError("Failed to get device id from Spotify")
homeassistant.exceptions.HomeAssistantError: Failed to get device id from Spotify

Playback using open.spotify.com or the app is working without any issue on the chromecast devices.

Any hints?

Thanks, Kai

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:29
  • Comments:51 (14 by maintainers)

github_iconTop GitHub Comments

26reactions
fondbergcommented, Apr 4, 2021

Hello everybody.

Open source is great and free which in the case of just one person going the work (me) can lead to situations where during periods of sick leave or pressing matters elsewhere (work) thiings piles up.

I would urge you to put efforts into trying to help out by fixing things through pull requests rather than say something is broken several times and come up with arbitrary non version controlled patches.

I too noticed this is broken and if no one chips in i will try and fix it when i have time

19reactions
provinziocommented, Mar 24, 2021

Why does everyone on github feel the urge to spam. Just click on the notification bell if you want to be alerted or say something useful…

Please don’t respond to this, I know it’s spam, too, but I would like to save my postbox from more of this “Same”.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spotcast - custom component to start playback on an idle ...
Personally I've never bothered with the spotify device id, using the device name ... I keep getting 'Failed to call service spotcast.start.
Read more >
Cannot Transfer Playback - Descriptor ID?
I'm able to create the player, successfully connect to Spotify, and get a device ID. I can see it as expected when I...
Read more >
Spotify Not Working? Try These 7 Fail-Safe Solutions
For Spotify for desktop users, the device firewall can be an unexpected source of problems. A firewall refers to a built-in network security ......
Read more >
Frequently Asked Questions About Using Spotify With Your ...
Garmin Support Center is where you will find answers to frequently asked questions ... The Spotify Connect IQ App allows you to sync...
Read more >
6 Fixes When Spotify App Is Not Responding or Won't Open
1. Restart Your Device. A restart resolves any software glitches that may cause the Spotify app not to respond when you try to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found