GitHunt
BO

boyvanamstel/CatalinaMusicScripting-BugReport

๐Ÿž Points out a permission issue when scripting Music.app on the Catalina Beta.

Music.app Permission Issue

Shows an issue that prevents apps from accessing player info using AppleScript when sandboxing is enabled.

Introduction

While Music.app uses a scripting interface very similar to iTunes, security scopes aren't handled the same or have a bug. The following entitlements allow iTunes to fetch the track info without issue. With Music.app an error is shown.

<key>com.apple.security.scripting-targets</key>
<dict>
	<key>com.apple.Music</key>
	<array>
		<string>com.apple.Music.playback</string>
		<string>com.apple.Music.library.read</string>
	</array>
</dict>

Only library information (com.apple.Music.library.read) seems to be affected. Fetching track artwork for instance works as expected.

Setup

  1. Launch Music.app.
  2. Run the project.

Steps to reproduce

  1. Access a song on Apple Music, load a local track or skip a track.
  2. Grant permission to CatalinaMusicBridge.app to access Music.app.

Notice the error that appears in the Console:
Privilege violation error shown in the console

Also note that the player state did update appropriately.

  1. Disable sandboxing in CatalinaMusicBridge.entitlements.
<key>com.apple.security.app-sandbox</key>
<false/>
  1. Run the project again.
  2. Skip a track in Music.app.

Notice that the track information gets properly displayed:
A screenshot of the app window showing track information

Updates

September 11th, 2019

  • Discovered that the issue is caused by name of current track. The artist, artwork and player state work as expected (for local tracks at least).

Languages

Swift100.0%

Contributors

MIT License
Created June 5, 2019
Updated January 23, 2026
boyvanamstel/CatalinaMusicScripting-BugReport | GitHunt