Will preventing AD_ID permission to be merged affect Firebase functionality? - firebase

So we were about to submit our app for review but we were stopped by Google's new requirement for apps targeting Android 13 and above, which basically tells developers to disclose the purpose of AD_ID permission in their app. The thing is, our app doesn't declare the AD_ID permission explicitly, but it turns out some play-services lib or Firebase uses it and thus, it has been merged to our app's manifest.
So I found some solutions so that a permission declared by a library will not be merged to an app's manifest, but my fear is that our app's functionality that depends on Firebase might stop working. Has anyone faced this situation?

If you've disabled collection already, removing the AD_ID permission is unlikely to cause problems. See: https://github.com/firebase/firebase-android-sdk/issues/2582
Disable collection:
<meta-data android:name="google_analytics_adid_collection_enabled" android:value="false" />
Remove permission:
<uses-permission android:name="com.google.android.gms.permission.AD_ID" tools:node="remove" />

Related

React Native - Dynamic link not persisting through install process

I have a small React Native app for which I have a series of Firebase dynamic links. When the app is installed, the links work perfectly in directing users to the relevant screen defined in the dynamic link
However, if the user does not have the app installed when the dynamic link is followed, the route defined in the dynamic link does not persist.
Is it possible to persist the deep link during the installation process?
I've tried a basic deep link URL like https://fakedomain.org/upload as well as using the ?link=https://fakedomain.org/upload param and neither seem to work.
To answer your question, it is possible to persist the link after installs but it won't be %100 successful because of some limitations on the iOS side. You can check the flowcharts in here
There could be a couple of reasons for it not to work after the app installation. Since no code is provided I'll assume you are listening to the dynamic link with onLink for the app's active state and checking the initial link with getInitialLink when your app is in the quit state.
Persisting the link after app installation involves the clipboard in iOS so make sure the problem is not related to new iOS 16 copy/paste permissions.
Your navigation library might be trying to navigate to the route from the link before your navigation stack is initialized.
If the problem occurs only in one platform it might indicate a problem in your native setup like maybe related to LinkingManager etc.
If you are using a custom domain, you should double check your Associated Domains and AndroidManifest settings.

Firebase page.link reported in Play console with domain failed validation, deep links not working - how to verify ownership?

I am getting this error message, and don't understand what I need to do to fix. How do I verify ownership of a Firebase deep link?
Deep links not working
Users will not go directly to your app from links associated with this path, but will see the app picker or be directed to the web browser. Once you have fixed these issues and published a new version, users need to update their app before the links will work.
FIX DOMAIN ISSUES
error
1 domain failed validation
brightness_1
Fix domain issues by verifying ownership of web links associated with this path
Get SHA256 Hash from release key file. You can also find sha256_cert_fingerprints from above assetlinks.json.
Go to the firebase console, select your project, add the SHA 256 key.
Open your dynamics link domain - https://xxxx.page.link/.well-known/assetlinks.json
Upload new version. It will work.

I no longer need my default site in my Firebase Project

Firebase hosting allows us to create multiple sites under a single hosting account, which is awesome. After extensive work, I am satisfied with my 2nd site that I created under my project, and no longer need the default site (circle in red).
Sense the default site can't be deleted by default in the browser, is there a way To either delete it, redirect it to another site in the same project, or disable it so that its not publicly visible on the web, all from the CLI command line?
I have red the guides, and I have tried...
adding targets to my configuration file
running the following command line: firebase hosting:delete <default site>
but no luck.
What have people done in this situation?
Firstly you will have to disable the the site then only you will see the delete action.
You could run firebase hosting: disable through the firebase-tools CLI first. Then you will see a delete action under "three vertical dots".

Why do I keep receiving an error when initializing my firebase project while setting up firestore?

