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

Cannot export to android if package name contains single quote #52659

Closed
puthre opened this issue Sep 14, 2021 · 2 comments · Fixed by #54255
Closed

Cannot export to android if package name contains single quote #52659

puthre opened this issue Sep 14, 2021 · 2 comments · Fixed by #54255

Comments

@puthre
Copy link
Contributor

puthre commented Sep 14, 2021

Godot version

3.3.3

System information

Linux Ubuntu

Issue description

Cannot export an android build with godot 3.3.3.stable.official because the name "Taila's Jigsaw Adventure" contains a single quote. It worked fine with 3.2.2. Works fine with apostrophe or double quote but not with single quote

> Task :preBuild UP-TO-DATE
> Task :preDebugBuild UP-TO-DATE
> Task :compileDebugAidl NO-SOURCE
> Task :compileDebugRenderscript NO-SOURCE
> Task :generateDebugBuildConfig UP-TO-DATE
> Task :javaPreCompileDebug UP-TO-DATE
> Task :checkDebugAarMetadata UP-TO-DATE
> Task :generateDebugResValues UP-TO-DATE
> Task :generateDebugResources UP-TO-DATE
> Task :createDebugCompatibleScreenManifests UP-TO-DATE
> Task :extractDeepLinksDebug UP-TO-DATE
> Task :processDebugMainManifest UP-TO-DATE
> Task :processDebugManifest UP-TO-DATE
> Task :processDebugManifestForPackage UP-TO-DATE
> Task :mergeDebugNativeDebugMetadata NO-SOURCE
> Task :mergeDebugShaders UP-TO-DATE
> Task :compileDebugShaders NO-SOURCE
> Task :generateDebugAssets UP-TO-DATE

> Task :mergeDebugResources FAILED
/home/puthre/.gradle/caches/transforms-2/files-2.1/ee4998e5c44f8791e55e396202e7f092/core-1.0.0/res/values-de/values-de.xml: Failed to flatten XML for resource 'godot_project_name_string' with error: Invalid unicode escape sequence in string
"{str}"
/home/puthre/.gradle/caches/transforms-2/files-2.1/ee4998e5c44f8791e55e396202e7f092/core-1.0.0/res/values-de/values-de.xml: string/godot_project_name_string does not contain a valid string resource.
/home/puthre/.gradle/caches/transforms-2/files-2.1/ee4998e5c44f8791e55e396202e7f092/core-1.0.0/res/values-hi/values-hi.xml: Failed to flatten XML for resource 'godot_project_name_string' with error: Invalid unicode escape sequence in string
"{str}"
/home/puthre/.gradle/caches/transforms-2/files-2.1/ee4998e5c44f8791e55e396202e7f092/core-1.0.0/res/values-hi/values-hi.xml: string/godot_project_name_string does not contain a valid string resource.
/home/puthre/.gradle/caches/transforms-2/files-2.1/07eb4d87e283bf5e3a01bbcaf6469940/jetified-godot-lib.debug/res/values/values.xml: Failed to flatten XML for resource 'godot_project_name_string' with error: Invalid unicode escape sequence in string
"{str}"
/home/puthre/.gradle/caches/transforms-2/files-2.1/07eb4d87e283bf5e3a01bbcaf6469940/jetified-godot-lib.debug/res/values/values.xml: string/godot_project_name_string does not contain a valid string resource.
/home/puthre/.gradle/caches/transforms-2/files-2.1/ee4998e5c44f8791e55e396202e7f092/core-1.0.0/res/values-pt/values-pt.xml: Failed to flatten XML for resource 'godot_project_name_string' with error: Invalid unicode escape sequence in string
"{str}"
/home/puthre/.gradle/caches/transforms-2/files-2.1/ee4998e5c44f8791e55e396202e7f092/core-1.0.0/res/values-pt/values-pt.xml: string/godot_project_name_string does not contain a valid string resource.
/home/puthre/.gradle/caches/transforms-2/files-2.1/ee4998e5c44f8791e55e396202e7f092/core-1.0.0/res/values-lt/values-lt.xml: Failed to flatten XML for resource 'godot_project_name_string' with error: Invalid unicode escape sequence in string
"{str}"
/home/puthre/.gradle/caches/transforms-2/files-2.1/ee4998e5c44f8791e55e396202e7f092/core-1.0.0/res/values-lt/values-lt.xml: string/godot_project_name_string does not contain a valid string resource.
/home/puthre/.gradle/caches/transforms-2/files-2.1/ee4998e5c44f8791e55e396202e7f092/core-1.0.0/res/values-hr/values-hr.xml: Failed to flatten XML for resource 'godot_project_name_string' with error: Invalid unicode escape sequence in string
"{str}"
/home/puthre/.gradle/caches/transforms-2/files-2.1/ee4998e5c44f8791e55e396202e7f092/core-1.0.0/res/values-hr/values-hr.xml: string/godot_project_name_string does not contain a valid string resource.
/home/puthre/.gradle/caches/transforms-2/files-2.1/ee4998e5c44f8791e55e396202e7f092/core-1.0.0/res/values-lv/values-lv.xml: Failed to flatten XML for resource 'godot_project_name_string' with error: Invalid unicode escape sequence in string
"{str}"
/home/puthre/.gradle/caches/transforms-2/files-2.1/ee4998e5c44f8791e55e396202e7f092/core-1.0.0/res/values-lv/values-lv.xml: string/godot_project_name_string does not contain a valid string resource.
/home/puthre/.gradle/caches/transforms-2/files-2.1/ee4998e5c44f8791e55e396202e7f092/core-1.0.0/res/values-hu/values-hu.xml: Failed to flatten XML for resource 'godot_project_name_string' with error: Invalid unicode escape sequence in string
"{str}"
/home/puthre/.gradle/caches/transforms-2/files-2.1/ee4998e5c44f8791e55e396202e7f092/core-1.0.0/res/values-hu/values-hu.xml: string/godot_project_name_string does not contain a valid string resource.
/home/puthre/.gradle/caches/transforms-2/files-2.1/ee4998e5c44f8791e55e396202e7f092/core-1.0.0/res/values-uk/values-uk.xml: Failed to flatten XML for resource 'godot_project_name_string' with error: Invalid unicode escape sequence in string
"{str}"
/home/puthre/.gradle/caches/transforms-2/files-2.1/ee4998e5c44f8791e55e396202e7f092/core-1.0.0/res/values-uk/values-uk.xml: string/godot_project_name_string does not contain a valid string resource.
/home/puthre/.gradle/caches/transforms-2/files-2.1/ee4998e5c44f8791e55e396202e7f092/core-1.0.0/res/values-in/values-in.xml: Failed to flatten XML for resource 'godot_project_name_string' with error: Invalid unicode escape sequence in string
"{str}"
/home/puthre/.gradle/caches/transforms-2/files-2.1/ee4998e5c44f8791e55e396202e7f092/core-1.0.0/res/values-in/values-in.xml: string/godot_project_name_string does not contain a valid string resource.
/home/puthre/.gradle/caches/transforms-2/files-2.1/ee4998e5c44f8791e55e396202e7f092/core-1.0.0/res/values-el/values-el.xml: Failed to flatten XML for resource 'godot_project_name_string' with error: Invalid unicode escape sequence in string
"{str}"
/home/puthre/.gradle/caches/transforms-2/files-2.1/ee4998e5c44f8791e55e396202e7f092/core-1.0.0/res/values-el/values-el.xml: string/godot_project_name_string does not contain a valid string resource.
/home/puthre/.gradle/caches/transforms-2/files-2.1/ee4998e5c44f8791e55e396202e7f092/core-1.0.0/res/values-zh-rTW/values-zh-rTW.xml: Failed to flatten XML for resource 'godot_project_name_string' with error: Invalid unicode escape sequence in string
"{str}"
/home/puthre/.gradle/caches/transforms-2/files-2.1/ee4998e5c44f8791e55e396202e7f092/core-1.0.0/res/values-zh-rTW/values-zh-rTW.xml: string/godot_project_name_string does not contain a valid string resource.

