Bug 32666 - Tools -> Android -> Publish Android App -> Create New Keystore does not validate invalid characters which causes the keystore to not be saved.
Summary: Tools -> Android -> Publish Android App -> Create New Keystore does not valid...
Status: VERIFIED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Android ()
Version: 3.11 (C5)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-07-31 11:10 UTC by Jon Douglas [MSFT]
Modified: 2015-12-14 19:00 UTC (History)
7 users (show)

Tags: _XVS1215
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED FIXED

Description Jon Douglas [MSFT] 2015-07-31 11:10:23 UTC
*Description

Within VS, there is an option to create a new keystore for publishing your Android application.

Tools -> Android -> Publish Android App -> Create New Keystore

This functionality validates most items, but does not validate on certain fields.

Example 1:

1. Create New Keystore

2. Enter organization name of "EBE, Inc."

3. Save/Publish

We then get the following:

Attempting to Sign package with custom key

Failed to sign package
keytool error: java.io.IOException: Incorrect AVA formatjarsigner error: java.lang.RuntimeException: keystore load: C:\Users\Jon\Desktop\newsie (The system cannot find the file specified)

Attempting to Align package

Package aligning completed succesfully

Conclusion* The keystore does not get saved and does not exist. I believe this is because there is a comma/space in the string, but it is not validated so the user does not know what's going on.

Example 2:

1. Create New Keystore

2. Enter organization name of "EBE"

3. Save/Publish

We then get the following:

Attempting to create new keystore
Keystore successfully created
Waiting for packaging to complete

No -tsa or -tsacert is provided and this jar is not timestamped. Without a timestamp, users may not be able to validate this jar after the signer certificate's expiration date (2043-01-24) or after any future revocation date.

Packaging successfully completed
Attempting to Sign package with custom key

Package signing completed succesfully

Conclusion* The keystore is valid and successfully works.

*Version Information

Xamarin 3.11.666
Xamarin Android 5.1.4.16
Comment 1 Kyle Masters 2015-10-13 15:37:45 UTC
Can confirm that a comma appears to be causing the issues.

1.  Create key using "My Company, LLC" (a legal name, this has importance).

Result:

Attempting to create new keystore
Failed to create a new keystore
keytool error: java.io.IOException: Incorrect AVA format
Failed to sign package
keytool error: java.io.IOException: Incorrect AVA formatjarsigner error: java.lang.RuntimeException: keystore load: <Path to Keystore> (The system cannot find the file specified)

2.  Create key using "My Company LLC" (not a legal name, US Gov't requires the comma for legality).

Result:

Package builds fine.
Comment 2 xamarin-release-manager 2015-12-09 17:28:12 UTC
Fixed in version 4.0.1.38 (cycle6-sr1patches)

Author: jmt
Commit: f992c091068959fcc24c3502229bf4db5dc8ba43 (xamarin/androidtools)
Included in Commit: 5f072f8fafed4c930ac648a365a4871fcac01484 (xamarin/XamarinVS)
Comment 4 Naqeeb 2015-12-14 19:00:34 UTC
I have checked this issue with build Xamarin.VisualStudio_4.0.1.45 as mention in card https://trello.com/c/whJYFnV9/207-xvs-bug-32666-tools-android-publish-android-app-create-new-keystore-does-not-validate-invalid-characters-which-causes-the-keysto 
and observed that it is working fine. I am not getting "keytool error: java.io.IOException: Incorrect AVA formatjarsigner error" when we use organisation name "EBE, Inc." . Here is the screencast for the same: http://www.screencast.com/t/zdxBwhaG

Hence closing this issue