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

fix(app, android): require default firebase.json boolean key #4791

Merged
merged 1 commit into from
Jan 18, 2021

Conversation

mikehardy
Copy link
Collaborator

Description

This fixes the case where firebase.json existed but the key being
query was missing. Previously the config system would silently fail on
the missing key and return false even though the default for some keys
should be true

In particular this caused analytics auto collection to be disabled
if you had a firebase.json but no analytics_auto_collection_enabled = true entry,
even though the default should have been true

Credit to @WadhahEssam for discovery, diagnosis, and general solution

Related issues

Fixes #4784
Obsoletes #4786 (different API shape, same solution though)

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
    • Yes
  • My change supports the following platforms;
    • Android
    • iOS
  • My change includes tests;
    • e2e tests added or updated in packages/\*\*/e2e
    • jest tests added or updated in packages/\*\*/__tests__
  • I have updated TypeScript types that are affected by my change.
  • This is a breaking change;
    • Yes
    • No

Test Plan

I tested:

  • firebase.json present, key missing, default value false: got false
  • firebase.json present, key missing, default value true: got true
  • firebase.json present, key present and true, default value false: got true
  • firebase.json present, key present and false, default value true: got false

Seems to work fine although I did discover some problems and was able to break my tests - the tests I was doing were testing it and I proved it locally by toggling back and forth

the logic is not engaged if firebase.json is not present


Think react-native-firebase is great? Please consider supporting the project with any of the below:

This fixes the case where firebase.json existed but the key being
query was missing. Previously the config system would silently fail on
the missing key and return false even though the default for some keys
should be true

In particular this caused analytics auto collection to be disabled
if you had a firebase.json but no analytics_auto_collection_enabled = true entry,
even though the default should have been true

Credit to @WadhahEssam for discovery, diagnosis, and general solution
@vercel
Copy link

vercel bot commented Jan 18, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/invertase/react-native-firebase/8cxwoofco
✅ Preview: https://react-native-f-git-issue4784-android-gradle-missing-14bd02.invertase.vercel.app

@mikehardy
Copy link
Collaborator Author

As soon as this passes CI I will merge and release 10.4.2 @WadhahEssam

@mikehardy mikehardy added the Workflow: Pending Merge Waiting on CI or similar label Jan 18, 2021
@codecov
Copy link

codecov bot commented Jan 18, 2021

Codecov Report

Merging #4791 (8067b51) into master (b4fb976) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #4791   +/-   ##
=======================================
  Coverage   89.09%   89.09%           
=======================================
  Files         109      109           
  Lines        3712     3712           
  Branches      347      347           
=======================================
  Hits         3307     3307           
  Misses        363      363           
  Partials       42       42           

@mikehardy
Copy link
Collaborator Author

Actually @WadhahEssam - since I know you are watching this :-), it will be 10.5.0 because I'm going to merge the feature / minor bump to the underlying SDKs when they finish too #4792

@mikehardy mikehardy merged commit 483d9d3 into master Jan 18, 2021
@mikehardy mikehardy deleted the issue4784/android-gradle-missing-boolean branch January 18, 2021 20:54
@mikehardy mikehardy removed the Workflow: Pending Merge Waiting on CI or similar label Jan 19, 2021
hmhm2292 pushed a commit to hmhm2292/react-native-firebase that referenced this pull request Jul 13, 2021
…se#4791)

This fixes the case where firebase.json existed but the key being
query was missing. Previously the config system would silently fail on
the missing key and return false even though the default for some keys
should be true

In particular this caused analytics auto collection to be disabled
if you had a firebase.json but no analytics_auto_collection_enabled = true entry,
even though the default should have been true

Credit to @WadhahEssam for discovery, diagnosis, and general solution
androidIsForVivek pushed a commit to androidIsForVivek/react-native-firebase that referenced this pull request Aug 9, 2021
…se#4791)

This fixes the case where firebase.json existed but the key being
query was missing. Previously the config system would silently fail on
the missing key and return false even though the default for some keys
should be true

In particular this caused analytics auto collection to be disabled
if you had a firebase.json but no analytics_auto_collection_enabled = true entry,
even though the default should have been true

Credit to @WadhahEssam for discovery, diagnosis, and general solution
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[🐛] Analytics not reporting on Android
1 participant