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.