5 Replies
      Latest reply on Sep 25, 2019 6:12 PM by QuinceyMorris
      thisma Level 1 Level 1 (0 points)

        My app has nothing but this:

        let SKController = SKCloudServiceController()

        It is the first line in application(_: didFinishLaunchingWithOptions:)

         

        Even with no other code these 5 errors appear in the console:

        [core] "Error returned from daemon: Error Domain=com.apple.accounts Code=9 "(null)""
        SSAccountStore: Failed to fetch the backing accounts. error = Error Domain=com.apple.accounts Code=9 "(null)"
        [core] "Error returned from daemon: Error Domain=com.apple.accounts Code=9 "(null)""
        SSAccountStore: Failed to fetch the backing accounts. error = Error Domain=com.apple.accounts Code=9 "(null)"
        SSAccountStore: Unable to get the local account. error = Error Domain=SSErrorDomain Code=100 "Cannot connect to iTune
        

         

        How can I prevent these erros?

         

        - The device is logged into Apple Music

        - The device and app have internet acces

        - I am in Canada

        - The errors appear on device (iPhone 7) and in Simulator

        - Adding the code for SKCloudServiceController.requestAuthorization() and waiting for the authorization to succeed before instantiating SKCloudServiceController makes no difference

        • Re: Instantiating SKCloudServiceController immediately gives errors
          dutton Level 1 Level 1 (0 points)

          I get these messages too; I'm in the UK. Things still seem to work for me though - are you finding anything that doesn't work?

          • Re: Instantiating SKCloudServiceController immediately gives errors
            davenorfleet Level 1 Level 1 (10 points)

            I'm seeing the same issue. I see the error you refernce the first time I try to access a track, and on that first try, the track will play. However, if I try to access a second track on the same run of the app, I get no response at all - no error nor any playing music. Ick.

             

            Can anyone offer any instight as to what's going on? Also, I suspect the issue started with an iOS update, as my released app can now only play one track with this method per launch. Try making that sound trivial to users ;-(

              • Re: Instantiating SKCloudServiceController immediately gives errors
                florom Level 1 Level 1 (0 points)

                I see the same errors and I'm not able to get the "user token" from the "developer token",

                 

                the

                requestUserTokenForDeveloperToken

                method fails with:

                Error Domain=SKErrorDomain Code=7 "(null)" UserInfo={NSUnderlyingError=0x283eaf7e0 {Error Domain=SSErrorDomain Code=109 "(null)" UserInfo={NSUnderlyingError=0x283eaf810 {Error Domain=SSErrorDomain Code=109 "Cannot connect to iTunes Store" UserInfo={NSLocalizedDescription=Cannot connect to iTunes Store, SSErrorHTTPStatusCodeKey=401}}}}}

                 

                 

                I'm on the three month trial period of Apple Music, could that be a problem when developping?

                  • Re: Instantiating SKCloudServiceController immediately gives errors
                    khp Level 1 Level 1 (0 points)

                    I m having same kind of issue i m not able to generate the usertoken from the developer token and facing the error as below

                    Did anyone faced the issue and found solution on this ?

                     

                    2019-09-25 11:10:32.922025+0530 MyApp[10923:6620856] [core] "Error returned from daemon: Error Domain=com.apple.accounts Code=9 "(null)""

                    2019-09-25 11:10:32.923706+0530 MyApp[10923:6620856] SSAccountStore: Failed to fetch the backing accounts. error = Error Domain=com.apple.accounts Code=9 "(null)"

                    2019-09-25 11:10:32.929777+0530 MyApp[10923:6620878] [core] "Error returned from daemon: Error Domain=com.apple.accounts Code=9 "(null)""

                    2019-09-25 11:10:32.929923+0530 MyApp[10923:6620878] SSAccountStore: Failed to fetch the backing accounts. error = Error Domain=com.apple.accounts Code=9 "(null)"

                    2019-09-25 11:10:32.937739+0530 MyApp[10923:6620832] [core] "Error returned from daemon: Error Domain=com.apple.accounts Code=9 "(null)""

                    2019-09-25 11:10:32.937884+0530 MyApp[10923:6620832] SSAccountStore: Failed to fetch the backing accounts. error = Error Domain=com.apple.accounts Code=9 "(null)"

                    2019-09-25 11:10:32.938131+0530 MyApp[10923:6620832] SSAccountStore: Unable to get the local account. error = Error Domain=SSErrorDomain Code=100 "Cannot connect to iTunes Store" UserInfo={NSLocalizedDescription=Cannot connect to iTunes Store}

                      • Re: Instantiating SKCloudServiceController immediately gives errors
                        QuinceyMorris Level 8 Level 8 (6,050 points)

                        You should ignore these log messages. Even when you already have valid developer and user tokens, you still get some of these messages when your app starts using Apple Music.

                         

                        Instead, you need to check the errors returned by your actual calls to the various APIs. Unfortunately, it's very easy to create a developer token that's almost, but not quite valid, and you don't have any good tools for debugging that.

                         

                        But, start by figuring out which of the two tokens is having the problem.