pwa-builder / PWABuilder

The simplest way to create progressive web apps across platforms and devices. Start here. This repo is home to several projects in the PWABuilder family of tools.
https://docs.pwabuilder.com
Other
2.82k stars 287 forks source link

[BUG] + in the name of an app causes a build issue #4791

Closed doublezze closed 1 month ago

doublezze commented 3 months ago

Link to the report card page

https://www.pwabuilder.com/reportcard?site=https://mbyapps.com/mbyappsportal.php

What Store were you trying to package for?

Android Google Play

What is the error message you received?

Internal Server Error

Status code: 500. Error generating app package: Command failed: ./gradlew assembleRelease

Paste your stack trace below

The site I was testing is: https://mbyapps.com/mbyappsportal.php undefined

What environment were you using?

Windows 10

Additional context

None

maiconcarraro commented 3 months ago

It seems related to the "+" plus sign in your app name, I found a workaround that you can try:

Expand all settings: image

Find the Signing key section and remove the plus sign: image

After this change it worked for me to download your package. I kept app and short names w/ plus sign. Still a bug to fix, but sharing the workaround. image

jgw96 commented 3 months ago

@maiconcarraro do you think this is a bug in PWABuilder or in the android build tools? Hard to tell where this bug is coming from.

maiconcarraro commented 3 months ago

@jgw96 well, its more related to UX/DX, either PWABuilder or bubblewrap could sanitise/automatically escape these special characters when generating the key, I dont think its a bug because it will happen anyway if you try keytool directly w/ same args https://stackoverflow.com/a/11809689/3257568

I'd say that would be better to PWABuilder validate/escape since it automatically prefill the inputs for a new key, and especially validate user inputs to prevent the fail, but its up to you to decide on this behavior. The main issue is the unfriendly exception, if it correctly gives feedback to the user that is an invalid input, should be good.

maiconcarraro commented 3 months ago

@jgw96 actually, we can say it's a bug because the options are kinda "hidden" inside of the settings image

so for new users they will have no idea what is the problem, so the correct approach is to escape/remove the characters when prefilling.

jgw96 commented 3 months ago

I agree with this, we should update our form validation to warn about the + character.

maiconcarraro commented 3 months ago

@jgw96 another person had the same issue but with "&", source: https://discord.com/channels/930156205542883409/930871438666235964/1275537693899620394 just to add more context

doublezze commented 3 months ago

Maicon's workaround worked!! Thanks. I'll proceed to test the Android Google Play package. The Windows package though successfully downloaded has an incorrect app name mbyapps+ - mbyappsportal instead of just mbyapps+

doublezze commented 3 months ago

Both Windows and Android packages have incorrect app names. Windows show the name as mbyapps+ - mbyappsportal while Android has name as mbyapps.com. Is this a settings issue on my part or a bug?

jgw96 commented 3 months ago

@doublezze can you send a screenshot of the settings you used for packaging either app?

doublezze commented 3 months ago

Screenshot_28-8-2024_0736_www pwabuilder com Screenshot_28-8-2024_0639_www pwabuilder com Screenshot_28-8-2024_0639_www pwabuilder com Screenshot_28-8-2024_0736_www pwabuilder com

doublezze commented 1 month ago

Thanks, Justin.

Sent from the all new AOL app for iOS

On Wednesday, October 9, 2024, 12:55 PM, Justin Willis @.***> wrote:

Closed #4791 as completed via #4828.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>