Skip to content

System.NullReferenceException @ GetStatus() #134

Closed

Description

@M4sterZer0

Hi,
I get a System.NullReferenceException if I call the GetStatus() function.
IScreen

Activity

  1. jipjan commented on Mar 9, 2017

    @jipjan

    Do you make sure spotify is running and connected before requesting the status?

    You can do this with if (Spotify.Connect()) { }

  2. JohnnyCrazy commented on Mar 9, 2017

    @JohnnyCrazy
    Owner

    Mh, I can confirm something isn't working correctly ATM, it seems like spotify changed something with OAuth tokens, gonna need some time to find out what tho.

    And btw, your status is null because it wasn't assigned yet, put a breakpoint after the GetStatus()

  3. M4sterZer0 commented on Mar 9, 2017

    @M4sterZer0
    Author

    @jipjan Yes, I check it before I call the function.
    Let's wait for a API fix. :)

  4. jipjan commented on Mar 9, 2017

    @jipjan

    But what is wrong with the OAuth? I'm using the API at this very moment and don't have any issues..

  5. M4sterZer0 commented on Mar 9, 2017

    @M4sterZer0
    Author

    Do you have updated your Spotify (client)?

  6. JohnnyCrazy commented on Mar 9, 2017

    @JohnnyCrazy
    Owner

    Can you guys please test the following endpoint: https://open.spotify.com/token
    Do you receive a string with "faketoken" at the end? It seems it delivers fake tokens currently (at least for me)

  7. jipjan commented on Mar 9, 2017

    @jipjan

    Don't know, my version is 1.0.50.41368.gbd68dbef

  8. JohnnyCrazy commented on Mar 9, 2017

    @JohnnyCrazy
    Owner

    And please test it within the API and with a browser. You can put a breakpoint in the RemoteHandler.cs constructor

  9. jipjan commented on Mar 9, 2017

    @jipjan

    nope, it's working, got: {"t":"NAowChgKB1Nwb3RpZnkSABoGmAEByAEBJfgbwlgSFM7t94j8ebJU4H0kGoaT_uEbk_O-"}

  10. M4sterZer0 commented on Mar 9, 2017

    @M4sterZer0
    Author

    @jipjan I've the same version. hm.
    @JohnnyCrazy No, I get this result:

    {"t":"NAowChgKB1Nw*************xO5DUWTM7kG"}

  11. JohnnyCrazy commented on Mar 9, 2017

    @JohnnyCrazy
    Owner

    Are those values gathered by the C# API client? Maybe just an issue on my side...

  12. jipjan commented on Mar 9, 2017

    @jipjan

    I'm using the compiled .dll in my project atm, so it's kinda hard for me to test this. As far as I can see everything is working fine in my solution.

  13. M4sterZer0 commented on Mar 9, 2017

    @M4sterZer0
    Author

    So, I've created a new console application and installed this api with nuget.

    Result:
    Screenshot

  14. xcrow commented on Mar 9, 2017

    @xcrow

    Adding a "user-agent" Header in GetOAuthKey() method's WebClient worked for me.
    Now it is returning token without the "faketoken" string attached at the end.

  15. henningms commented on Mar 9, 2017

    @henningms

    Can confirm. Adding a User-Agent header in the GetOAuthKey will do the trick to get the local api working again.

  16. added a commit that references this issue on Mar 9, 2017
  17. added a commit that references this issue on Mar 9, 2017
  18. JohnnyCrazy commented on Mar 9, 2017

    @JohnnyCrazy
    Owner

    Will be published as a Hotfix in 2.13.1 within the next hours

  19. ryandel13 commented on Aug 7, 2018

    @ryandel13

    Hello, Maybe this issue is open again.
    From the endpoint "https://open.spotify.com/token" I only get a token with "faketoken" at the end. I already tried to update the User-Agent to "Spotify (1.0.86.337.ga8d5cef9)".

    Any Ideas? Struggling with this issue since a couple of days...

  20. JohnnyCrazy commented on Aug 8, 2018

    @JohnnyCrazy
    Owner

    A simple search would help in a lot of times... #254

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions