Scirra / Construct-bugs

Public bug report submissions for Construct 3 and Construct Animate. Please read the guidelines then click the 'Issues' tab to get started.
https://www.construct.net
107 stars 83 forks source link

Keystore generator will only create working Keystores if both the key password and keystore password are the same. #3830

Closed haypers closed 4 years ago

haypers commented 4 years ago

Problem description

When creating a new Keystore for android signed builds, It appears as though both the password fields and the keystore password fields must contain the same password for the keystore to work.

Attach a .c3p

Test Project.zip

Steps to reproduce

  1. Open any project
  2. Fill out app details, to allow android exports
  3. Create a Keystore with different key passwords and Keystore passwords.
  4. Try to use the Keystore to sign an apk or app bundle

Observed result

Signed apks will give you a wrong password error. Signed app bundles give you an empty 'error' message. Some browsers will not let you build the Keystore at all (edge).

Expected result

the export to work and create a signed apk or app bundle download.

More details

original discovery: https://www.construct.net/en/forum/construct-3/general-discussion-7/anyone-create-new-keystores-151982/page-2#forumPost1008725

crome - signed apk: a long and complex 'wrong password' error (see image) crome - signed app bundle: 'error' error edge - error at Keystore generator

keystore-password_v800

Affected browsers/platforms: crome edge possibly others

First affected release: I think this only started happening in the last stable release or two, but I am uncertain.

System details

View details Platform information Browser: Chrome Browser version: 81.0.4044.129 Browser engine: Chromium Browser architecture: 64-bit Context: browser Operating system: Windows Operating system version: 10 Operating system architecture: 64-bit Device type: desktop Device pixel ratio: 1 Logical CPU cores: 4 Approx. device memory: 8 GB User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36 C3 release: r197.2 (stable) Language setting: en-US Local storage Storage quota (approx): 1.1 tb Storage usage (approx): 703 mb (0.1%) Persistant storage: Yes Browser support notes This list contains missing features that are not required, but could improve performance or user experience if supported. Nothing is missing. Everything is OK! WebGL information Version string: WebGL 2.0 (OpenGL ES 3.0 Chromium) Numeric version: 2 Supports NPOT textures: yes Supports GPU profiling: yes Supports highp precision: yes Vendor: Google Inc. Renderer: ANGLE (Intel(R) HD Graphics 4600 Direct3D11 vs_5_0 ps_5_0) Major performance caveat: no Maximum texture size: 16384 Point size range: 1 to 1024 Extensions: EXT_color_buffer_float EXT_disjoint_timer_query_webgl2 EXT_float_blend EXT_texture_filter_anisotropic KHR_parallel_shader_compile OES_texture_float_linear WEBGL_compressed_texture_s3tc WEBGL_compressed_texture_s3tc_srgb WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_lose_context OVR_multiview2 Audio information System sample rate: 48000 Hz Output channels: 2 Output interpretation: speakers Supported decode formats: Ogg Opus (audio/ogg; codecs=opus) WebM Opus (audio/webm; codecs=opus) Ogg Vorbis (audio/ogg; codecs=vorbis) WebM Vorbis (audio/webm; codecs=vorbis) MPEG-4 AAC (audio/mp4; codecs=mp4a.40.5) MP3 (audio/mpeg) FLAC (audio/flac) PCM WAV (audio/wav; codecs=1) Supported encode formats: WebM Opus (audio/webm; codecs=opus) Video information Supported decode formats: WebM VP9 (video/webm; codecs=vp9) WebM VP8 (video/webm; codecs=vp8) Ogg Theora (video/ogg; codecs=theora) H.264 (video/mp4; codecs=avc1.42E01E) Supported encode formats: WebM VP9 (video/webm; codecs=vp9) WebM VP8 (video/webm; codecs=vp8)

Note: this has been tested on 4+ different devices, on different networks, with different accounts.

AshleyScirra commented 4 years ago

I spent ages scratching my head over this and eventually found that the Android keytool is returning this warning:

Warning: Different store and key passwords not supported for PKCS12 KeyStores.

So... it's simply not supported to use different passwords for the keystore and the key! At the moment it's ignoring what you put for the key password, so you can still build with a keystore you created previously if you put the keystore password for both passwords.

I guess the solution here is to remove the key password fields from Construct and just use the keystore password.

haypers commented 4 years ago

Well, alright then. I always thought the different passwords was intentional. Thanks Ashley. Guess we just use one from now on. Hey, should it be fine to go ahead and make new keystores, or do you want me to wait for you to update the menu to only one password?

AshleyScirra commented 4 years ago

It's fine to keep making keystores, it is just ignoring the key password. So you may as well just fill them in both the same anyway. The only change in the next release will be to hide those fields and fill them in the same automatically.

haypers commented 4 years ago

Ok, thanks!

AshleyScirra commented 4 years ago

Removed the 'Key password' field for next release.

ConstructBugsReport commented 3 years ago

Hello, the problem is still urgent, we need to resolve this issue as soon as possible.

AshleyScirra commented 3 years ago

The problem described in this report was resolved in May 2020.