pwa-builder / CloudAPK

Build Android APK packages on the cloud
Other
147 stars 44 forks source link

[BUG] zipalign issue "Failed. Status code 500, Error: Internal Server Error, Details: Error generating app package" #77

Closed bryantvu closed 3 years ago

bryantvu commented 3 years ago

Hello,

I tried emailing your team and wasn't getting a response, so I'm posting the issue here.

Background I got an error generating an Android package with just the default settings. I emailed the PWAB team (Judah, David) did note that I was using the correction SDK version (30.0.3) and suggested that I seek help from the Bubblewrap team instead. Failed. Status code 500, Error: Internal Server Error, Details: Error generating app package: Error: Command failed: "/home/ubuntu/api/CloudAPK/android-sdk/build-tools/30.0.3/zipalign" -v -f -p 4 /tmp/pwabuilder-cloudapk--24177-thSWAhVabhJC/app/build/outputs/apk/release/app-release-unsigned.apk /tmp/pwabuilder-cloudapk--24177-thSWAhVabhJC/app-release-unsigned-aligned.apk

I posted the issue to their GitHub on got the following response. https://github.com/GoogleChromeLabs/bubblewrap/issues/552

Response from Bubblewrap team (Andrew) Recent versions of the Gradle plugin will automatically zipalign the APK, and calling zipalign in those cases is redundant. To reflect this, the Bubblewrap CLI only verifies the APK is zipaligned. https://github.com/GoogleChromeLabs/bubblewrap/blob/d8019d0aef42d64b0590bf223d22b4ad0f5e0575/packages/cli/src/lib/cmds/build.ts#L117-L123 ClouldAPK seems to be still calling zipalign. https://github.com/pwa-builder/CloudAPK/blob/dbe52dda058e808b9f6f694095ffd0c4b05ebf12/build/bubbleWrapper.ts#L136-L145

ghost commented 3 years ago

Hello bryantvu, 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 commented 3 years ago

Thanks. We're not on the latest Bubblewrap at the moment, which means zipalign should still work. We'll be updating to the latest version soon. Thanks for the heads-up!

ajeetku commented 3 years ago

We are also getting same issue with zipalign ErrorDetails: Error generating app package: Error: Command failed: "/opt/android-sdk/build-tools/30.0.3/zipalign" -v -f -p 4 /tmp/pwabuilder-cloudapk--15329-vmztY2b4EdLm/app/build/outputs/apk/release/app-release-unsigned.apk /tmp/pwabuilder-cloudapk--15329-vmztY2b4EdLm/app-release-unsigned-aligned.apk

Bubblewrap core version is 1.13.3

Any update on this issue?

JudahGabriel commented 3 years ago

@ajeetku and @bryantvu This has been fixed. You should no longer see this issue.