Skip to content

Confusing messaging around viewhierarchy attachments #101356

@aellett

Description

@aellett

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

I was trying to attach a view hierarchy to an error, so I enabled that option when I started the sdk. In one of my early views I forced the app to crash when a button was tapped and then I restarted the app to make sure the crash was sent to Sentry.

I found the crash in the web console and the event had an attachment called view-hierarchy.json, but the file was basically empty and the view hierarchy explorer was empty:

Image

Reading the docs a little bit more, I saw that this feature is "best effort" and I tried to attach the view hierarchy to a nonfatal error at the same place. That worked, and I saw the view hierarchy as I expected.

Expected Result

I was surprised to see an empty file for the view hierarchy on the crash. I think that I would rather see no file attached or maybe a message saying that it doesn't work for fatal crashes.

Actual Result

The view in the console made it look like there should be a viewhierarchy or like maybe it hadn't been fully ingested yet.

Image

Product Area

Issues

Link

No response

DSN

No response

Version

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Waiting for: Product Owner

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions