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

No way to disable Android inegration (TempSensorBreadcrumbsIntegration), making app rejected #1129

Closed
1 of 11 tasks
fzyzcjy opened this issue Nov 12, 2022 · 6 comments
Closed
1 of 11 tasks

Comments

@fzyzcjy
Copy link
Contributor

fzyzcjy commented Nov 12, 2022

Platform:

  • Dart
  • Flutter Android or iOS
  • Flutter Web

IDE:

  • VSCode
  • IntelliJ/AS
  • XCode
  • Other, which one?

split-debug-info and obfuscate (Flutter Android or iOS) or CanvasKit (Flutter Web):

  • Enabled
  • Disabled

Platform installed with:

  • pub.dev
  • GitHub

Output of the command flutter doctor -v below:

The output goes here...

The version of the SDK (See pubspec.lock):
4.x.x


I have the following issue:

The TempSensorBreadcrumbsIntegration is reading BODY_SENSORS information (while I do not need it), and the app is rejected by stores due to reading privacy data. Therefore, I would appreciate it if there is a way to disable this integration.

The description goes here ...

Steps to reproduce:

  • Step

Actual result:

  • Actual

Expected result:

  • Result
@marandaneto
Copy link
Contributor

marandaneto commented Nov 14, 2022

@fzyzcjy you can disable it on Android directly https://docs.sentry.io/platforms/android/enriching-events/breadcrumbs/#disable-automatic-breadcrumbs
See the io.sentry.breadcrumbs.system-events entry, or enableAutoNativeBreadcrumbs on Flutter directly.
Which store is rejecting it? the temperature should not be PII.

@fzyzcjy
Copy link
Contributor Author

fzyzcjy commented Nov 14, 2022

Which store is rejecting it? the temperature should not be PII.

Tencent store (with ~1 billion target users where google play is banned). It says sentry is reading BODY_SENSORS (though I think indeed it is not), and provides this stack trace:

android.hardware.SensorManager.getSensorList(int)
android.hardware.SensorManager.getDefaultSensor(SensorManager.java:490)
io.sentry.android.core.TempSensorBreadcrumbsIntegration.register(SourceFile:9)
io.sentry.Sentry.init(SourceFile:24)
io.sentry.Sentry.init(SourceFile:6)
io.sentry.android.core.SentryAndroid.init(SourceFile:7)
io.sentry.android.core.SentryAndroid.init(SourceFile:3)
io.sentry.flutter.SentryFlutterPlugin.initNativeSdk(SourceFile:6)
io.sentry.flutter.SentryFlutterPlugin.onMethodCall(SourceFile:2)
io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(SourceFile:2)
io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(SourceFile:2)
io.flutter.embedding.engine.dart.DartMessenger.a(SourceFile:2)
io.flutter.embedding.engine.dart.DartMessenger.b(Unknown Source:0)
i.a.a.b.b.a.run(Unknown Source:12)
android.os.Handler.handleCallback(Handler.java:873)
java.lang.reflect.Method.invoke(Native Method)

@fzyzcjy
Copy link
Contributor Author

fzyzcjy commented Nov 14, 2022

See the io.sentry.breadcrumbs.system-events entry

Thanks! However, will this also remove many other types of events as well? I only want to remove that one, while other many events should still exist

@marandaneto
Copy link
Contributor

Yes, it will remove all the system events crumbs, so PhoneStateBreadcrumbsIntegration and SystemEventsBreadcrumbsIntegration won't work either, we don't have a specific flag for TempSensorBreadcrumbsIntegration, maybe we can introduce one specifically for this case if this is more of a general problem, more granular fields is fine if its needed.
You can also do this https://docs.sentry.io/platforms/flutter/native-init/
and remove the SystemEventsBreadcrumbsIntegration from the integrations list manually on the Android SDK.

@fzyzcjy
Copy link
Contributor Author

fzyzcjy commented Nov 14, 2022

Thank you. So when will we ave that flag? Looking forward to it!

@fzyzcjy
Copy link
Contributor Author

fzyzcjy commented Feb 14, 2023

maybe we can introduce one specifically for this case if this is more of a general problem, more granular fields is fine if its needed

@marandaneto Hi I am going to make a PR to introduce this when having time :)

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

No branches or pull requests

2 participants