Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If there is no current track playing it errors out. #45

Open
akshays2112 opened this issue Oct 15, 2020 · 0 comments
Open

If there is no current track playing it errors out. #45

akshays2112 opened this issue Oct 15, 2020 · 0 comments

Comments

@akshays2112
Copy link
Contributor

akshays2112 commented Oct 15, 2020

Exit out of Spotify on all mediums, so there is nothing currently playing in Spotify.

Run the test case:
GetCurrentlyPlayingTrack_UserAccessToken_NotNull

Error Message:
GetCurrentlyPlayingTrack_UserAccessToken_NotNull
Source: PlayerApiTests.cs line 301
Duration: 564 ms

Message:
Test method SpotifyApi.NetCore.Tests.PlayerApiTests.GetCurrentlyPlayingTrack_UserAccessToken_NotNull threw exception:
System.InvalidOperationException: Failed to deserialize response as JSON. Response =
Stack Trace:
SpotifyWebApi.GetJObject(Uri uri, String accessToken) line 141
PlayerApi.GetCurrentlyPlayingTrack(String market, String[] additionalTypes, String accessToken) line 716
PlayerApiTests.GetCurrentlyPlayingTrack_UserAccessToken_NotNull() line 309

Open additional output for this result.

Note:
Of course, if a track is playing, even in pause mode, it works just fine.

Similarly, if no current song playing or paused these test cases also fail:

  • GetCurrentPlaybackInfo_AccessToken_ResultIsNotNull
  • Pause_UserAccessToken_NoException

There are more errors, but I will stop until @DanielLarsenNZ can confirm that these are real problems and not a configuration problem. I double-checked access_token and all types of permissions, as usual, were checked before using the generated token using the Spotify API docs Try It interface.

Upon further testing, all tests pass if Spotify Client is open. Up to you @DanielLarsenNZ to decide if you want to consider these bugs and check for these possible states of Spotify that cause these errors. I am happy to work on them for you as I know you are super busy but would need your go ahead. Meantime will start working on the next API endpoint I left off at.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant