Error processing request from MAD on result: Error Domain=NSOSStatusErrorDomain

New after update to Xcode 15:

Error processing request from MAD on result: Error Domain=NSOSStatusErrorDomain Code=-128 "Request was canceled"

Here is my code which I call within my GameViewController's viewDidLoad().

        present(itsPlayerController!, animated:true) {
            self.itsMoviePlayer?.play()
            self.itsMovieIsFinished = false
        }

Here is my code which I call at various times via playMovie(movieName: "pose"):

    func playMovie(movieName: String) {
               
        NotificationCenter.default.addObserver(self, selector: #selector(playerDidFinishPlaying),
                                   name: NSNotification.Name.AVPlayerItemDidPlayToEndTime,
                                               object: itsPlayerController?.player?.currentItem)
        
        present(itsPlayerController!, animated:true) {
            self.itsMoviePlayer?.play()
            self.itsMovieIsFinished = false
        }

    }   // playMovie

    
    @objc func playerDidFinishPlaying(note: NSNotification) {
        
        self.itsPlayerController?.dismiss(animated:false, completion:nil)
        nextScene()
        changeScene()
        
        // re-init for next time
        setupMovie(theMovieName: "pose")
        
    }

NB:

  1. If I do not call playMovie ==> NO ERROR

  2. THE PROBLEM = my call to present within playMovie. If I totally comment out present, = NO ERROR

  3. If I comment out just the guts of present, other errors are introduced.

  4. I have checked the syntax of calling present and I don't see any error there.

  5. All the above pertains to the Destination = iPad Mini (6th Generation

  6. If the Destination = Apple TV, then we get within GameViewDidLoad

Unable to simultaneously satisfy constraints.

  1. For both Destinations, the Game runs OK - it's just these Warnings??

HAALP

Answered by JohnLove in 766180022

Once again a big Shout Out to DTS with whom I opened up an offical TSI.

  1. DTS responded that the true culprit is most likely LOG NOISE = Errors or Warnings that do not stop my Code from working. Their effect is superficial, versus substantial.

  2. They specifically mentioned several of the posts here by Quinn the Eskimo which essentially conclude that I ignore this LOG NOISE as long as my Code remains 100% functional.

  3. DTS also re-credited my TSI Count.

CHEERS!! CHEERS!! CHEERS!!

One last statement = if I comment out the call to NotificationCenter => Error stays => my call to present is the most likely suspect.

Why can't I edit the OP ...

Anyway,

Here is the CORRECT code which I call within my GameViewController's viewDidLoad().

    func setupMovie(theMovieName: String) {
        
        guard let path = Bundle.main.path(forResource: "movies/" + theMovieName,
                                          ofType:"mp4") else {
            print("movie not found")
            return
        }
        
        itsMoviePlayer = AVPlayer(url: URL(fileURLWithPath: path))
        itsPlayerController = AVPlayerViewController()
        itsPlayerController?.player = itsMoviePlayer
        itsMovieIsFinished = true

    }   // setupMovie
Accepted Answer

Once again a big Shout Out to DTS with whom I opened up an offical TSI.

  1. DTS responded that the true culprit is most likely LOG NOISE = Errors or Warnings that do not stop my Code from working. Their effect is superficial, versus substantial.

  2. They specifically mentioned several of the posts here by Quinn the Eskimo which essentially conclude that I ignore this LOG NOISE as long as my Code remains 100% functional.

  3. DTS also re-credited my TSI Count.

CHEERS!! CHEERS!! CHEERS!!

Error processing request from MAD on result: Error Domain=NSOSStatusErrorDomain
 
 
Q