Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27746] Android: Apps built with 9.0.0 can't upload to Firebase App Distribution when including certain modules

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2020-02-14T20:59:07.000+0000
Affected Version/sRelease 9.0.0
Fix Version/sRelease 9.0.0
ComponentsAndroid
Labelsandroid, firebase, manifest, module, xml
ReporterJoshua Quick
AssigneeJoshua Quick
Created2020-02-04T22:53:36.000+0000
Updated2020-02-14T20:59:07.000+0000

Description

_(This issue was caught before release.)_ *Summary:* You cannot upload an Android app built with a pre-release version of Titanium 9.0.0 to [Firebase App Distribution](https://firebase.google.com/docs/app-distribution) (used for beta testing) if it includes one of the following modules. * aca * cloudpush * ti.admob * ti.barcode * ti.geofence * ti.identity * ti.map * ti.playservices *Result:* Google's website shows the following error when attempting to upload the APK. bq. There was an error processing your distribution. Ensure you are uploading a valid IPA or APK and try again. !FirebaseError.png|thumbnail! *Note:* You can upload the APK to Google Play without issues. You can install/run the APK on devices as well. So far, this only appears to be an issue with Firebase. *Steps to reproduce:*

Build [kitchensink-v2](https://github.com/appcelerator/kitchensink-v2) for Android.

Go to the Firebase Console webpage: https://console.firebase.google.com

Select a Firebase project. (Create one if you don't have one.)

Go to the "App Distribution" section.

Drag-and-drop the built APK to the Releases section.

Notice the upload errors out with the message shown above.

*Cause:* Any module that is set up to inject "AndroidManifest.xml" settings via its "timodule.xml" will have this problem. It's an issue with the XML merge handling code which is wrongly injecting xmlns:android="" namespace declarations within the child elements. Google requires the android namespace to be declared in the root <manifest/> element and will throw a fit if you add it to the child elements too. This is really a bug in the node.js "xmldom" module. It's doing a string reference equality check via == instead of a string value equality check via ===. [xmldom - dom.js#L951](https://github.com/xmldom/xmldom/blob/0003c1a01a14e5bbad927b6fc36244aef83bf3ef/dom.js#L951)

Attachments

FileDateSize
FirebaseError.png2020-02-04T22:52:07.000+000043343

Comments

  1. Joshua Quick 2020-02-04

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/11462
  2. Christopher Williams 2020-02-05

    merged to master for 9.0.0
  3. Joshua Quick 2020-02-07

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/11467 ^ This updates modules "ti.playservices" and "ti.maps" included in Titanium SDK so that built APKs can be uploaded to Firebase App Distribution without error.
  4. Lokesh Choudhary 2020-02-14

    Verified the fix with SDK 9.0.0.v20200214090043. Closing.

JSON Source