Fixing MPRequestErrorDomain Error in Apple Music Shortcut

Today I learned how to work around a bug in the iOS Shortcuts app when trying to build a song rating tool for Apple Music.

The shortcut is simple: get the currently playing song, prompt for a 0-5 rating, and append the result to a file in iCloud Drive. But I kept running into this error:

The operation couldn’t be completed. (MPRequestErrorDomain error 1.)

It failed on the “Get Current Song” action, even though music was actively playing in the Apple Music app.

After searching around, I found several workarounds, but the first one that actually worked was to insert a blank Play Music action at the very top of the shortcut.

It’s not totally clear why this works. My guess is that the Play Music action either initializes the Apple Music context or creates a small delay that allows the system to correctly detect the current track.

Here’s the Reddit thread that pointed me in the right direction:
https://www.reddit.com/r/shortcuts/s/YpP6bJSRQO

Screenshot of the error below:

MPRequestErrorDomain error 1 in Apple Music Shortcut

Here’s a link to my “Rate Current Song” shortcut.

Related articles: