requestUserToken returns SKErrorDomain error 1, but only during App Review!

Hi there.


We are experiencing an issue where our App keeps getting rejected because it's returning an "SKErrorDomain error 1" whenever it calls requestUserToken during App Review. The strange thing is that it seems to run perfectly for all of our TestFlight users & developers. Code snippet here:


    SKCloudServiceController().requestCapabilities(completionHandler: { (cloudServiceCapability, error) in
        
        // Lots of error checking here
        
        guard cloudServiceCapability.contains(.addToCloudMusicLibrary) else {
            // Raise an error...
            return
        }
        
        guard cloudServiceCapability.contains(.musicCatalogPlayback) else {
            // Raise an error...
            return
        }
        
        let newDeveloperToken = "a developer token generated by python script"

        SKCloudServiceController().requestStorefrontCountryCode(completionHandler: { (countryCode, error) in

            // Lots more error checking here
            
            SKCloudServiceController().requestUserToken(forDeveloperToken: newDeveloperToken, completionHandler: { (token, error) in
                guard error == nil else {
                    // Error: "The operation couldn't be completed. (SKErrorDomain error 1.)" gets thown here during App Review
                    return
                }
                
                // Success
                
                // We never get here during App Review!
           })
        })
    })

Can anyone give us a pointer on where the issue might be? I've asked App Review to check they are logged-in with an Apple Id with a valid Apple Music account, and I've double-checked that our developer token does not expire for a long period. Is there anything else that we should check on regarding our Developer token? Any ideas would be very welcome.


Thanks in advance!

Hi dutton,

we're facing the same issue in our app,

any news in this case?


Greetings

Janik

Hey dutton,
I am also facing this issue, any updates?
requestUserToken returns SKErrorDomain error 1, but only during App Review!
 
 
Q