Error: _handleNonLaunchSpecificActions in iOS9

11,445

There is nothing wrong with your code. This is a logging message internal to Apple, and you should file a radar about it.

There are two hints that show that this is probably Apple's code:

  1. The underscore leading the method name _handleNonLaunchSpecificActions:forScene:withTransitionContext:completion is a convention indicating that the method is private/internal to the class that it's declared in. (See this comment.)

  2. It's reasonable to guess that the two letter prefix in FBSSceneSnapshotAction is shorthand for FrontBoard, which according to Rene Ritchie in "iOS 9 wish-list: Guest Mode" is part of the whole family of software related to launching apps:

With iOS 8, Apple refactored its system manager, SpringBoard, into several smaller, more focused components. In addition to BackBoard, which was already spun off to handle background tasks, they added Frontboard for foreground tasks. They also added PreBoard to handle the Lock screen under secure, encrypted conditions. [...]

I have no idea what the BS prefix in BSSettings is for, but an analysis of this log message would indicate that it's not anything you did, and you should file a radar with steps to reproduce the logging message.

If you want to try and grab a stack trace, you can implement the category linked to here. Some would argue that overriding private API is a bad idea, but in this case a temporary injection to grab a stack trace can't be too harmful.

EDIT:

But, we still want to know what this action is. So I put a breakpoint on -[UIApplication _handleNonLaunchSpecificActions:forScene:withTransitionContext:completion] and started printing out register values and found a class called FBSceneImpl which had a whole bunch of information about my application:

Scene

We are able to find out which private method is called next (stored in the program counter, register 15.)

Program Counter

I tried finding the un-handled FBSceneSnapshotAction referenced in the log, but no dice. Then, I subclassed UIApplication, and overrode _handleNonLaunchSpecificActions:forScene:withTransitionContext:completion. Now I was able to get at the action directly, but still, we don't know what it is.

Then, I looked at the FBSceneSnapshotAction again. Turns out it has a superclass called BSAction.

Then I wrote a tool similar to RuntimeBrowser and looked up all of the subclasses of BSAction. It turns out that there's quite a list of them:

Action List

The two method names we have (one from the log and one from the program counter on the devices) indicate that these actions are used under the hood for passing actions around the system.

Some actions are probably sent up to the app delegate's callbacks, while others are handled internally.

What's happening here is that there is an action that wasn't handled correctly and the system is noting it. We weren't supposed to see it, apparently.

Share:
11,445

Related videos on Youtube

Roddy
Author by

Roddy

Updated on June 12, 2022

