MPMusicPlayerController doesn't finish preparing to play

Originator:jay.whitsitt
Number:rdar://35544822 Date Originated:November 14 2017
Status:Open Resolved:
Product:iOS + SDK Product Version:MusicKit on iOS
Classification:Bug Reproducible:Sometimes
 
Summary:
On iOS 11.1, when using an instance of MPMusicPlayerController, it sometimes won't call the completionHandler sent to prepareToPlayWithCompletionHandler: or set isPreparedToPlay to YES.

This doesn't seem to affect one instance of MPMusicPlayerController more than the others. This has been reproduced using systemMusicPlayer, applicationMusicPlayer, and applicationQueuePlayer.

When this happens, calling [player play] produces unstable results. Sometimes it plays. Sometimes it doesn't. Sometimes it plays an unexpected song, typically the last played song.

The sysdiagnose is attached. The issue was reproduced between 15:32 and 15:33.

I've also attached a sample app that can reproduce this. When tapping the play button, it doesn't always play.

Steps to Reproduce:
1. Get an instance of MPMusicPlayerController (e.g., systemMusicPlayer)
2. Queue a song ([player setQueueWithStoreIDs:@[@"295757262"]];)
3. Prepare to play it ([player prepareToPlayWithCompletionHandler:block];)

Expected Results:
isPreparedToPlay == YES after a short period and the given completionHandler is called.

Actual Results:
isPreparedToPlay == NO indefinitely and the given completionHandler is not called.

Version/Build:
iOS 11.1 and 11.1.0

Configuration:
iPhone X, iPhone 6 Plus

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!