Wordpress-ios: NSInvalidArgumentException: Application tried to present modal view controller on itself. Presenting controller is <UISearchController...

Created on 8 Aug 2020  ·  9Comments  ·  Source: wordpress-mobile/WordPress-iOS

Sentry Issue: WORDPRESS-IOS-54Q

Application tried to present modal view controller on itself. Presenting controller is <UISearchController: 0x11e856c00>.
Posts List Site Picker [Pri] Medium [Type] Crash

All 9 comments

WORDPRESS-IOS-54Q
Events in the last 90d: 12,000
Users affected in the last 90d: 1,900
Events in the latest release, last 30d: 105 (15.3 released 14d ago on 2020-07-24)
https://sentry.io/share/issue/2b746139caca4d53b3e076c767f23457/

image

image

@designsimply, do you know why the link that sentry-io bot posted doesn't seem to match the quoted exception or this issue's title?

The Sentry issue that appears to match this issue's title is WORDPRESS-IOS-38JK, but it appears to be very low impact.

@guarani I think it's either because you were looking at a different issue somehow by mistake or because you weren't sure why something was grouped in with the other events on the issue.

If it's the first thing then try the link again and I think you should be good to go (I double checked it and it lgtm! 👍) and if it's the second thing then this background documentation may help: https://docs.sentry.io/data-management/event-grouping/.

Thanks @designsimply 🙇🏻‍♂️, it's working now (not sure what happened last time).

I'm coming back to the issue of the Sentry link because I see that one link can point to what appear to be different issues depending on the day. See this screenshot from visiting the above link now:

Screen Shot 2020-08-14 at 09 27 21

Why's this happening (my theory)

I wanted to raise this again because it's probably not unique to this instance but is how Sentry currently groups issues. From my understanding, Sentry collects all "events" which meet its criteria of being part of the same underlying error and puts them together in a group which it calls an Issue. It then looks at the events that make up the issue and chooses the title of the most frequent event to use as the issue title.

From one day to the next, the most frequent event within an issue can change — which seems to explain why some days WORDPRESS-IOS-54Q can refer to a:

NSInvalidArgumentException: Application tried to present modal view controller on itself. Presenting controller is <UISearchController: 0x11e856c00>.

and on other days it can be:

NSInvalidArgumentException: <UINavigationController: 0x10d80fc00> is pushing the same view controller instance (<WPMediaPickerViewController: 0x10d810400>) more than once which is not supported and is most likely an error in the application : org.wordpress

These two bugs are not likely related at all, and it's hard to know what impact each one is really having. (While logged in to Sentry, I clicked on the Details button in the issue link above, then went to the Events tab — but couldn't find a way to sort the events in any meaningful way).

Next steps

If others agree that Sentry is not sorting issues properly, I think we need to address this. A first step should be straightforward, if there's a new Sentry Grouping Algorithm out, we can opt-in to use it.

As far as this issue in particular goes, I think after we update the algorithm we can determine the true impact of these crashes and make a call whether to close this issue and create new issues, or something else.

Any thoughts @designsimply?

Thank you for posting about the problem with grouping issues in Sentry! As mentioned in Slack, I'm totally on board for trying the new Grouping Algorithm and we can follow up at p77Llu-do3-p2#comment-16919 (internal reference).

For the purposes of this GitHub issue, let's focus on the error given:

Application tried to present modal view controller on itself. Presenting controller is .

A search in Sentry for "Application tried to present modal view controller on itself" shows the following graph for v15.3 which is the current latest stable release available in the App Store, and I will suggest medium to low priority for it at this time.

image

Note: looking at the breadcrumbs for the events in the "Application tried to present modal view controller on itself" search, most mention BlogListViewController and I think that means they might be related to the search component in the Site Picker or Posts List (because some also mention WordPress.PostListViewController).

Regarding Sentry grouping, we made a recent change we made to use Sentry’s server-side fingerprinting to group NSInvalidArgumentException issues by the last screen the user was on before the crash occurred. The change should affect how new crashes are grouped going forward. /hat tip @jkmassel @guarani

(internal reference: paaHJt-1jm-p2)

A search in Sentry for "Application tried to present modal view controller on itself" shows the following graph for the last 90 days:

image

The largest grouping mentioning that search snippet is this one:

Events in the last 90d: 2,400
Users affected in the last 90d: 1,500
WORDPRESS-IOS-54Q: https://sentry.io/share/issue/2b746139caca4d53b3e076c767f23457/

image

The issue WORDPRESS-IOS-54Q looks fixed! 🎉

image

Closing with the assumption if any other issues related to "Application tried to present modal view controller on itself" get enough occurrences that a separate issue will be filed for it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rachelmcr picture rachelmcr  ·  21Comments

kwonye picture kwonye  ·  34Comments

sentry-io[bot] picture sentry-io[bot]  ·  19Comments

sendhil picture sendhil  ·  18Comments

sendhil picture sendhil  ·  30Comments