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

Export to Android fails with INSTALL_PARSE_FAILED_NO_CERTIFICATES if debug keystore unspecified #27574

Closed
nightblade9 opened this issue Apr 1, 2019 · 9 comments · Fixed by #83702

Comments

@nightblade9
Copy link
Contributor

nightblade9 commented Apr 1, 2019

Godot version: 3.1

OS/device including version: Windows 8

Issue description: Running on Android fails. It should succeed (valid APK)

This is similar to #18222. When I run/export on Android, nothing happens. Exporting the APK file and then installing it via ADB shows this error: Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES: Failed to collect certificates from /data/app/vmdl1971499572.tmp/base.apk: Attempt to get length of null array]

The root cause? I didn't specify a debug key, or I didn't specify the correct user name and password. Specifying those, fixes the problem.

My ask: make the failure reason more clear to the user. (Especially for users without Android experience, it would be best to see the error in a Godot pop-up of some sort.)

@nightblade9
Copy link
Contributor Author

Updated to be a UX "improvement" request now that I figured out the problem.

@akien-mga akien-mga changed the title Export to Android fails: INSTALL_PARSE_FAILED_NO_CERTIFICATES Export to Android fails with INSTALL_PARSE_FAILED_NO_CERTIFICATES if debug keystore unspecified Apr 9, 2019
@akien-mga akien-mga added this to the 3.2 milestone Apr 9, 2019
@akien-mga akien-mga removed this from the 3.2 milestone Dec 13, 2019
@LGLTeam
Copy link

LGLTeam commented Apr 22, 2020

I'm getting the same error when running my app though adb. How come?

@volzhs
Copy link
Contributor

volzhs commented Oct 12, 2020

@akien-mga I think this is fixed by e3e5a1b
Screenshot_20201012_223412

@akien-mga
Copy link
Member

@volzhs I wonder as this commit was included in 3.1.stable against which this issue was opened, so it seems it's not sufficient.

OP says:

I didn't specify a debug key, or I didn't specify the correct user name and password. Specifying those, fixes the problem.

I think not specifying the debug key might indeed be prevented by e3e5a1b, but maybe it's still possible to export with a debug key and wrong username/password that would trigger this error.

@Patchcoat
Copy link
Contributor

I've verified this bug occurs with a specified debug key and the wrong username/password.
image

@Patchcoat
Copy link
Contributor

I have a fix using keytool and it works.
image
I'm not ready to submit a pull request due to performance concerns. It is quite slow and causing an unusable amount of UI lag. I'm going to try to optimize it, largely by moving keytool into a background task, and then it should be ready.

@frankhuurman
Copy link

I have a fix using keytool and it works. image I'm not ready to submit a pull request due to performance concerns. It is quite slow and causing an unusable amount of UI lag. I'm going to try to optimize it, largely by moving keytool into a background task, and then it should be ready.

This would be a very nice improvement! thanks for your work on it :)

@Patchcoat
Copy link
Contributor

Patchcoat commented Oct 26, 2023

This would be a very nice improvement! thanks for your work on it :)

Thanks. Regrettably it didn't pan out to a real-time check like shown in the screen shot because I couldn't figure out a good way to optimize it. I moved it to a pre-export check that will stop the export early if the password/username isn't correct and give you an error message telling you what's wrong.

@akien-mga akien-mga added this to the 4.3 milestone Jan 4, 2024
@nightblade9
Copy link
Contributor Author

nightblade9 commented Jan 5, 2024

Nice, thanks for fixing this! (Three years in the making 😁 )

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

Successfully merging a pull request may close this issue.

7 participants