{"action":"opened","issue":{"url":"https://api.github.com/repos/spotify/ios-sdk/issues/355","labels_url":"https://api.github.com/repos/spotify/ios-sdk/issues/355/labels{/name}","comments_url":"https://api.github.com/repos/spotify/ios-sdk/issues/355/comments","events_url":"https://api.github.com/repos/spotify/ios-sdk/issues/355/events","html_url":"https://github.com/spotify/ios-sdk/issues/355","id":83598742,"number":355,"title":"SPTAlbum albumWithURI:accessToken:market:callback: sometimes returns nil values.","user":{"login":"WormBuffet","id":8832515,"avatar_url":"https://avatars.githubusercontent.com/u/8832515?v=3","gravatar_id":"","url":"https://api.github.com/users/WormBuffet","html_url":"https://github.com/WormBuffet","followers_url":"https://api.github.com/users/WormBuffet/followers","following_url":"https://api.github.com/users/WormBuffet/following{/other_user}","gists_url":"https://api.github.com/users/WormBuffet/gists{/gist_id}","starred_url":"https://api.github.com/users/WormBuffet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WormBuffet/subscriptions","organizations_url":"https://api.github.com/users/WormBuffet/orgs","repos_url":"https://api.github.com/users/WormBuffet/repos","events_url":"https://api.github.com/users/WormBuffet/events{/privacy}","received_events_url":"https://api.github.com/users/WormBuffet/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-01T16:48:05Z","updated_at":"2015-06-01T16:48:05Z","closed_at":null,"body":"Hi,\r\n\r\nsince a few days ago I've been having an issue where `albumWithURI:accessToken:market:callback:` sometimes returns `STPAlbum` objects with seemingly all `nil` values.\r\n\r\nIt is not consistent however, and triggering a request for the same URI multiple times during the same instance of the app will sometimes return a valid object, and sometimes not.\r\n\r\nE.g, two requests separated by ~40 seconds (as printed by the final `NSLog` call in the code below):\r\n```\r\n2015-06-01 18:33:00.421 Spine[21403:1474474] -[SpotifyAlbumsProcessor convertAlbum:]: (null) spotify:album:6WMJwoYdhUSExusobn0zUE\r\n2015-06-01 18:33:40.392 Spine[21403:1474474] -[SpotifyAlbumsProcessor convertAlbum:]: <SPTAlbum: 0x801146e0>: Margins (spotify:album:6WMJwoYdhUSExusobn0zUE) spotify:album:6WMJwoYdhUSExusobn0zUE`\r\n```\r\n```objective-c\r\n    dispatch_semaphore_t sema = dispatch_semaphore_create(0);\r\n    SPTSavedTrack* firstTrack = [(NSArray*)album firstObject];\r\n    NSURL*         albumURI   = firstTrack.album.uri;\r\n    __block SPTAlbum* sptAlbum;\r\n   \r\n    [SPTAlbum albumWithURI:albumURI accessToken:_session.accessToken market:nil callback:^(NSError* error, SPTAlbum* fullAlbum) {\r\n        if(error) {\r\n            NSLog(@\"%s error: %@ albumURI=%@\", __func__, error, albumURI);\r\n            sptAlbum = nil;\r\n        } else if (!fullAlbum.name) {\r\n            sptAlbum = nil;\r\n        } else {\r\n            sptAlbum = fullAlbum;\r\n        }\r\n   \r\n        dispatch_semaphore_signal(sema);\r\n    }];\r\n\r\n    if(dispatch_semaphore_wait(sema, dispatch_time(DISPATCH_TIME_NOW, kTimeoutThresholdInNs))) {\r\n        NSLog(@\"%s request timeout\", __func__);\r\n    };\r\n\r\n    NSLog(@\"%s: %@ %@\", __func__, sptAlbum, albumURI);\r\n```\r\n\r\nAny ideas? Thanks!"}}