Some folks have been getting a weird error where they can't play a song on Apple Music because they aren't logged in, even though they are logged in. Adam Christianson of MacCast and TMO recently experienced this, and found a solution. Let me walk you through it.
Note: This fix requires accessing and making changes to your ~Library folder. Melissa Holt has some great tips for quickly accessing your Library and other hidden folders. Always be careful when making changes to your Library.
You're logged into Apple Music, but some songs won't play. When you try, you get this error:
"The song cannot be played because you are not signed in to Apple Music.
You must be signed in to Apple Music in order to play Apple Music songs."
The frustrating thing is that you are logged in. Logging out of Apple Music and back in doesn't help, nor does rebooting your Mac. Adam even contacted AppleCare, but they couldn't help, either.
It turns out there's a cache folder called SubscriptionPlayCache that can become corrupt and must be deleted by hand, as noted by a post at MacDrug. As shown in the image below, the path to that folder is ~/Library/Caches/com.apple.iTunes/.
The fix for this is to quit iTunes, delete the SubscriptionPlayCache folder, and then restart iTunes.
"After I did that," Adam Christianson told me, "I was able to play any song in Apple Music without getting the 'The song cannot be played because you are not signed in to Apple Music' error."