Skip to content

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

@akshays2112

Description

@akshays2112

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions