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

Error generating androidTWA package: keytool failed on unicode characters #1191

Closed
ynonra opened this issue Oct 22, 2020 · 9 comments
Closed

Comments

@ynonra
Copy link

ynonra commented Oct 22, 2020

I received the following error when generating a package for https://www.tikunkorim.co.il/

Error generating Android package.

Status code: 500

Error: Internal Server Error

Details: Error generating app package: Error: Command failed: keytool -genkeypair -dname "cn=tikun Admin, ou=Engineering, o=תיקון קוראים נוח ובהיר, ולימוד טעמי מקרא והפטרה, c=US" -alias "my-key-alias" -keypass "637kqXPmNXC8" -keystore "/tmp/pwabuilder-cloudapk--25-bk9hx4tcRqf5/signingKey.keystore" -storepass "n6JhhCrfSmfX" -validity 20000 -keyalg RSA

@ghost ghost added the needs triage 🔍 label Oct 22, 2020
@ghost
Copy link

ghost commented Oct 22, 2020

Hello ynonra, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will investigate the issue and help solve it ASAP. Other community members may also look into the issue and provide feedback 🙌

@JudahGabriel
Copy link
Contributor

Shalom @ynonra

I suspect the issue is that the Android SDK tool, keytool, is having trouble with Hebrew characters as your organization name. As a test, can you try generating your Android app using English letters for the organization name?

In the meanwhile, I'll report this bug to the Google team that owns this piece of the stack.

@JudahGabriel
Copy link
Contributor

@andreban Bubblewrap fails for this guy, with the following error message. Possibly related to unicode support in either Bubblewrap or keytool?

Command failed: keytool -genkeypair -dname "cn=tikun Admin, ou=Engineering, o=תיקון קוראים נוח ובהיר, ולימוד טעמי מקרא והפטרה, c=US" -alias "my-key-alias" -keypass "637kqXPmNXC8" -keystore "/tmp/pwabuilder-cloudapk--25-bk9hx4tcRqf5/signingKey.keystore" -storepass "n6JhhCrfSmfX" -validity 20000 -keyalg RSA

@ynonra
Copy link
Author

ynonra commented Oct 22, 2020

thanks a lot, i changed all the names to english and it works!

is there a way to edit the files manualy and return the original hebrew names?

@JudahGabriel
Copy link
Contributor

Not that I'm aware of.

You might be glad to know the organization here is used for creating a signing key only. The key is used to sign your Android app package. I don't think the organization is displayed anywhere to end users.

@JudahGabriel JudahGabriel changed the title Error generating androidTWA package Error generating androidTWA package: keytool failed on unicode characters Oct 22, 2020
@andreban
Copy link

I can confirm those details are not shown to users anywhere.

Anyway, it turns out the problem is the comma in the ou field, as it signalises the end of the field. It's possible to escape that when running keytool, like the following, which works:

keytool -genkeypair -dname "cn=tikun Admin, ou=Engineering, o=תיקון קוראים נוח ובהיר\, ולימוד טעמי מקרא והפטרה, c=US" -alias "my-key-alias" -keypass "637kqXPmNXC8" -keystore "signingKey.keystore" -storepass "n6JhhCrfSmfX" -validity 20000 -keyalg RSA

@JudahGabriel we can either escape this in @bubblewrap/core before running the command or escape it in PWA Builder and in @bubblewrap/cli. I'm happy either way, but might be good to discuss the approach first to avoid escaping twice.

@JudahGabriel
Copy link
Contributor

it turns out the problem is the comma in the ou field

Ah, good catch.

So @ynonra just remove the comma, and you can still use the Hebrew name of your organization.

@andreban yeah, I think it's best to escape this at the lower Bubblewrap level.

@ynonra
Copy link
Author

ynonra commented Oct 23, 2020

thanks guys!

@andreban
Copy link

Filed GoogleChromeLabs/bubblewrap#373 for Bubblewrap

@ghost ghost locked as resolved and limited conversation to collaborators Dec 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants