5

The call to setCurrentPlaybackRate to the MPMusicPlayerController stopped working after the latest iOS update, and now gives this error:

2018-04-15 16:24:06.904562-0600 SampleProject[5659:1836398] [SDKPlayback] -
[MPMusicPlayerController setCurrentPlaybackRate:0.670213] completed error: 
Error Domain=MPCPlayerRequestErrorDomain Code=1 "No commands provided." 
UserInfo={NSDebugDescription=No commands provided.}

I'm passing in a valid double value greater than 0 and less than 2.

This is the call: [appMusicPlayer setCurrentPlaybackRate:0.7];

Thanks for any input or help!

P.S. I'm getting a lot of other weird errors too. Here are some:

2018-04-15 17:30:01.976932-0600 SampleProject[5733:1868672] [SDKPlayback] 
Failed validators: {(
     setRepeatMode
)}
2018-04-15 17:30:03.976879-0600 SampleProject[5733:1868672] [SDKPlayback] 
Failed to get a valid response. Resetting expectations.

2018-04-15 17:30:01.976932-0600 SampleProject[5733:1868672] [SDKPlayback] 
Failed validators: {(
    setRepeatMode
)}
2018-04-15 17:30:03.976879-0600 SampleProject[5733:1868672] [SDKPlayback] 
Failed to get a valid response. Resetting expectations.
TheJeff
  • 3,665
  • 34
  • 52
  • I've never heard of setting the playback rate on an MPMusicPlayerController (such that it is anything but zero or one). Did this previously work? – matt Apr 15 '18 at 23:48
  • Yes it did previously work, and it was glorious. – TheJeff Apr 16 '18 at 13:53
  • I had no idea! This sounds to me like grounds for you to submit a bug report to Apple. – matt Apr 16 '18 at 13:55
  • Submitted a bug to Apple – TheJeff Apr 18 '18 at 21:49
  • Try to add a delay after set – yebw Apr 19 '18 at 01:11
  • @yebw that is a really good suggestion! thanks – matt Aug 06 '18 at 01:00
  • @TheJeff did you figure it out, i am getting the same errors and i dont know what am i doing wrong. going by the textbook – Usama bin Attique Aug 27 '18 at 14:25
  • I've filed a bug to Apple, and they are asking for a sample app to troubleshoot the problem. I gave them one, but it has an issue - the MPMediaPickerController immediately dismisses, so I'm a bit blocked on that: https://stackoverflow.com/questions/51469928/mpmediapicker-does-not-show I ended up switching to AVPlayer which works great most of the time, however there is another bug with that where the assetUrl is sometimes nil, so I can't play some songs at all. I logged this in the bug reporter and am working with Apple to have them fix that as well. @UsamabinAttique – TheJeff Aug 27 '18 at 15:18
  • Functionality seems to have improved, however the weird logs are still there. The logs don't seem to be associated with the player malfunctioning anymore from what I see. Another thing I've noticed are some odd threading issues. Observing the state of the media player from the same thread you start a task on is inconsistent. I recommend asynchronously kicking off your player mutations (play,stop,pause,etc), that way when you're checking player state, the checks are coming from a different thread and are much more likely to stay consistent. – TheJeff Dec 04 '19 at 16:22

1 Answers1

0

I just encountered the same issue when trying to use player.append(MPMusicPlayerQueueDescriptor). I found that it would return the same error when the queue for my MPMusicPlayerController was quite large. When I cut it down to around 10, it works with no issues. I haven't experimented to see the maximum I can add to the queue.

I hope this helps, perhaps a smaller queue will also work for you.

Daven
  • 549
  • 4
  • 11