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 call service spotcast/start (400 Client Error)

See original GitHub issue

Hi,

I’m unable to call the spotcast.start service on Home Assistant 0.99.3 docker image and spotcast 2.2 (installed via HACS 0.14.2) due to the following error Failed to call service spotcast/start. 400 Client Error: Bad Request for url: https://accounts.spotify.com/api/login

The service parameters I tried:

{
  "entity_id": "media_player.chromecast",
  "uri": "spotify:playlist:37i9dQZF1DWXRqgorJj26U"
}

Previously I had no issue setting up the Spotify media player component (https://www.home-assistant.io/components/spotify/) and can control the playback on my chromecast source. Googling around show this past issue that has been resolved https://github.com/balloob/pychromecast/issues/264.

Please find the following error log upon the spotcast.start service:


2019-09-26 19:11:52 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1852038640] 400 Client Error: Bad Request for url: https://accounts.spotify.com/api/login,
Traceback (most recent call last):,
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 130, in handle_call_service,
  File "/usr/src/homeassistant/homeassistant/core.py", line 1234, in async_call,
    await asyncio.shield(self._execute_service(handler, service_call)),
  File "/usr/src/homeassistant/homeassistant/core.py", line 1261, in _execute_service,
    await self._hass.async_add_executor_job(handler.func, service_call),
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run,
  File "/config/custom_components/spotcast/__init__.py", line 162, in start_casting,
    access_token, expires = get_spotify_token(username=user, password=pwd),
    data = st.start_session(username, password),
  File "/usr/local/lib/python3.7/site-packages/spotify_token.py", line 69, in start_session,
    _login(session, cookies, username, password, token),
  File "/usr/local/lib/python3.7/site-packages/spotify_token.py", line 31, in _login,
    response.raise_for_status(),
    raise HTTPError(http_error_msg, response=self),
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://accounts.spotify.com/api/login

Cheers

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
6arcaxavicommented, May 2, 2020

Hey everyone! Just leaving a note that you may find more info here:

0reactions
oederp1commented, May 2, 2020

I have the same problem too. Always i get this error.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spotcast - Custom Integrations - Home Assistant Community
HTTPError: 400 Client Error: Bad Request for url: ... to select a Chromecast device I got the error “Failed to call service spotcast/start....
Read more >
spotcast - Bountysource
Calling service spotcast.start on an echo device after being idle for a few hours will drop an error. Immediately after a few seconds...
Read more >
Open source Python3 home automation - deel 3
[supervisor.docker] Can't start hassio_observer: 500 Server Error: Internal Server Error ("driver failed programming external connectivity ...
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