Unable to read object properties with AppleScript: "Music got an error: Can’t get properties of current track." I am trying to write an AppleScript that will tell me the current playing song, but I am unable to read properties from objects in AppleScript.
Executing a function on music works fine such as
tell application &quot;Music&quot; to play
tell application &quot;Music&quot; to pause

But trying to read a property such as the current track title does not. In fact, even trying to read the properties of the current track does not work. (Tested while a song was playing)
tell application &quot;Music&quot; to get properties of current track

returns error &quot;Music got an error: Can’t get properties of current track.&quot; number -1728 from properties of current track
Per this question, the above script should work: AppleScript and Music
I did get this to work when I was trying before when I was looking at the permissions, but then it stopped working since then so it might have been working for another reason. I'm running the script in script editor, which does have accessibility access in my security &amp; privacy settings.
Possibly related issue: Applescript - Getting Property of an Object Not Working
I'll summarize the discussion here:

current track for streaming songs is broken in big sur, refer here
current track only works for local files, refer to @user3439894 and here

And I had verify that if you download the songs in Music and then play it, you can successfully get the info.