Skip to content

Data leaks after enabling and then disabling Analytics #5837

@uson1x

Description

@uson1x

[REQUIRED] Step 1: Describe your environment

  • Xcode version: Version 11.5 (11E608c)
  • Firebase SDK version: 6.26.0
  • Firebase Component: Analytics or Core
  • Component version: 6.26.0
  • Installation method: CocoaPods

[REQUIRED] Step 2: Describe the problem

In our app we want to dynamically turn on/off Firebase Analytics.
Some of our clients don't want any information to be sent to third-parties.
Some clients are ok with that. And we want to keep Firebase Analytics enabled for those.

We tried to implement such cut-off disabling functionality. But in our tests, if you first configure FIRApp+enable analytics and then disable+delete the FIRApp, some information is still sent to firebaselogging-pa.googleapis.com/app-measurement.com.

Is that a bug? Is there more reliable way to dynamically enable/disable Firebase/Analytics?

Thank you!

Steps to reproduce:

  1. Enable Analytics and configure the app
Analytics.setAnalyticsCollectionEnabled(true)
FirebaseApp.configure()
FirebaseApp.app()?.isDataCollectionDefaultEnabled = true
  1. Disable analytics and delete the app
Analytics.resetAnalyticsData()
Analytics.setAnalyticsCollectionEnabled(false)
FirebaseApp.app()?.isDataCollectionDefaultEnabled = false
FirebaseApp.app()?.delete({ (success) in  })
  1. Go to home screen.
  2. In network traffic I see requests like
    GET https://app-measurement.com/config/app/1:<some_id>:ios:<some_id>?platform=ios&app_instance_id=<some_id>&gmp_version=60600 HTTP/2.0
    or
    POST https://firebaselogging-pa.googleapis.com/v1/firelog/legacy/batchlog HTTP/2.0
    with a long body.

We also have FirebaseScreenReportingEnabled: NO set in our app's .plist file.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions