Huawei sign in failed with status code 28 - huawei-mobile-services

Even though I used last sdk, Huawei sign failed with status code 28. What causes this error?

Error 6003 indicates that this fault is caused by an incorrect signing certificate fingerprint.
You could:
Ensure that the app’s certificate signature is the same as that configured in AppGallery Connect.
.Open the APK file of the app, extract the META-INF directory from the
file, obtain the CERT.RSA file in the directory, and run the keytool
-printcert -file META-INF/CERT.RSA command to display the signature certificate information.
.Check the SHA-256 certificate fingerprint configured in AppGallery
Connect by referring to Configuring the Signing Certificate
Fingerprint. If the information is the same as the preceding
information displayed, the certificate fingerprint is correct.
2.Ensure that the appid parameter in the manifest file is correct.
You can perform the check in either of the following ways: View the
parameter directly in the manifest file under the project. Decompile
the packaged APK file, and view the parameter. You can use any
decompliation tool for that.
Check whether the app is hardened or re-signed.
Check whether HUAWEI App Signing is enabled. According to the official document, if the service is enabled, the generated certificate fingerprint must be added in AppGallery Connect.

About Error Code 6003, you are advised to check whether the appid is the same as the appid on AppGalleryConnect.
Ensure that the certificate fingerprint has been configured, and the certificate for packing the signature on the local client is the same as the certificate for configuring the fingerprint in AppGallery Connect. And the JSON file is stored in the project-level directory instead of the application-level directory, check the following items configuration process carefully.
1.Check whether the fingerprint certificate is correctly configured when you apply for related services. Open the APK file of an app, extract the META-INF directory from the file, obtain the CERT.RSA file in the directory, and run the keytool -printcert -file META-INF/CERT.RSA command to print the signature certificate information.
2.HMS Core (APK) will cache the signature file. You need to find HMS Core (APK) on the Apps page of your device and clear its cache, restart your app, and perform the previous operation again.
3.Sign in to AppGallery Connect, click My apps. On the page that is displayed, go to Develop > Project settings > conventional, check whether SHA-256 certificate fingerprint is consistent with the fingerprint in step 1.

Related

How to generate the signing certificate fingerprint of phone app on HarmonyOS watch to be communicated with?