> Task :mergeDebugAssets UP-TO-DATE

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':mergeDebugResources'.
> Multiple task action failures occurred:
   > A failure occurred while executing com.android.build.gradle.internal.res.ResourceCompilerRunnable
      > Resource compilation failed. Check logs for details.
   > A failure occurred while executing com.android.build.gradle.internal.res.ResourceCompilerRunnable
      > Resource compilation failed. Check logs for details.
   > A failure occurred while executing com.android.build.gradle.internal.res.ResourceCompilerRunnable
      > Resource compilation failed. Check logs for details.
   > A failure occurred while executing com.android.build.gradle.internal.res.ResourceCompilerRunnable
      > Resource compilation failed. Check logs for details.
   > A failure occurred while executing com.android.build.gradle.internal.res.ResourceCompilerRunnable
      > Resource compilation failed. Check logs for details.
   > A failure occurred while executing com.android.build.gradle.internal.res.ResourceCompilerRunnable
      > Resource compilation failed. Check logs for details.
   > A failure occurred while executing com.android.build.gradle.internal.res.ResourceCompilerRunnable
      > Resource compilation failed. Check logs for details.
   > A failure occurred while executing com.android.build.gradle.internal.res.ResourceCompilerRunnable
      > Resource compilation failed. Check logs for details.
   > A failure occurred while executing com.android.build.gradle.internal.res.ResourceCompilerRunnable
      > Resource compilation failed. Check logs for details.
   > A failure occurred while executing com.android.build.gradle.internal.res.ResourceCompilerRunnable
      > Resource compilation failed. Check logs for details.
   > A failure occurred while executing com.android.build.gradle.internal.res.ResourceCompilerRunnable
      > Resource compilation failed. Check logs for details.
   > A failure occurred while executing com.android.build.gradle.internal.res.ResourceCompilerRunnable
      > Resource compilation failed. Check logs for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s
12 actionable tasks: 1 executed, 11 up-to-date

Exit Code: 1

Steps to reproduce

Try to export an android project whose package name contains a single quote.

Minimal reproduction project

No response

@akien-mga
Copy link
Member

Confirmed still reproducible in 3.4 RC 1, when using Custom Build. It works fine with prebuilt APKs.

MRP: dos_and_donts.zip

@akien-mga
Copy link
Member

The gradle builds seems to use xml_escape(true), which converts the single quotes to ', but then gradle is actually unhappy:

// Stores the string into the default values directory.
	String processed_default_xml_string = vformat(godot_project_name_xml_string, project_name.xml_escape(true));

Removing true (i.e. not encoding quotes) might solve it.

The prebuild APK workflow encodes the names as is.

akien-mga added a commit to akien-mga/godot that referenced this issue Oct 26, 2021
@akien-mga akien-mga self-assigned this Oct 26, 2021
akien-mga added a commit that referenced this issue Oct 26, 2021
sairam4123 pushed a commit to sairam4123/godot that referenced this issue Nov 10, 2021
lekoder pushed a commit to KoderaSoftwareUnlimited/godot that referenced this issue Dec 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment