Expo Android Build Failed Signing

When I build for android using expo build:android --clear-credentials and supply my own *.jks signing file the build fails. Then I use expo’s self signing option to create apk and resign the apk with my *.jks file successfully. What may be the problem?

> Task :app:packageRelease FAILED

[stderr]

FAILURE: Build failed with an exception.

[stderr]

* What went wrong:

[stderr]

Execution failed for task ':app:packageRelease'.

[stderr]

> com.android.ide.common.signing.KeytoolException: Failed to read key 1 from store "/tmp/turtle/keystore-83ca0e8f-7da4-4923-94e7-e912ebe8ee6a.jks": Unable to initialize, java.io.IOException: DerInputStream.getLength(): Redundant length bytes found

[stderr]

* Try:

[stderr]

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

[stderr]

* Get more help at https://help.gradle.org

[stderr]

BUILD FAILED in 6m 1s

Expo CLI 3.1.2 environment info:
System:
OS: macOS High Sierra 10.13.6
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.16.3 - /usr/local/bin/node
Yarn: 1.19.1 - /usr/local/bin/yarn
npm: 6.9.0 - /usr/local/bin/npm
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5791312
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
expo: ^35.0.0 => 35.0.0
react: 16.8.3 => 16.8.3
react-native: https://github.com/expo/react-native/archive/sdk-35.0.0.tar.gz => 0.59.8
react-navigation: ^4.0.9 => 4.0.9
npmGlobalPackages:
expo-cli: 3.1.2

Any suggestions?

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.