{"action":"created","issue":{"url":"https://api.github.com/repos/spotify/ios-sdk/issues/882","repository_url":"https://api.github.com/repos/spotify/ios-sdk","labels_url":"https://api.github.com/repos/spotify/ios-sdk/issues/882/labels{/name}","comments_url":"https://api.github.com/repos/spotify/ios-sdk/issues/882/comments","events_url":"https://api.github.com/repos/spotify/ios-sdk/issues/882/events","html_url":"https://github.com/spotify/ios-sdk/issues/882","id":255973319,"number":882,"title":"Revoking access to an approved application on the Spotify website causes renewSession to crash every time","user":{"login":"Daltron","id":9689335,"avatar_url":"https://avatars1.githubusercontent.com/u/9689335?v=4","gravatar_id":"","url":"https://api.github.com/users/Daltron","html_url":"https://github.com/Daltron","followers_url":"https://api.github.com/users/Daltron/followers","following_url":"https://api.github.com/users/Daltron/following{/other_user}","gists_url":"https://api.github.com/users/Daltron/gists{/gist_id}","starred_url":"https://api.github.com/users/Daltron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Daltron/subscriptions","organizations_url":"https://api.github.com/users/Daltron/orgs","repos_url":"https://api.github.com/users/Daltron/repos","events_url":"https://api.github.com/users/Daltron/events{/privacy}","received_events_url":"https://api.github.com/users/Daltron/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-09-07T15:14:35Z","updated_at":"2017-10-26T20:41:07Z","closed_at":null,"author_association":"NONE","body":"Steps to reproduce:\r\n\r\n1. Login to Spotify via the Spotify SDK in your app and grant it permissions. This will give you a valid SPTAuth session\r\n2. On the Spotify website, login to your account and revoke that app's permission\r\n3. Call `renewSession` on the `SPTAuth.defaultInstance()`\r\n\r\nThe app will crash every time and provide the following stack trace:\r\n```\r\n*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]'\r\n*** First throw call stack:\r\n(\r\n\t0   CoreFoundation                      0x0000000116ec834b __exceptionPreprocess + 171\r\n\t1   libobjc.A.dylib                     0x0000000115e7c21e objc_exception_throw + 48\r\n\t2   CoreFoundation                      0x0000000116dded8f -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 351\r\n\t3   CoreFoundation                      0x0000000116ddebfb +[NSDictionary dictionaryWithObjects:forKeys:count:] + 59\r\n\t4   Tunespeak                           0x00000001105f01c9 __59-[SPTAuth _renewSession:withServiceEndpointAtURL:callback:]_block_invoke + 1851\r\n\t5   libdispatch.dylib                   0x0000000118ea2980 _dispatch_call_block_and_release + 12\r\n\t6   libdispatch.dylib                   0x0000000118ecc0cd _dispatch_client_callout + 8\r\n\t7   libdispatch.dylib                   0x0000000118eab366 _dispatch_queue_override_invoke + 1426\r\n\t8   libdispatch.dylib                   0x0000000118ead3b7 _dispatch_root_queue_drain + 720\r\n\t9   libdispatch.dylib                   0x0000000118ead08b _dispatch_worker_thread3 + 123\r\n\t10  libsystem_pthread.dylib             0x000000011927b5a2 _pthread_wqthread + 1299\r\n\t11  libsystem_pthread.dylib             0x000000011927b07d start_wqthread + 13\r\n)\r\nlibc++abi.dylib: terminating with uncaught exception of type NSException\r\n\r\n```\r\n\r\nThere should be a way to check if the application still has valid permissions at any given time."},"comment":{"url":"https://api.github.com/repos/spotify/ios-sdk/issues/comments/339794379","html_url":"https://github.com/spotify/ios-sdk/issues/882#issuecomment-339794379","issue_url":"https://api.github.com/repos/spotify/ios-sdk/issues/882","id":339794379,"user":{"login":"hughrawlinson","id":829836,"avatar_url":"https://avatars3.githubusercontent.com/u/829836?v=4","gravatar_id":"","url":"https://api.github.com/users/hughrawlinson","html_url":"https://github.com/hughrawlinson","followers_url":"https://api.github.com/users/hughrawlinson/followers","following_url":"https://api.github.com/users/hughrawlinson/following{/other_user}","gists_url":"https://api.github.com/users/hughrawlinson/gists{/gist_id}","starred_url":"https://api.github.com/users/hughrawlinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hughrawlinson/subscriptions","organizations_url":"https://api.github.com/users/hughrawlinson/orgs","repos_url":"https://api.github.com/users/hughrawlinson/repos","events_url":"https://api.github.com/users/hughrawlinson/events{/privacy}","received_events_url":"https://api.github.com/users/hughrawlinson/received_events","type":"User","site_admin":false},"created_at":"2017-10-26T20:41:07Z","updated_at":"2017-10-26T20:41:07Z","author_association":"MEMBER","body":"Thanks for the report @Daltron & @ultim8p. We'll have a look at how we can more suitably handle unexpected responses from the refresh endpoint."}}
{"actor":{"display_login":"hughrawlinson"}}