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

Make AQS resilient to background init in multi-process apps #6699

Merged
merged 2 commits into from
Feb 13, 2025

Conversation

mrober
Copy link
Contributor

@mrober mrober commented Feb 12, 2025

Make AQS resilient to background init in multi-process apps. This deals with a case where a customer manually initializes Firebase in a background thread in a multi-process app. See #6599. There is a race condition and it becomes possible for AQS to access the FirebaseApp instance before Firebase has finished initializing in that process.

This just prevents the crash. A better solution would be to use Dagger for proper dependency injection instead of relying on the Firebase Components. See https://firebase.github.io/firebase-android-sdk/best_practices/dependency_injection.

Copy link
Contributor

github-actions bot commented Feb 12, 2025

Release note changes

The following had changelogs that were modified, but did not have any unreleased entries for release notes to generate from.

Changelogs

firebase-sessions

@google-oss-bot
Copy link
Contributor

Coverage Report 1

Affected Products

  • firebase-sessions

    Overall coverage changed from 72.61% (263fbc0) to 72.39% (46d92df) by -0.22%.

    FilenameBase (263fbc0)Merge (46d92df)Diff
    SessionLifecycleService.kt81.48%78.41%-3.07%

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/1u4H9ye8z2.html

Copy link
Contributor

Test Results

 38 files   -    996   38 suites   - 996   56s ⏱️ - 33m 49s
 95 tests  -  5 794   95 ✅  -  5 772  0 💤  - 22  0 ❌ ±0 
190 runs   - 11 651  190 ✅  - 11 607  0 💤  - 44  0 ❌ ±0 

Results for commit 59e6201. ± Comparison against base commit 263fbc0.

This pull request removes 5794 tests.
com.google.android.datatransport.cct.CctBackendFactoryTest ‑ create_returnCCTBackend_WhenBackendNameIsCCT
com.google.android.datatransport.cct.CctDestinationTest ‑ cctDestination_shouldOnlySupportProtoAndJson
com.google.android.datatransport.cct.CctDestinationTest ‑ cctDestination_shouldSupportProtoAndJson
com.google.android.datatransport.cct.CctTransportBackendTest ‑ decorate_whenOffline_shouldProperlyPopulateNetworkInfo
com.google.android.datatransport.cct.CctTransportBackendTest ‑ decorate_whenOnline_shouldProperlyPopulateNetworkInfo
com.google.android.datatransport.cct.CctTransportBackendTest ‑ schedule_shouldAddCookieOnPseudonymousIds
com.google.android.datatransport.cct.CctTransportBackendTest ‑ schedule_shouldDropCookieOnMixedPseudonymousIds
com.google.android.datatransport.cct.CctTransportBackendTest ‑ send_CompressedResponseIsUncompressed
com.google.android.datatransport.cct.CctTransportBackendTest ‑ send_whenBackendRedirectsMoreThan5Times_shouldOnlyRedirect4Times
com.google.android.datatransport.cct.CctTransportBackendTest ‑ send_whenBackendRedirects_shouldCorrectlyFollowTheRedirectViaPost
…

@google-oss-bot
Copy link
Contributor

Size Report 1

Affected Products

  • firebase-sessions

    TypeBase (263fbc0)Merge (46d92df)Diff
    aar168 kB168 kB+139 B (+0.1%)
    apk (aggressive)559 kB560 kB+180 B (+0.0%)
    apk (release)5.52 MB5.52 MB+168 B (+0.0%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/mhkYNYphqZ.html

@mrober mrober enabled auto-merge (squash) February 12, 2025 22:31
@mrober mrober merged commit de93104 into main Feb 13, 2025
39 checks passed
@mrober mrober deleted the mrober/aqs-background-init branch February 13, 2025 13:46
mrober added a commit that referenced this pull request Feb 13, 2025
mrober added a commit that referenced this pull request Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants