question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Illegal option when using `expo build:android` with a keystore alias that starts with "-"

See original GitHub issue

Description

I am manually uploading an existing keystore using expo build:android, and the alias that I need to use has a leading “-”, for example: -myAlias. When prompting for the keystore alias, that’s what I type in.

? Keystore Alias: -myAlias

Expected Behavior

I thought it would work fine, I even tried all of these options to attempt to escape the “-” character: https://stackoverflow.com/a/26453747

Observed Behavior

It seemed like everything was successful, but I was unable to install the app, so I checked the build logs and saw this under signing created apk:

[stderr] Illegal option: -myAlias
Please type jarsigner -help for usage
jarsigner exited with non-zero code: 1

Environment

I am using Expo Cli 2.17.0

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
dsokalcommented, May 9, 2019

Hello @zaytrix, thanks for reporting. Unfortunately, there is nothing we can do about it. This is how jarsigner works and we’re not going to change the way we sign .apk files for SDK 31 (this is the version you’re using). It was changed in SDK 32 and we don’t use jarsigner there. You have two options here: you can either change the alias in your keystore or upgrade your project to SDK 32.

1reaction
cruzachcommented, May 8, 2019

Update for you @zaytrix- we’re looking into this internally, thanks so much for bringing it to our attention 😊

I’ll post any updates/info here as they come along

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting “keystore.keyAlias” is not allowed to be empty error ...
When it remains blocked, you just have to do Ctrl + Z , it will ask you for the alias again, and this...
Read more >
Using local credentials - Expo Documentation
Learn how to configure and use local credentials when using EAS. ... If you want to build an Android app binary you'll need...
Read more >
Android build process - Expo Documentation
Android Keystore ​​ Android requires you to sign your application with a certificate. That certificate is stored in your keystore.
Read more >
App credentials - Expo Documentation
From the Expo build process's perspective, there is no difference between whether an app is signed with an upload certificate or an app...
Read more >
How to build an APK file from a create-react-native-app CLI ...
APK with Expo CLI in React Native? You need to sign the apk if you use expo. Run expo build:android. Use your existing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found