Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keystore Password Prompt is broken #1021

Closed
3 tasks done
breautek opened this issue Jul 7, 2020 · 1 comment · Fixed by #1048
Closed
3 tasks done

Keystore Password Prompt is broken #1021

breautek opened this issue Jul 7, 2020 · 1 comment · Fixed by #1048
Labels
Milestone

Comments

@breautek
Copy link
Contributor

breautek commented Jul 7, 2020

Bug Report

Problem

For release signing, passwords can be excluded and the build system will issue a prompt asking for the password.

The build.json password fields when left empty should cause gradle to prompt for the password during build, but an error is thrown instead.

What is expected to happen?

Password prompts to be shown.

What does actually happen?

An error is thrown:

FAILURE: Build failed with an exception.

* Where:
Script '/development/cordova/tests/tp-iri-client/platforms/android/CordovaLib/cordova.gradle' line: 141

* What went wrong:
Failed to create component for 'dialog' reason: java.awt.HeadlessException
> java.awt.HeadlessException (no error message)

* Try:
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.

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

BUILD FAILED in 12s

Information

I've debugged this problem and it's because when gradle daemon is enabled, there is no "console", therefore you cannot use a headless (terminal) password prompt.

So to use password prompts, we must turn off headless mode, which will enable GUI password prompt when invoked.

First brought attention from #1020 (comment)

I've already debugged the problem and a PR is incoming shortly...

Command or Code

cordova build android --release

While having a buiild.json file, with password and storePassword as empty strings.

Environment, Platform, Device

Issue was replicated on both Ubuntu & Windows

Version information

Cordova CLI 9
cordova-android 9

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@breautek breautek added the bug label Jul 7, 2020
@breautek breautek added this to the 9.0.1 milestone Jul 7, 2020
@breautek breautek mentioned this issue Jul 7, 2020
5 tasks
@breautek breautek changed the title Keystore Password Prompt is broken WIP: Keystore Password Prompt is broken Jul 7, 2020
@breautek breautek changed the title WIP: Keystore Password Prompt is broken Keystore Password Prompt is broken Jul 7, 2020
@breautek
Copy link
Contributor Author

General consensus is to remove the keystore prompt feature altogether: https://lists.apache.org/thread.html/rfd8f4c44acf3fc278dda409d2e677ce24ec3a65e34f5b7db5202d5eb%40%3Cdev.cordova.apache.org%3E

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant