Skip to content

MAUI Shell breadcrumbs not working on iOS #3999

Closed

Description

@albyrock87

Package

Sentry.Maui

.NET Flavor

.NET

.NET Version

8.0.405

OS

iOS

SDK Version

5.1.1

Self-Hosted Sentry Version

No response

Steps to Reproduce

  • Create a MAUI app with Shell
  • Set up a standard shell navigation and invoke a GoToAsync via button
  • Once in the new page push a button backed by SentrySdk crash utility
  • Restart the app
  • Look at Sentry crash report

Expected Result

AppShell logs in breadcrumbs

Actual Result

No AppShell logs in breadcrumbs

Activity

  1. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Feb 24, 2025
  2. albyrock87 commented on Feb 24, 2025

    @albyrock87
    ContributorAuthor

    You can fix it in MauiEventsBinder by changing the initial part to this:

    public void HandleApplicationEvents(Application application, bool bind = true)
    {
        if (bind)
        {
            // Attach element events to all existing descendants.
            foreach (var descendant in application.GetVisualTreeDescendants().Skip(1))
            {
                if (descendant is VisualElement element)
                {
                    OnApplicationOnDescendantAdded(application, new ElementEventArgs(element));
                }
            }
    
            // Attach element events to all descendants as they are added to the application.
            application.DescendantAdded += OnApplicationOnDescendantAdded;
            application.DescendantRemoved += OnApplicationOnDescendantRemoved;
    

    The reason is that iOS lifecycle event happens after the Shell has already been added to the application.

  3. bitsandfoxes commented on Feb 26, 2025

    @bitsandfoxes
    Contributor

    Hey @albyrock87! Thank you so much for reaching out! Would you feel comfortable opening up a PR for this?

  4. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Feb 26, 2025
  5. daveschu commented on Mar 28, 2025

    @daveschu

    Hi, do we have confirmation this was released in 5.4.0? It appears the release notes didnt have it listed, but the readme source does.

    I am testing my app using the repro steps available in the issue and not seeing AppShell.XYZ crumbs happening, only App.XYZ (we recently converted the main shell page and a few child pages from a frankenstein nav to all Shell and wanted to make sure we were getting the right crumbs). It could totally be an "us" problem, but I wanted to inquire if this merge was actually included in the 5.4.0 release. Thanks!

  6. jamescrosswell commented on Mar 31, 2025

    @jamescrosswell
    Collaborator

    @daveschu it wasn't included in 5.4.0. That release was made March 13th and the fix for this issue was merged in the main branch March 17th. It looks like auto-merge broke the CHANGELOG.md file though. I'll get that fixed and we can make a 5.5.0 release that includes this.

  7. daveschu commented on Mar 31, 2025

    @daveschu

    Awesome, appreciate that clarity and looking forward to the fix. Thanks!

  8. jamescrosswell commented on Apr 3, 2025

    @jamescrosswell
    Collaborator

    Hey @daveschu - just a heads up to say that 5.5.0 is available now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions