Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attachScreenshot: true still takes screenshots even when enabled: false #3317

Closed
5 tasks done
liamjones opened this issue Oct 2, 2023 · 2 comments · Fixed by #3333
Closed
5 tasks done

attachScreenshot: true still takes screenshots even when enabled: false #3317

liamjones opened this issue Oct 2, 2023 · 2 comments · Fixed by #3333

Comments

@liamjones
Copy link
Contributor

Platform:

  • iOS
  • Android

SDK:

  • @sentry/react-native (>= 1.0.0)

SDK version: 5.9.2

react-native version: 0.71.13

Are you using Expo?

  • No

Are you using sentry.io or on-premise?

  • sentry.io (SaaS)

If you are using sentry.io, please post a link to your issue so we can take a look:

N/A

Configuration:

(@sentry/react-native)

Sentry.init({
  dsn: 'https://[email protected]/4505951781191680',
  enabled: false,
  attachScreenshot: true,
});

I have following issue:

[Description]

Steps to reproduce:

  • Configure Sentry with attachScreenshot: true and enabled: false.
  • Connect debugger and set breakpoints in 'take screenshot' functions of Android/iOS native modules
  • Call Sentry.captureException()

Actual result:

Breakpoints hit as native modules try to capture a screenshot

Expected result:

Screenshots not taken as no reporting is going to happen

@krystofwoldrich
Copy link
Member

Hi, thank you for the information,
I agree, I would also expect the screenshot not to be taken when the SDK is disabled.

@krystofwoldrich
Copy link
Member

This is caused by the Screenshot integration being hooked to captureException and not using the event processor.

return Screenshot.attachScreenshotToEventHint(hint, this._options).then(hintWithScreenshot =>

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

Successfully merging a pull request may close this issue.

2 participants