React native Google Signin Fail When i will build release apk - reactjs

I will signin with google it's working but whenever I'll create release build it not working
GoogleErrorcode : DEVELOPERERROR

Please check if Google Play App Signing is enabled from the Google Play Console -> Release Management -> App Signing.
Please try below steps:
1] You have to copy the SHA1 from the 'App signing certificate' section and need to add it to the Firebase projects general settings section.
2] Afterward need to regenerate the json file and add it to the project.
3] Re-generate the apk and the error will get resolved.

If folks are still having this issue and have stumbled across this as i did. Here's what i figured out for my react native android firebase project
THERE ARE MULTIPLE SHA-1's TO ADD IN FIREBASE
1. SHA-1 For Release Variant
This is found in the Keystore file. You would have to add it to your Firebase Console Project Settings
a. Get release variant SHA-1 by running command below from you RN project root
$ cd android && ./gradlew signingReport
b. Add the release SHA-1 from here to your Firebase Console Project Settings
2.SHA-1 After you upload to google play store for testing / prod rollout
a .SHA-1 is found in the left nav of your google playstore console.
Setup -> App signing -> App signing key certificate
b. Add this to your Firebase Console Project Settings
for google sign in to work in testing / prod

Solved by adding release keystore SHA-1 to firebase console.
Use below command to create release SHA-1 and Add it to firebase console:
keytool -list -v -keystore {keystore_name} -alias {alias_name}
Note : Apk not need to create again.

Yesterday same problem occurred to me.
Google has released a new signing service in playstore publish console in which google will signin your app with his keystore. After signing , it will give you a new SHA which you have to add in your firebase account.
see the image for the better understanding
enter image description here

I have got a solution to this problem.
You have to put both SHA key i.e. SHA for debug Keystore file and SHA for release jks file, into the firebase project setting.
Go to: https://console.firebase.google.com/
Now choose your project
Click the setting button near Project Overview
Choose Project Setting
Enter both SHA1 (debug SHA1 and release SHA1) in SHA certificate fingerprint
Save it
Download the google-services.json file
Run npx react-native run-android --variant=release in terminal
It worked for me very well.

After than many time trying i got the solution.
In GoogleSignin.configure i was place android client it, that why i getting the error
Finally i will place the web client id(Here)
GoogleSignin.configure({
iosClientId: 'client ID',
webClientId: 'My Web client ID'
})

There is a new signing service from Google in the Playstore publish console, in which Google will sign your app with his keystore. After signing, it will give you a new SHA, which you need to connect to your Firebase account.
Go to Google play store ->
Release -> Setup -> App Integrity
Copy: SHA-1 certificate fingerprint from "App signing key certificate"
Add this into Firebase Project
Project Setting -> Select your app -> Add Fingerprints and Paste it here

Related

GSI_Logger Given origin is not allowed in Electron + React application

Being kinda new to React and everything clientside related, I am trying to build a Electron application with React.
At this point I can't tell if that's a good idea, but I wanted to try it.
Currently it works fine (see Github).
However I now wanted to add #react-oauth/google to give users the option to sign into their Google Account to allow the application to access their google drive and I'm struggling with that.
See the testing_auth_2 branch for that.
I enabled the drive-api in GCP and created credentials for a web application, adding http://localhost and http://localhost:3000 as authorised Javascript origins.
Now it works, but only when I start it as a webpage (npm start in my Github)
Starting it as an electron app failes, probably because electron doesnt run under localhost somehow (npm run electron:dev in my github code).
I tried creating Desktop and ios credentials since those dont ned authorised origins but the error persists.
Steps to recreate:
Enable drive api and create credentials in GCP
clone git#github.com:Urr4/electron-archive.git
checkout testing_auth_2 branch
Replace XXX in index.tsx with the client_id
The Google login should work using npm start, but not using npm run electron:dev
Any help is appreciated

firebase deployment after redirect below page

enter image description here
I want to host my app on firebase.
I followed these steps.
npm run build and it created build folder
firebase init, select hosting,
What do you want to use as your public directory? build
Configure as a single-page app (rewrite all URLs to /index.html)?
Yes
File build/index.html already exists. Overwrite? No
and then finally firebase deploy
after some time I see files uploaded successfully and in the firebase hosting dashboard it shows files uploaded something like 727. but the app looks something like a welcome message "Welcome Firebase Hosting Setup Complete. You're seeing this because you've successfully set up Firebase Hosting. Now it's time to go build something extraordinary!"
however, if I create a react app using create-react-app, and follow the same steps, it's working fine at the same URL and host. it displays the app at once without a problem.
my firebase.json
Firsty once you deploy it try viewing it on incognito mode as sometimes due to the cache it renders the same page
now still if you have errors follow this steps given in the link I followed this and got mine online
https://www.youtube.com/watch?v=IDHfvpsYShs&t=337s

Create internal testing release error when upload App bundles to google play

I send Android build with build hint android.appBundle=true.
And upload the aab file to google play for creating internal testing release with the option "Let Google manage and protect your app signing key (recommended)".
But I get the error "The Android App Bundle was not signed."
I also try "Export and upload a key from Java keystore" option but still failed with the same error.
Thanks.
Did you create an Android Certificate before creating the build?
If you don't create a certificate we print a warning but let you send a debug build. This probably won't work for Google Play though.

Problems when updating PWA app built with PWA2APK on Google Play

I have used PWA2APK to upload the first version of my React app to Google Play. It worked great. But every time I try to update the app by uploading a new version, I get the following:
You uploaded an APK that is not signed with the upload certificate. You must use the same certificate. The upload certificate has fingerprint:
SHA1: *******************
and the certificate used to sign the APK you uploaded has fingerprint:
SHA1: **********************
Your APK or Android App Bundle needs to have the package name ****(name_of_previous_version)****.
You need to use a different version code for your APK or Android App Bundle because you already have one with version code 1.
Here's the steps I've been following:
For the first version: paste url to PWA2APK and download APK file. change well-know directory with the SHA from Google Play. Upload first version APK to Google Play. All is good.
Then, when I need to release a newer version of the app: change all of my files, paste url to PWA2APK. Change well-know file again (which this time has a new package_name). Download APK and try to upload to Google Play. That's when the above error shows.
Am I following the right procedure?
Should I just change the package_name to be the same as the previous version?
Does the downloaded APK file need to have its name changed before being uploaded to Google Play?
And by the way, The Google Play console tells me that Google is managing my app signing key.
The package name needs to be exactly the same as the previous versions
Your app needs to be signed as a release app and and have the same signing certificate used to sign it.
Seeing that you are using an online converter, this is probably the problem as it is generating you different package names and certificates.

deploy web application to google app engine on travis-ci - travis is asking for a password

I´m trying to deploy a web application to google app engine after successful build(I´m using maven on my project) and travis-ci is asking for my password. How can I input my password or specify somewhere else?
Based on the limited information you are giving us, I am guessing this is happening during the gcloud preview app deploy call.
Typically the docker TLS Verification will need a local public key for a Cert and this requires a passcode response. This situation can be avoided by providing the cert using the travis encrypt-file api and calling gcloud auth activate-service-account during the build. see gloud cli here
Please see the travis yml here for a full example
As always, post questions either here or github for additional walk-through questions.

Resources