Problem deploying project on Firebase with Stripe - firebase

I'm trying to deploy my app that has the stripe payment extension installed. Everything works fine on the emulator (I am not using stripe for the moment) but when I try to deploy everything looks ok except deploy fails with this message:
Error: firestore-stripe-payments: Found
'projects/1234/secrets/ext-firestore-stripe-payments-STRIPE_API_KEY/versions/1'
for secret param STRIPE_API_KEY, but this instance was previously
using a different secret
projects/1234/secrets/firestore-stripe-payments-STRIPE_API_KEY.
Changing secrets is not supported. If you want to change the value of
this secret, use a new version of
projects/1234/secrets/firestore-stripe-payments-STRIPE_API_KEY.You
can create a new version at
https://console.cloud.google.com/security/secret-manager?project=1234
So I go to the link without knowing how my emulator API key works compared to the production one ( I didn't activated the Stripe account ). Here I find two keys, one is firestore-stripe-payments-STRIPE_API_KEY and the other one is ext-firestore-stripe-payments-STRIPE_API_KEY. When I click to make a new version it asks for a file with a secret.
So my main problem is: do I need to change version of both two secrets or only one? Second problem is where do I find those keys and does the test API key work on deployment?
Am I missing something here, am I on the right path?

Related

Creating an app variant in a firebase unity project

I have en existing app (e.g com.company.app1)made in Unity, that occasionally pulls content from firebase in the live environment (after being built).
Now I am trying to make a second build, with a different project id (com.company.app2). This second build does not use firebase after being built - it loads data from firebase before being built, and therefore already contains the needed data.
I have added com.company.app2 as a second android app in my firebase configuration, but when trying to install the resulting app2.apk there's a clash between it and the existing installed app1.apk.
Below is the error Unity is showing when I press it's "Build and Run" button.
stderr[
adb: failed to install C:\Users\*\*\*\*\app2.apk: Failure [INSTALL_FAILED_CONFLICTING_PROVIDER: Scanning Failed.:
Can't install because provider name
com.company.app1.firebaseinitprovider (in package com.company.app2) is already used by com.company.app1]
]
My question is, how can I change the provider name in app2 so both app1 and app2 can coexist on the same device?
(I need to interface with firebase shortly before building, so I can't just remove the SDK).
Alright, so I ended up just removing the SDK, that works.
Sorry to anyone who has some similar problem.

Firebase distribution for iOS

We are develop an iOS app using react-native. And every time there is an update from developer, developer need to build and install on QA phone for testing.
Now, I am trying to use fastlane and firebase app distribution, to distribute new app for QA.
When I create new release, QA got an email notification about that, and they can check it on firebase app distribution. But there is no button for download and install, only message like this.
Device registered!
The developer now needs to update their app to run on your device. You'll get an email when the app is ready to test.
How to make it available to download?
Finally,
For release iOS app to firebase app distribution, you need to generate ad-hoc.
First, u need to create a profiles ad hoc key, u can create it on apple developer or use fastlane to generate it. Then save it inside your project.
Second, set export method inside build app to be ad-hoc.
Third, use get_provisioning_profile to get your profile ad hoc key.
I believe this is very likely because your version is already the same (I think it happened to me recently). Try updating your minor version of the app. (If you are not able to do this for some reason, you can just delete existing build and upload a new one).

Firebase Hosting and Github Action error "auth/invalid-api-key"

I'm using React for my project along with Firebase. Using Github Actions my code is successfully deployed to firebase.
But when I visit the hosted URL It gives me an error in the console saying
"Your API key is invalid, please check you have copied it correctly."
However when I deploy from the local system directly using firebase deploy It works fine.
I have taken the required care of my environment variables. But nothing seems to work.
It seems there is some problem while GitHub actions deploy the changes to firebase. Though all the build pass it gives me an error as stated above. Please Help.
This happen because GitHub actions don't have access to your .env on your local machine, you need to configure that on "GitHub Secrets" and put on your yml file.

how to solve code 10, message 10: with google signing option

enter image description here
Hello guys, i just created my first app, and when emulated worked perfectly, but when i build the apk release file, i get this toast code 10, message 10:, i know there are the same questions but and i have tried to solve the problem using the solutions in previos posts, but no result, i have changed the SHA1 many times, donloaded json files many times, re installed the app, and erased the google account, none of that worked, the issue is only with google signing option, whe using the email option it works fine, i am using
implementation 'com.firebaseui:firebase-ui-auth:4.3.1'
implementation 'com.google.firebase:firebase-auth:19.2.0'
If you are using app signing by Google Play, you need to make sure that you add the SHA-1 fingerprint from the Google Play Console to your list of Firebase fingerprints.
After you have uploaded your app to the play store, go to your Google Play Console, select your app, and under Release Management, select App signing:
On that screen, you can find the SHA-1 fingerprint in the App signing certificate section. Copy and paste that into your Firestore fingerprintes (Firebase Console -> Project -> General Settings).
Onc you add it, it may take a few minutes to take effect but this fixed the issue for me.

The custom token corresponds to a different audience

I'm using firebase for authentication on my app, while developing I created a firebase project which I was using for that purpose, but now I've to sync it with another app. So on updating my google-services.json I'm getting the below error and am not able to connect to firebase.
The custom token corresponds to a different audience. [App ID does not match requested prject.]
How can I migrate my project to another one??
Try clearing the app data, it may be loading something from storage which is related to the other project.
I finally got the app working, basically firebase does not allow two projects with similar configuration. So in my case the test project I created while development had SHA key of my app configured, becasue of which I was getting the error.
I deleted that key and the conflict got resolved.
This is mainly in cases when you're using modules like Authentication where SHA key is used to identify the app.

Resources