I am learning how to set up and host a webpage through firebase, and when I attempt to initialize the project (by running firebase init in the firebase CLI) every time I reach the firestore setup portion, it always results in the same error.
It looks like you haven't used Cloud Firestore in this project before. Go to https://console.firebase.google.com/project/resume-site-599bc/firestore to create your Cloud Firestore database
When I copy and paste the link, it brings me to the firebase console page and says "your action was forbidden" no matter what I do. I have tried to go into the console settings and made sure all of the correct APIs are enabled. But there seems to be little help when I tried googling the issue.
Thank you.
I had the very same and error and fixed it with #MS29's method. More verbose for simplicity:
In the Firebase Dashboard, go to Project Settings -> General
Set "Default GCP resource location" again.
After that, the Firestore can be found again.
So even though I already had the project created and I created my Firestore database, my: Default GCP resource location didn't select properly when creating the project. Once I fixed this, it had no problem connecting to my database.
I've faced the same problem with Angular 14.2.0 and firebase 19.14. The solution for me was as follow:
I've checked the project list by using firebase cli:
firebase projects:list
There I noticed that the Resource Location ID wasn't set for any reasons. So I opened the settings of my firebase-project using the console (https://console.firebase.google.com/) and on project settings tab u can set the GCP. That's it
Look like you haven't create project on your firebase account
So firebase ask you go into the link to create project.
For the problem of "your action was forbidden",
it seem to be the problem of multi google accounts.
Google still work quite bad on multi accounts sometime.
You can try access the google firebase console main page by the link below.
https://console.firebase.google.com/u/0/
https://console.firebase.google.com/u/1/
The last number is the number of user. You can change it if you have many google accounts.
P.S. The user order will change if you logout.
Most likely that you don't have the project created in firebase. Either create a new project by going to
https://firebase.corp.google.com/u/0/
or enable Firebase for an existing GCP project by choosing that project in the add project page
it's happening same to me too, but in my case:
I already created the database at Firestore Cloud *at their website
for now I'm still troubled with it, if I have solution.
#update
hello, I'm in bandwagon when it comes to this problem: [firebase init firestore not work with existing project]
I'm using firebase CLI version 10.6.0
but somehow I manage to deal with it, here's my solution/timeline:
I install using firebase login --no-localhost because encounter problems with firebase login
encountered with errors: cannot install firestore but hosting part can.
try to reset database, created again but still get error: cannot install firestore
then I logout, then login using ONLY firebase login, not the firebase login --no-localhost
bang! solved!
hope it helps~

Action URL changing based on ActionCode settings when sending passwordless login email

I have 2 frontend interfaces for my firebase project (both housed in the same firebase app in the backend). One is web and one is for iOS.
I'm trying to create passwordless sign-in functionality for the iOS app and have gone through all setup guides regarding setting up dynamic links, custom domains etc.
I have gotten to the point where both the web and iOS apps can both send the email successfully, however the root domain changes between the emails sent from each platform. An example is below:
Web App: Sends login email via firebase.auth().sendSignInLinkToEmail and the resulting root domain in the email is https://app.domainname.com (this is correct and is what is set up as a whitelisted domain/dynamic link domain in firebase)
iOS App: Using the same function, the resulting root domain is https://domainname.com (incorrect). This results in the link going to the non-firebase, generic website and breaking the flow.
If I add the app subdomain back to the link generated by the iOS email, the dynamic link does then work, so the issue seems to be isolated to this root domain change specifically.
Upon further investigation, the issue seems to be related to the action code settings.
When the iOS.bundleId property is set, or handleCodeInApp is true, the incorrect root domain is used. This is true for either the web app or the iOS app.
I have done a project find on domainname.com in both projects (my iOS app is an ejected expo app so the search included Xcode files for this one) and can't find any instance of the subdomain being missing in either codebase (or the backend codebase for that matter) and am therefore at a loss.
I've looked throughout my firebase settings and can't find any instance of the incorrect one appearing, but am unaware of a search functionality on the platform to be certain. The Action URL (%LINK%) setting in Authentication->Templates appears to be the correct URL.
I am hoping to get to the point where irrespective of the action code settings, the same, correct root domain is used. I assume this is a configuration issue but am at a total loss about how to resolve it, so any help would be appreciated.
For reference, the action code settings in use are below:
var actionCodeSettings = {
url: 'https://app.domainname.com',
iOS: {
bundleId: 'com.domainname.app'
},
handleCodeInApp: true
}
Thanks!
In case anyone finds this in the future, it turned out for me that the issue was due to a combination of an undocumented lack of support for custom domains in dynamic links in react-native-firebase, alongside the fact that the library will only send the email links using the first selected domain in your Firebase Dynamic Links settings.
At the time of writing, the solution was to simply delete all other domains from my Dynamic Links settings, leaving only PROJECTNAME.page.link, so that this was the one that got used by the library. From there everything worked as expected.

Resources