I have a problem getting the signing certificate fingerprint for my Android app for the communication between phone and Huawei GT2 Pro that is a HarmonyOS watch. I follow the instruction of Wear Engine SDK integration process at the Huawei developer website (https://developer.huawei.com/consumer/en/doc/development/connectivity-Guides/service-introduction-0000000000018585) to develop my app on both phone and watch. However, it is not very clear to me how to generate the signing certificate fingerprint. Can someone help to describe the process?
Assume you are at the debug stage. You need use the debug certificate, i.e., the .cer certificate that you obtain in AppGallery Connect (AGC) to generate the signing certificate fingerprint. Here is the procedure:
Step 1 – use Huawei DevEco Studio to generate a key store (in p12 format) and a certificate signing request file (.csr);
Step 2- login your Huawei account on AGC, and use the .csr file to apply and download the debug .cer certificate file from the Certificate management that is under the Users and permissions on AGC;
Step 3 – open the .cer file and copy information in the last paragraph to the new text .cer file, and then open the new .cer file and click Details, then Public key to obtain the pubKey;
Step 4 - use a 3rd party online tool tomeko.net to encode the pubKey to base64 format, finally the base64Encode(pubKey) is the signing certificate fingerprint. You can find the detail of pubKey and base64 generation in https://developer.huawei.com/consumer/en/doc/development/connectivity-Guides/signature-0000001053969657.

I can't figure out any other possible reason. can you help me?

When I integrate the HMS Core SDK into my app or game, result code 6003 is
always returned during an API call. The official document indicates that this fault is caused by an incorrect signing certificate fingerprint. But I have checked that the app's certificate signature is the same as that configured in AppGallery Connect.
Official document
Step 1: Ensure that the app's certificate signature is the same as that configured in AppGallery Connect.
Open the APK file of the app, extract the META-INF directory from the file, obtain the CERT.RSA file in the directory, and run the keytool -printcert -file META-INF/CERT.RSA command to display the signature certificate information.
Check the SHA-256 certificate fingerprint configured in AppGallery Connect by referring to Configuring the Signing Certificate Fingerprint. If the information is the same as the preceding information displayed, the certificate fingerprint is correct.
Step 2: Ensure that the appid parameter in the manifest file is correct.
You can perform the check in either of the following ways:
• View the parameter directly in the manifest file under the project.
• Decompile the packaged APK file, and view the parameter. You can use any decompliation tool for that.
Step 3: Check whether the app is hardened or re-signed.
Since AppGallery Connect does not re-sign an app currently, you need to locate the fault if your app has been hardened or re-signed by yourself.
Step 4: Check whether HUAWEI App Signing is enabled.
Huawei provides the App Signing service for developers to let Huawei host their app's signature key and use it for the APK file to be distributed.
According to the official document, if the service is enabled, the generated certificate fingerprint must be added in AppGallery Connect.

Code Signing on Mac "error: The specified item could not be found in the keychain"

I'm attempting to sign an application on macOS Sierra, but my Developer ID certificate(s) cannot be found. Can anyone clarify what I'm doing wrong? Thank you!
Here's my flow:
I downloaded an "Application" and "Installer" Developer ID certificate from Apple
I installed both to my System keychain, they show "This certificate is valid"
I open Terminal and change directories to my application folder
I try codesign --deep --force --verbose --sign "<identity>" "<appName>" but I get the following "error: The specified item could not be found in the keychain"
Some things I've tried:
a. Using custom settings for the certificates by setting Code Signing to "Always Trust"
b. Using the certificate's entire Common Name for the identity instead of the value inside the parentheses
c. Running security find-identity -p codesigning, I get the following "Policy: Code Signing Matching identities 0 identities found Valid identities only 0 valid identities found"
d. Deleting the certificates and reinstalling them to the login keychain
You didn't mention the private key you used to generate the cert in the first place.
I purchased a new Mac Mini build machine to replace an old one. The old one had the signing certs. Just importing the signing certs downloaded from Apple didn't work, I also needed the original private key from which the certificate request was formed. So I followed https://stackoverflow.com/a/34063997/28190 to export a new keychain from the old machine, imported to a new one, and then I was able to use that.
You need to customise your `unlock-keychain' calls to point to the imported keychain.

'valid signing identity not found' Error in all profile in organizer

Code Sign error: The identity 'iPhone Developer: Person's Name (XXXXXXXX)' doesn't match any valid certificate/private key pair in the default keychain
In organizer, I click on Provision Profiles and the provision profile I downloaded. Underneath I get the warning:
A valid signing identity matching this profile could not be found in your keychain
I've looked up many, many other people that had this problem, but all seem to resolve it by deleting the cert and provision
i also tried this but same problem once
i have one profile without postfix bundle id without error
Any help most well come..........
Just check that your certificate is valid or invalid from Keychain Access
Here this type of Error occur if certificate expired.
And also set valid certificate which you want to use in Build Setting - > Code Signing Identifire of Project's Target and also Project
And at last set Identifire in Targets -> Summary -> Builde Identifile for Example com.IdentifireCertiFicateName.yourProject
i hope this help you....
your certificate process at the first time you create CSR file. from that you work on the developer provisioning profile and distribution profile. if you change the system you have to export the certficate and privatekey from keychain access -> my Certificate expand and export your certificate and privatekey file in .p12 format. install those file in your current system. after that set codesing in project and target file.

Why do I get a code sign error when I publish my app on app store?

Yesterday I tried to publish my app but I got an error:
Application failed codesign verification. The signature was invalid,
or it was not signed with an Apple submission certificate. (-19011)
This is my log:
warning: Application failed codesign verification. The signature was
invalid, or it was not signed with an Apple submission certificate.
(-19011)
Executable=/Users/IamMo/Library/Developer/Xcode/DerivedData/Jungle_Jumper-frylvnqvacnaoifljuswxrhwloju/Build/Products/Distribution-iphoneos/Jungle
Jumper.app/Jungle Jumper codesign_wrapper-0.7.10: using Apple CA for
profile evaluation Illegal entitlement key/value pair:
keychain-access-groups, {type =
mutable-small, count = 1, values = ( 0 : {contents = "5ZT9U8689K.com.RainbowMouth.junglejump"}
)} Illegal entitlement key/value pair: application-identifier,
5ZT9U8689K.com.RainbowMouth.junglejump AssertMacros:
filter_entitlements(entitlements_whitelist, entitlements_requested,
allowable_entitlements), file: codesign_wrapper.c, line: 932
- (null)
Your certificate must be a deployment certificate that is specifically designed for the App Store (so Ad-Hoc certificates won't work). You have to do these steps:
Create the deployment certificate in the provisioning portal. This can only be done by the team agent for the development account.
Download the deployment certificate to your machine (or use Xcode 4 to get the certificate). Be sure it is installed and shows up in the Xcode 4 organizer.
Go under Build Settings and change the Code Signing options for the 'release' version to point to this certificate.
If you follow these steps, you shouldn't have a code-signing error (be sure to use the validator before submitting your application as well).
As I see in your log, add an Entitlements-File to your project. To do this, right click in the left sidebar and click create file. In the appearing view select Code Signing and select the Entitlement. Press save. Next add the name of your Entitlements-File including the suffix (.plist) under the Build Settings of your configuration. (Code Signing Entitlements)
The probably most important thing is to open the Entitlements.plist and change the bool value of the only entry to "NO". That's it.
If you still have any problems, check if you selected your Distribution profile under your Release-Configuration (or which you created). Then try to archive your application und Product -> Archive. And then submit it using the organizer, it's a more powerful method than the Application Loader.