Failed to read key upload from store "/tmp/turtle/keystore": Invalid keystore format

Hi am very new to expo, and I am taking up an existing expo app which has already been deployed to the Google play store.

So I uploaded a new key to google play store using:
keytool -genkeypair -alias upload -keyalg RSA -keysize 2048 -validity 9125 -keystore keystore.jks(*This key must be a 2048 bit RSA key and have 25-year validity.) the export the certificate for that key to PEM format:keytool -export -rfc -alias upload -file upload_certificate.pem -keystore keystore.jks *` then I compressed the file and sent it to google

While trying to bundle the app using expo build:android -t app-bundle i get a
:heavy_multiplication_x: Build failed.
Standalone build failed!
and in the build log i get

> Task :app:signReleaseBundle FAILED


FAILURE: Build failed with an exception.


* What went wrong:


Execution failed for task ':app:signReleaseBundle'.


> A failure occurred while executing$ActionFacade


   > Failed to read key upload from store "/tmp/turtle/keystore-2bf15fc2-.jks": Invalid keystore format

This error occurred due to the fact that keytool -genkeypair will generate a keystore type PKCS12 without a keypass/alias pass( not keystore password) which I believe is not compatible with expo(i might be wrong tho) the auto-generated keystore type from expo is JKS.

Follow this to fix this:
keytool -importkeystore -srckeystore -srcstoretype PKCS12 -destkeystore <path for the new .jks file eg keystorejks.jks> -deststoretype JKS*

you must know your existing keystore password (not keypassword/alias pass)
don’t attempt to change the alias name, it will fail with Keystore was tampered with, or password was incorrect
maybe use the same password, you need to have the same sha1 and sha256 as the old to be valid, especially if you have uploaded it to google console

if it is successful you should see something similar to this;
Importing keystore keystore.jks to keystorejks.jks…
Enter destination keystore password:
Re-enter new password:
Enter source keystore password:
Entry for alias upload successfully imported.
Import command completed: 1 entries successfully imported, 0 entries failed or cancelled
The JKS keystore uses a proprietary format. It is recommended to migrate to PKCS12 which is an industry standard format using “keytool -importkeystore -srckeystore keystorejks.jks -destkeystore keystorejks.jks -deststoretype pkcs12”

I hope this help someone