Comments

  • Roddy
    Roddy almost 2 years

    I am getting the following error on iOS 9:

        -[UIApplication_handleNonLaunchSpecificActions:
          forScene:
          withTransitionContext:
          completion:] unhandled action -> 
          <FBSSceneSnapshotAction: 0x150b2aef0> 
           {
                handler          = remote;
                info = <BSSettings: 0x15333f650> 
                {
                    (1) = 5;
                };
            }
    

    Has anyone else come across this error or it's implications? What is wrong?

    • Marcin Czenko
      Marcin Czenko over 8 years
      Yes, I see it when I switch the iPhone off when my app is running. I am on iOS9 Beta 5 and I did not observe any implications of this so far.
    • Roddy
      Roddy over 8 years
      Is still in iOS9 post beta releases. Would be good to understand what the issue is and the implications of it.
    • NKorotkov
      NKorotkov over 8 years
      I have the same issue when I lock my iPhone when my app is running. iOS 9.0, XCode 7.0.
    • borchero
      borchero over 8 years
      Same amazement about this warning here. However it appears to go away when unchecking 'Debug executable' in the Building Scheme. . . . . . . . . No, just kidding (facepalm?) :P it would be interesting to know where it comes from^^
    • Hongfei
      Hongfei over 8 years
      It does seem an Apple bug since a brand new project created with Xcode 7 has this exact problem too.
    • rtm
      rtm over 8 years
      Same problem here. Pressing the lock button produces that error message and disrupts the behavior of an app that was working fine a week ago - before the update to xcode7/ios9. (App's purpose is to collect and save sensor data.)
    • Steve Moser
      Steve Moser over 8 years
      I see this in the GM.
    • Siniša
      Siniša over 8 years
      Same issue here. Up-to-date XCode with iOS9 SDK, on iPhone 6+ with iOS9.0, when testing the app, on locking the screen this appears in console output.
    • Darkin
      Darkin over 8 years
      I am running full release Xcode 7 and that error is popping up when I lock the simulator. Doesn't seem to do anything else though.
    • Adro
      Adro over 8 years
      Xcode 7's bug and I don't have any idea how to trace this. I'll be glad to know where this come from.
    • Arthur Gevorkyan
      Arthur Gevorkyan over 8 years
      Guys, do you know if it's being discussed on Apple Forums or has been posted to OpenRadar at least?
    • Roddy
      Roddy over 8 years
      Is anything of any merit ever discussed on the Apple developer forums? Seems that any kind of bug gets closed off with "why would you want to do that if Apple don't want you to?" Is the last stop of desperation when looking to resolve issues.
    • Fenix Voltres
      Fenix Voltres over 8 years
      Thanks God it's Front Board Services class, not some Facebook hidden class trying to make screenshot of my app on locking screen. (github.com/ksenks/iOS9-Runtime-Headers/blob/master/…)
    • iPhone Guy
      iPhone Guy over 8 years
      Refer to question stackoverflow.com/questions/32658037/… - this discusses the same issue.
    • sudoExclaimationExclaimation
      sudoExclaimationExclaimation over 8 years
      same problem here. I am not sure if this would be causing my music app to pause too when I lock the screen while app is in foreground open. If my app is in background by clicking on home button, then everything is fine. But if I have app open and lock screen, my music streaming stops and I get this error. worked fine in iOS 8.
    • C. Sederqvist
      C. Sederqvist over 8 years
      Has anybody tried this using Xcode 7.2 beta 3?
    • Roddy
      Roddy over 8 years
      Is still happening in Xcode 7.1.1
    • Eugene Gordin
      Eugene Gordin over 8 years
      it's interesting that it doesn't happen if the app is running on the background, only if it's in the foreground
    • ak2g
      ak2g over 8 years
      Still same issue in Xcode 7.2. when my apps enter in background
    • Moshe
      Moshe over 8 years
      What are steps to reproduce this error? And, did you file a radar?
    • Roddy
      Roddy over 8 years
      Just noticed that the original question has been updated... makes me sound like a complete douche :-( This happens when the app is put into the background while running in Xcode.
  • Roddy
    Roddy over 8 years
    Sorry but this is not really an answer; more of a following comment. The code is very much Apple's internal error, this is not in question. Guesses are not really a resolution and the iOS8 explanation provided is not relevant as the error only appeared in iOS9 (this does not happen in iOS8).
  • Moshe
    Moshe over 8 years
    The answer to "what is wrong" is that something inside of SpringBoard hasn't handled a snapshot action. That's what the logging message says. There's little else anyone outside of Apple can tell you.
  • Moshe
    Moshe over 8 years
    The fact that this logging message hasn't appeared on iOS 8 isn't really relevant though. It's a stray logging message that should be filed with radar.
  • Roddy
    Roddy over 8 years
    I did notice this morning that someone has updated my question and that was not what I originally asked, which is why there is a bit of a disconnect. Didn't even know it was possible for a question to be updated by anyone else.
  • Moshe
    Moshe over 8 years
    To answer your original question: there are no implications other than please file a radar.
  • Moshe
    Moshe over 8 years
    Anyone with sufficient rep can edit almost anything to improve quality across the site.
  • Moshe
    Moshe over 8 years
    Added some more info.
  • OhadM
    OhadM over 8 years
    Nice investigation but here is something interesting, I am getting the exact OP error when using private Apple API. I guess since I am using the private API then I am getting console log probably for Apple engineers.