throw PlatformException(code: errorCode, message: errorMessage as String, details: errorDetails, stacktrace: errorStacktrace); - flutter

I am getting the error when Selecting on map https://ibb.co/BgsCPnh
Using google_maps_flutter plugin on flutter project

If you get this when you are trying to add google sign-in functionality in your flutter app via using firebase make sure you enable google sign option in authentication
-if yes then try to add SHA1 key in your firebase project
for getting keys
If you are on Mac, open terminal and type the command:
keytool -list -v
-alias androiddebugkey -keystore ~/.android/debug.keystore
If you are on Windows:
keytool -list -v
-alias androiddebugkey -keystore %USERPROFILE%.android\debug.keystore

Related

error keystore.jks commend prompt keytool error: java.security.NoSuchAlgorithmException: RAS KeyPairGenerator not available

Hi I encountered this error when trying to configure the keystory file for the coin apk file in android studio by commend prompt
C:\Users\deuts>keytool -genkey -alias key0 -v -keystore "C:\Users\deuts\Downloads\keystore.jks" -keyalg RAS -validity 36525
Enter keystore password:
Re-enter new password:
keytool error: java.security.NoSuchAlgorithmException: RAS KeyPairGenerator not available
java.security.NoSuchAlgorithmException: RAS KeyPairGenerator not available
at java.base/java.security.KeyPairGenerator.getInstance(KeyPairGenerator.java:236)
at java.base/sun.security.tools.keytool.CertAndKeyGen.<init>(CertAndKeyGen.java:104)
at java.base/sun.security.tools.keytool.Main.doGenKeyPair(Main.java:1919)
at java.base/sun.security.tools.keytool.Main.doCommands(Main.java:1163)
at java.base/sun.security.tools.keytool.Main.run(Main.java:412)
at java.base/sun.security.tools.keytool.Main.main(Main.java:405)
enter image description here
I searched on Google and did not find anything I came across your site and found that you provide answers I hope to find a solution here

SHA certificate fingerprints | Flutter

I got SHA-256, SHA1 fingerprint using this command
keytool -list -v -keystore "C:\Users\asd\.android\debug.keystore" -alias android
debugkey -storepass android -keypass android
Now, I want to get SHA-256, SHA1 again.
when I use above command again it ask
Enter keystore password:
How to get SHA-256, SHA1 fingerprint ?
Use 'android' as password. Since you set the password as android in the command you executed.

Login Screen won't connect to Firebase Authentication

I am trying to connect Firebase to my Login Page in Flutter, but I cannot connect because of the following errors:
Ignoring header X-Firebase-Locale because its value was null.
Notifying id token listeners about user ( e3OIktY1XafU7ddf5yMgALiA69c2 ).
What does it mean and How can I fix this? Appreciate if someone can advise. Thank you in advance!
Go to the project folder in the terminal.
run this comands and it will give you SHA-1 for debug and release. you will take that and add in user and permission in firebase console in the project. finally rebuild the project again
for Mac: keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
for Windows: keytool -list -v -keystore "\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
for Linux: keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android

Keystore file doesn't exist. Unable to get SHA1 key

Unable to get SHA1 key, it is showing error about path, Keystore file doesn't exist.
Tried multiple numbers of solutions,
I am using the following command
keytool -list -v -keystore c:\users\your_user_name\.android\debug.keystore -alias androiddebugkey -storepass android -keypass android
The keystore file does not exists, you have to create it yourself.
Here is the procedure : Generate android release and debug keystores
I had the same problem but I tried below command and interestingly it worked for me under Windows 10.
keytool -list -keystore debug.keystore

delete a cert from a truststore when the alias has unusual characters (?)

Using keytool from the command-line, I added a new cert to a store. But the anger-inducing window manager that I find myself currently stuck with manages to fail at cut-and-paste, and replaced one of the characters of the alias with a ? character. How do I change or delete that alias?
keytool -list -keystore truststore
Enter keystore password:
Keystore type: JKS
Keystore provider: SUN
Your keystore contains 4 entries
hail.ucc.nau.edu:8636-cert-1?, Dec 1, 2017, trustedCertEntry,
.....
keytool -delete -keystore truststore -alias 'hail.ucc.nau.edu:8636-cert-1?'
Enter keystore password:
keytool error: java.lang.Exception: Alias <hail.ucc.nau.edu:8636-cert-1?> does not exist
.....
keytool -delete -keystore truststore -alias 'hail.ucc.nau.edu:8636-cert-1\?'
Enter keystore password:
keytool error: java.lang.Exception: Alias <hail.ucc.nau.edu:8636-cert-1\?> does not exist
.....
keytool -delete -keystore truststore -alias 'hail.ucc.nau.edu:8636-cert-1'
Enter keystore password:
keytool error: java.lang.Exception: Alias <hail.ucc.nau.edu:8636-cert-1> does not exist
Thanks for any assistance,
- rob.
The special character you are seeing, may not be that actual character as suggested by #Pavel Lechev in the comment. If the keytool delete doesn't work, you can use the KeyStore Explorer software to do it. It has nice GUI providing all the keytool functionalities.
Or you could write a small tool/class using KeyStore api to delete your unwanted alias. You could list out all the aliases, identify it, and delete it (to identify the alias, you could do startsWith()).