Skip to content

Unity SDK sends screenshot when the event is dropped via BeforeSend #2641

@rodolfoBee

Description

@rodolfoBee

SDK Version

4.1.0+111a23511e96e576f1ffc7583b6cabd3b46f7b35

Unity Version

NA

Platform

  • Editor
  • Mobile (Android, iOS)
  • Desktop (Windows, macOS, Linux)
  • WebGL
  • Console

Sentry Environment

Sentry SaaS (sentry.io)

Other Error Monitoring Solution

No

Steps to Reproduce

  1. Enable screenshots in the SDK: https://docs.sentry.io/platforms/unity/enriching-events/screenshots/
  2. Filter the error event in BeforeSend: https://docs.sentry.io/platforms/unity/configuration/filtering/#using-before-send

Expected vs Actual Result

Expected result: as screenshots are only sent as an attachment to errors, if the error is dropped by the SDK for any reason, the screenshot should also be dropped.

Actual result: the SDK sends the screenshot, which is accepted by the server but not visible and consumes available attachment quota for the organisation.

Additionally, the server can handle this in the server side: if the event for an attachment is not stored, the attachment is discarded.

Metadata

Metadata

Assignees

Labels

Attachmentsissue relates to attachments, i.e. screenshots, view hierarchy, file attachmentsBugsomething isn't working as it shouldUnityplatform label
No fields configured for issues without a type.

Projects

Status

No status

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions