Musickit SDK for Android broken after Apple Music app update

Hi,

The Musickit SDK for Android seems to be broken after the Apple Music app update from last week. We are launching the intent like this:

        AuthIntentBuilder aib = authManager.createIntentBuilder(appleTokenProvider.getDeveloperToken());
        Intent intent = aib.build();
        authLauncher.launch(intent);

A new Apple Music UI is shown. The user is asked to login with email and password. However, after succesfull login the intent returns the error USER_CANCELLED for authManager.handleTokenResult(data); This was not the case before the latest Apple Music app update.

The only workaround is to logout in the Apple Music app, then retry to launch the intent in our app. This has to be done every time the music user token expires.

Any ETA on fixing this issue?

I’m experiencing the same issue.

Device: Google Pixel 8a

Apple Music version: 6.5, installed from Google Play

After the user successfully signs in through the new Apple Music authentication UI, the activity returns RESULT_CANCELED, and authManager.handleTokenResult(data) reports USER_CANCELLED, even though the user did not cancel the flow.

Logcat shows Successfully authenticated the account, followed by Failed to post account changed event with ams.error Code=1, and then DialogConnectorViewModel.cancelAction().

This flow worked correctly before the Apple Music update.

I can confirm the same regression with a standalone minimal reproduction app.

Environment: Device: Google Pixel 8

Android: 16 / API 36

Apple Music: 6.5.0 (versionCode 1580)

MusicKit authentication AAR: musickitauth-release-1.1.2.aar

Developer token endpoint returns HTTP 200

Developer token was tested with two separate Apple Media Services keys/configurations

The user completes Apple Music sign-in and does not cancel. Logcat then shows:

Successfully authenticated the account.

Successfully completed IdMS authentication

AMSIDMSAuthenticationCompleteAction succeeded

Failed to post account changed event: ams.error Code 1

DialogConnectorViewModel.cancelAction()

The Activity subsequently returns:

resultCode = RESULT_CANCELED

returned Intent = non-null

Intent extras = [music_user_token_error]

music_user_token_error = 0

TokenResult.isError = true

TokenResult.error = USER_CANCELLED

musicUserToken = null

The same result occurs in both the production application and a brand-new minimal Android app using Apple’s documented authentication flow. It also persists after using a completely new Media ID, private key, and Key ID. The equivalent iOS authentication works with the same backend.

This appears to be an Apple Music 6.5.0 Android regression after successful IdMS authentication, specifically during the internal account-change/dialog completion step. The SDK is reporting a user cancellation even though the user completed authentication.

Could Apple please confirm whether this is a known issue and whether an Apple Music Android update is planned?

Update: I downgraded the Apple Music Android app from 6.5.0 to 5.2.1 using APKMirror. Without changing my application, backend, developer token, Media ID, or Media Services key, authentication immediately succeeded. RESULT_OK was returned, TokenResult.isError=false, and a valid Music User Token was received. Upgrading back to 6.5.0 reproduces the USER_CANCELLED failure. This strongly indicates the regression was introduced in the Apple Music 6.5.0 Android app.

Update: I downgraded the Apple Music Android app from 6.5.0 to 5.2.1 using APKMirror. Without changing my application, backend, developer token, Media ID, or Media Services key, authentication immediately succeeded. RESULT_OK was returned, TokenResult.isError=false, and a valid Music User Token was received. Upgrading back to 6.5.0 reproduces the USER_CANCELLED failure. This strongly indicates the regression was introduced in the Apple Music 6.5.0 Android app.

Musickit SDK for Android broken after Apple Music app update
 
 
Q