Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ohLibspotify not calling any callback after login
22-02-2015, 09:37 PM
Post: #1
ohLibspotify not calling any callback after login
I'm trying to create a project where I use the ohLibspotify .Net libspotify wrapper to login to spotify and stream playlists.

As far as I can see I've set everything up the same way like in the example. First create a session like so:

SpotifySessionConfig sp_config = new SpotifySessionConfig()
            ApiVersion = 12,
            CacheLocation = "cache",
            SettingsLocation = "settings",
            UserAgent = "player",
            ApplicationKey = Properties.Resources.appkey,
            Listener = new sp_Listener()
sp_session = SpotifySession.Create(sp_config);

Then I call relogin() if that fails than I show the login window to the user because no stored credentials have been found. When the user has supplied me with his account details I call login(username, password, true, null). After that I'm awaiting a call back to the sp_Listener class.

In the sp_Listener class I have overridden the following functions:

SpotifySessionListener.LoggedIn(SpotifySession session, SpotifyError error)
SpotifySessionListener.ConnectionError(SpotifySession session, SpotifyError error)
SpotifySessionListener.LogMessage(SpotifySession session, string data)

The only callback that gets called is the LogMessage callback. I've hooked it up to log4net to read all the output efficiently. This is all of the LogMessage output:

2015-02-22 20:58:38,636 [18] DEBUG Namespace.sp_Listener - 19:58:38.634 I [c:/Users/spotify-buildagent/BuildAgent/work/1e0ce8a77adfb2dc/client/core/session/offline_authorizer.cpp:297] Unable to login offline: no such user

2015-02-22 20:58:38,649 [18] DEBUG Namespace.sp_Listener - 19:58:38.649 I [c:/Users/spotify-buildagent/BuildAgent/work/1e0ce8a77adfb2dc/client/core/session/offline_authorizer.cpp:297] Unable to login offline: no such user

2015-02-22 20:58:38,651 [14] DEBUG Namespace.sp_Listener - 19:58:38.649 E [c:/Users/spotify-buildagent/BuildAgent/work/1e0ce8a77adfb2dc/client/core/network/proxy_resolver_win32.cpp:215] WinHttpGetProxyForUrl failed

2015-02-22 20:58:38,664 [19] DEBUG Namespace.sp_Listener - 19:58:38.661 I [ap:1752] Connecting to AP

2015-02-22 20:58:38,713 [19] DEBUG Namespace.sp_Listener - 19:58:38.713 I [ap:1226] Connected to AP:

It seems like I must have forgotten something. I've no idea what, maybe one of you guys knows a solution.
Find all posts by this user

Messages In This Thread
ohLibspotify not calling any callback after login - feanaro100 - 22-02-2015 09:37 PM

Forum Jump: