Ionic 3 updated APK publishing failed - ionic-framework

After uploading updated APK to play store I see this error message:
enter image description here

You are trying to upload unsigned apk to play store so you are getting this error.
Please create a singed apk with your keystore or jks then upload to play tore.

Publishing Apk
Step 1. Create Keystore (keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000)
Step 2. build apk (ionic cordova build android --prod --release)
Step 3. jarsign the unsigned apk using the keystore (jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore YOU_KEYSTORE.keystore android-release-unsigned.apk YOUR_APK_NAME)
Step 4. Zipalign the unsigned apk ( /home/USER_NAME/Android/Sdk/build-tools/25.0.2/zipalign -v 4 android-release-unsigned.apk YOUR_APK_NAME.apk )

try to add a file under platforms/android called release-signing.properties. Than fill out the data. With this the apk will be signed during every build.
storeFile=../../keystore/yourkeystore.keystore
storeType=jks
keyAlias=yourAlias
keyPassword=yourPassword
storePassword=yourStorePassword
If it's still not working than you signed the apk in the play store with a different key.

If you want to update your app then you need to sign your application with keytool you used for the initial release using that only you can update your application. Please sign the unsigned apk using the previous keytool and try to upload that apk in playstore.

Thanks for your support. problem is solved now. I deleted both .jks file and release-signing.properties from dir and created unsigned apk again.
I suppose the problem is signing two times APK.

Related

gradlew signingreport missing keystore while getting sha 1 for release mode flutter apk

I was testing release mode of my app and the firebase auth is not working, so i google it and find out that i have to register SHA1 for release mode, and to get it we need keysotre file which i generated using command:
keytool -genkey -v -keystore release.keystore -alias AndroidReleaseKey -keyalg RSA -keysize 2048 -validity 10000
i was taking help of this documentaion: Click here
and THIS STACKOVERFLOW QUESTION
but now when i run ./gradlew signingreport i am getting this
i want the SHA1 key for release mode can anyone help me through it and also my android studio is not working fine so give me answers that doesn't require it.
Check Your Path c\file , And upgrade Project --flutter Upgrade or Update , After Retry.
I got it. The only mistake is that I put \ in store file path and when I use / instead it worked as I wanted.

No such signature was found on Play Console

I have some issues with the signature of my apk created in Unity. I've followed these steps:
Built the apk with the Unity Build Settings
Created a keystore with Unity Keystore Manager
Signed the apk with the following command
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore mykeystore.keystore myapk.apk alias
Aligned the signed apk with the following command:
zipalign -f -v 4 myapk.apk zipalignedapk.apk
At this point, I try loading the zipaligned apk on the Google Play Console release page, but I'm getting this error:
"You loaded an APK with a non valid signature. Error in apksigner: ERROR (Jar signer CERT.RSA): JAR signature META-INF/CERT.SF indicates the APK is signed using APK Signature Scheme v2 but no such signature was found. Signature stripped?"
Can anyone tell me what's wrong? Is there any different procedure to sign an APK for Play Console using Unity?
Thanks all.

Create ionic 3 app with Target SDK version 30 getting error in google play console

I am create my app in ionic v3 with Target SDK version 30
when i am upload my apk on google play console i am getting error
"You uploaded an APK with an invalid signature (learn more about signing). Error from apksigner: ERROR: MIN_SIG_SCHEME_FOR_TARGET_SDK_NOT_MET: Target SDK version 30 requires a minimum of signature scheme v2; the APK is not signed with this or a later signature scheme"
When i am making apk with Target SDK version 29 and upload on google play console its upload without any error
i don't no whay google give me an error
create sign in apk proccess are same in Target SDK version 30 or Target SDK version 29 same keystore and all command are same for create sign apk
My command are
ionic cordova build --release android
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore myappname.keystore app-release-unsigned.apk myapp
zipalign -v 4 app-release-unsigned.apk myappname.apk
Please Check what is wrong on about command and let me know it's argent my client are waiting a Target SDK version 30
After build for release -> jarsigner -> zipalign,
I just need these scripts. To sign the apk with APK Signature Scheme v2:
apksigner sign --ks yourkeystore.keystore yourapk.apk
To verify the signing
apksigner verify -v yourapk.apk
Solution
i am use this solution for ionic app only using cmd
After zipalign command success apply this command for conver sign apk with signature scheme v2
apksigner sign --v2-signing-enabled false --ks keystore name.keystore signapkname.apk
apksigner sign --ks keystore name.keystore signapkname.apk
apksigner sign --ks keystore name.keystore --ks-key-alias aliasname signapkname.apk
keytool -printcert -jarfile signapkname.apk
apksigner verify -v --print-certs signapkname.apk
apksigner verify -v signapkname.apk
I am using this as a quick fix hack
after the zipalign step is done :
zipalign -v 4 HelloWorld-release-unsigned.apk HelloWorld.apk
I have followed this extra step:
apksigner sign --ks app.keystore --v1-signing-enabled true --v2-signing-enabled true HelloWorld.apk
Please note : use the same password you used for the keystore file.
So now you can upload your .apk file or .aab file to play store

Upload failed in play store

I am unable to upload app into play store using ionic v1.... error is "Your uploaded apk or Android app bundle with invalid or missing signing info. you need to create a validly signed apk or Android app bundle.
Check your Keystore file and again generate your APK using valid keystore
GUIDE TO PUBLISH YOUR APPLICATION:
Step 1).
keytool -genkey -v -keystore “my-release-key.keystore “ –alias “alias_name” -keyalg RSA -keysize 2048 -validity 10000
· my-release-key.keystore: path to keystore
· example: D:\projects\path\to\your\project\KeystoreName.keystore
· “alias_name” : Name of your project
Step 2).
ionic cordova build --release android
Step 3).
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore D:\project\path\to\your\project/keystoreName.keystore D:\projects\path\to\your\project\platforms\android\app\build\outputs\apk\debug\app-debug.apk alias_name
Step 4). inside your sdk buildtool folder
zipalign -v 4 D:\projects\path\to\your\project\platforms\android\app\build\outputs\apk\debug\app-debug.apk D:\projects\path\to\your\project\platforms\android\app\build\outputs\apk\debug\Zipalign.apk

If keytool command was successful, do we need to do jarsigner as well?

I created a Cordova app called myApp with CLI, then immediately ran this:
keytool -genkey -v -keystore myApp.keystore -alias myApp -keyalg RSA -keysize 2048 -validity 10000
I put the keystore and apk files in the same folder. When I attempted to sign it with jarsigner with:
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore myApp.keystore myApp.apk myApp
... I got the output:
jarsigner: unable to sign jar: java.util.zip.ZipException: invalid entry compressed size (expected 814 but got 818 bytes)
When I do:
jarsigner -verify -verbose -certs myApp.apk
...the output ended with:
jar verified.
This means the apk has already been signed. During the process, a "2,048 bit RSA key pair and self-signed certificate (SHA1withRSA) with a validity of 10,000 days" is created. Does that mean the present myApp.apk does not need a separate jarsigner process applied, and it is ready for Play store as is (assuming it meets all Google Play rules)?
I've been confused about the jarsigner portion of this whole process, and come to a crashing stop each time I use it. (By "jarsigner portion" I mean implementing jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore myApp.keystore myApp.apk myApp after the keytool code.)
My development environment:
Mac OS X 10.9.5 on latest Mac Mini
Cordova CLI 3.6.3 (cordova, not phonegap)
Not for PG Build; no Jquery or other JS or CSS packages used
I am not using Eclipse; I am deliberately learning how to build a signed apk without it.
Problem stems from the fact that there is a bug in the 3.6.3 version in that release code hasn't been thoroughly documented and implemented. Filed a bug report on Jira.
I assume you are following these instructions. When building your apk did you compile in release mode so that it will generate an unsigned apk? Seeing as how you are unable to sign using jarsigner, but verify that it is signed already, I feel the problem may lie with your apk.