Summary of our problem:
We released last week our app bundle in the Huawei AppGallery.
We used the Huawei Map Kit in order to integrate Maps. However, there seems to be a problem with map kit.
We receive the error messages:
V/HmsMapKit_MapDataVersionClient_15: build request with apiKey
D/HmsMapKit_AuthenticateClient_86: response code : 401
E/HmsMapKit_TileCache_38: startUrlRequest Identity fail, do not has permission get tile. authResult :010002
What we have done so far:
Enable mapkit in AppGallery connect
Add sha256 fingerprints of the signed bundle to the app in AppGallery conncet
Build the app with agconnect-services.json
Initializing mapkit with the api key setup on the huawei developer page
Encode the API key as below: URLEncoder.encode("", "utf-8")
Tested the rc before uploading where it worked perfectly fine
As we are having troubles in identifying the cause for our problem, it would be very helpful to get further advice.
Thank you very much in advance.
Seems to be you are.using signing by AppGallery.
If so, you have to add one more SHA-256 to project settings, which you can get from application singing settings in console
According to this Docs,It's most likely caused by the following:
When localy building apk works but store submitted apk does not work, it is most likely the signing issue.
And for App bundle signing, there are 2 ways.
AppGallery Connect generates a new signature key for your new app
App Signing allows you to upload your own signature key
NOTE
Once a signature key is generated in AppGallery Connect or uploaded by you, it cannot be modified.
so depends on the approach, you might already have a signature key that is fixed already.
and it seems in this case you have your own signature key.
when we need to use upload key to sign apk before submit to AppGallery, do not use signature key to sign for upload apk, in this case, also upload key certificate and upload key to AppGallery.
need to make sure signature key certificate and upload key certificate are correct if used.
Related
I have added "com.google.android.gms:play-services-auth:20.1.0" in my application. We are using Firebase App distribution for sharing app internally for testing. The app auto sms fetch functionality works fine when we create and APK and upload to FirebaseAppDistribution but when we upload AppBundle .aab than it never works. If i download the aab file from FirebaseAppDistribution and install it using bundletool.jar the SMS auto fetch functionality works. Initially it was showing a message something like this is signed with test certificate. Please add key to 3rd party services. I forgot to copy those keys and that message disappeared now and i cant find any certificate keys in firebase. what could be the reason or How can i fix it ? any help plz.
Im writing a flutter mobile app that requires the use of firebases authentication product which in turn requires the use of sha1. I am on a small team and to get each instance of the app to work on each persons computer we needed to register a new sha1 address per computer, this is fine for debugging purposes but obviously cant be done in production. How do you get a consistent sha1 across all the app instances so that each new user does not have to register a unique sha1?
When you generate release APK, you will be creating a key in Keystore (a private file), from which you would extract out your release SHA1 key. This would be the consistent SHA1 key for all the users downloading the app.
You just need to add this release SHA1 key in your Firebase console.
Kindly refer here for more details about building an android application in flutter: Build and release an Android app
Happy Coding :-)
On production, you will get a signing key from Google Play and you will add that to firebase and it will generate a new google-services.json file for you. you will be fine on production.
If you are releasing the app to the stores then you have to generate a key store as described here then you need to add this SHA-1 finger print in the firebase console.
To view the SHA1-1 finger print of the above generated key store then execute below command
keytool -list -v -keystore {keystore_name} -alias {alias_name}
You can see the SHA-1 finger print in the terminal and add the same in firebase console
I'm trying to to get apple sign-in with Firebase for Unity working on android.
I've followed their set-up instructions but my situation is a little more complicated than the standard, I don't want to go into details about the set up, but using the code below:
FederatedOAuthProviderData providerData = new FederatedOAuthProviderData();
providerData.ProviderId = "apple.com";
var scopes = new List<string>();
scopes.Add("email");
scopes.Add("name");
providerData.Scopes = scopes;
whenever I run either
Auth.SignInWithProviderAsync(oAuthProvider)
or
User.LinkWithProviderAsync(provider)
I get the following error:
there was an error while trying to get your package certificate hash. [client does not match api key]
Can anyone tell me exactly what this error is trying to tell me. I have accounts working for GameCenter, GooglePlay, Google and Facebook but all those use the credential flow and not the new provider one.
Cheers.
Adding more info to clarify the set-up:
There's the default app which has it's own firebase project, this is the one with the linked apps, sha-1 etc... this project provides the google-services.json.
There's an accounts firebase project with no apps associated - this firebase project has been set up to support Sign-in with Apple as well as all the other providers we support and has a link to the service ID as per the instructions.
I use the multiple projects feature in our apps creating an accounts app with
FirebaseApp.Create(accountsAppOptions, "Accounts");
Authentication is done through the Auth of this app.
Once a user successfully authenticates with the accounts auth, I mint a custom token using a cloud function and authenticate with the default app using that.
This works well for GooglePlay, GameCenter, Google, Firebase. But I'm wondering whether this flow is supported by Sign-in with apple as it stands?
Definitely make sure you're as up to date as possible with the Firebase Unity SDK. Apple Sign In support is new, so you don't want to miss any potential fixes.
Then, make sure your SHA-1 is up to date for development. If you're signing with your debug keystore, that's specific for each dev machine and can be uploaded in addition to your release keystore. Additionally, not everything requires a SHA-1, but Auth is the hotbed of SHA-1 gated features so it wouldn't be surprising if this was the missing piece of configuration.
Last, make sure you've followed all the setup steps. In particular, if you look at Configure Sign In with Apple, you'll see a link to the Android Configure Sign In with Apple page that includes a good bit of configuration that you have to do to get everything operational. Also make sure you've followed all the steps to Enable Apple as a sign-in provider. This key may not have been fully setup.
I hope this all helps, and I'd love to hear which part of this (if any) solves the issue to see if the docs could be shored up a bit!
--Patrick
I have an issue with receiving notifications on Twilio Chat with Production APN Certifications, i get the error:
Error - 52131
Invalid APNs credentials
Possible Causes
Credential (certificate and private key) is invalid.
Certificate expired.
Possible Solutions
Make sure you have valid certificate and private key provided in your Credential.
When I test my sandbox APN certifcates the push notifications work perfectly.
However when I create APN PUSH SERVICES Certification and upload these and link them to my programmable chat function I get the error message: 52131 - Invalid APNs credentials... https://www.twilio.com/console/runtime/debugger/NOf2857a6c1db54e27984dd8fa9ff5100f
Just to clarify, the push notifications work perfectly on my development project. I use a Sandbox APN certificate, and selected the Sandbox tick box
However in the production version, where I am using:
Specific APN Apple Push Services Certificate, for a unique APP ID I
get the 52131 error.
I did not tick use for sending to Sandbox credential. As it is a
push credentiual
I followed all the instructions perfectly for exporting the
certificate keys.
I also use separate API Keys and a separate Programmable chat.
I get registration of bindings but no notifications as the
certificate is invalid, which I cannot see why as I checked by regenerating a certificate many times
I read in some responses to similar issues having the Sandbox and PUSH SERVICES APN certificate in the same App ID? Or not using the same CertificateSigningRequest to generate the Sandbox and PUSH? Why would this make a difference?
This was the thread: https://github.com/twilio/voice-quickstart-objc/issues/101
Finally after several weeks of emailing Twilio support I found the answer.
Basically the issue was probably because I extracted the Keys from my distribution certificate somehow and not the Push one. So make sure you are extracting the correct keys from the correct certification. Also because I was deleting and removing the push credentials from Twilio so often the bindings to my users were pointing to old Push Credentials that did not exist, so I removed the bindings allowing new bindings to be regenerated connecting to the new Push Certificate SID.
Other things that are important for production notifications on twilio programmable chat:
Make sure your environment entitlements file is set to "production"
Don't check the sandbox option on your production certificate (of
course)
Sometimes there can be issues when creating a Push Certificate using
a certsigningrequest that was used on a sandbox certificate. Try
creating a new Cert Signing file just for production
When you test your Production notifications these will only work on an appstore build built with your distribution certificate. You cannot receive notifications on the simulator (obviously). You cannot receive notifications from an app built using development certifcate...so you need to build and upload your app to testflight to test the notifications then preferably test between two real devices...or just send notifications from the simulator to a device with an appstore/adhoc build on it
I cannot thing of anything else for now that I came across. Twilio support is very good and will try and answer your question if you need help.
Firebase created for me an API key on Google API console. There I added a restriction to make it usable only by an Android app with a specific package name and fingerprint.
However I can still use the key with a different package name (I changed the application Id for Gradle). What could be wrong?
Firebase doesn't attempt to restrict usage of Realtime Database based on the host app's application ID or signing hash. When you create a new Android app in the console, you'll notice the following text under the text field for signing key:
Required for Dynamic Links, Invites, and Google Sign-In support in
Auth. Edit SHA-1s in Settings.
These are the only Firebase features that are affected by the application ID and signing hash. The reason an application ID is require is to help the Gradle plugin match a google-services.json file to the app it was built for. It's not a security measure.
If you change your application ID in build.gradle but don't create a new app and download a new google-services.json file, your build should fail with this message:
No matching client found for package name 'your.new.package.name'