Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27398] Android: Random assets missing after compiling

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2019-10-04T15:59:08.000+0000
Affected Version/sn/a
Fix Version/sRelease 8.2.1
ComponentsAndroid
Labelsandroid, assets, engSchedule, regression
ReporterMichael Gangolf
AssigneeJan Vennemann
Created2019-09-07T18:19:22.000+0000
Updated2019-10-04T15:59:08.000+0000

Description

Operating System
  Name                        = Fedora
  Version                     = 30
  Architecture                = 64bit
  # CPUs                      = 12
  Memory                      = 15.3GB

Node.js
  Node.js Version             = 10.16.3
  npm Version                 = 6.9.0

Appcelerator CLI
  Installer                   = 4.2.15
  Core Package                = 7.1.1

Titanium CLI
  CLI Version                 = 5.2.1
  node-appc Version           = 0.2.49
I have some local websites in my "/app/assets/www/" folder to display charts and barcodes. While it worked fine with 8.0.2.GA I have some big issues with the latest 8.1.1.GA or CLI version listed above. Every compile a different item out of the "/app/assets/www" is missing! !Screenshot_20190907_200524.png|thumbnail! on the left side is my folder. I've open the APK inside a zip tool: the middle is the first run, the right image is the last run. Some files are the same but some files are missing. I've tried to rename the files but that didn't work either

Attachments

FileDateSize
assets.zip2019-09-11T19:46:22.000+000089408
Screenshot_20190907_200524.png2019-09-07T18:15:32.000+000077421

Comments

  1. Michael Gangolf 2019-09-08

    Looks like it started with 8.1.0.GA since in 8.0.2.GA I see all files. Files are also missing in [appname]/build/android/bin/assets/Resources/www/ Every second build I see the files missing, so I guess it has todo with incremental builds (e.g. https://github.com/appcelerator/titanium_mobile/pull/11024, https://github.com/appcelerator/titanium_mobile/pull/10702, https://github.com/appcelerator/titanium_mobile/pull/10958)
  2. Jan Vennemann 2019-09-11

    [~michael], is it possible for you to share the contents of your www folder? I wasn't able to reproduce this yet and it may be that this depends references between those HTML/JS/CSS files.
  3. Michael Gangolf 2019-09-11

    sure. They are attached. If I clean the folder and run a new build again I see the HTML/CSS files in the folder and after some seconds the JS files appear. Running a second build without a clean the HTML/CSS files stay and the JS files get removed and don't appear again (and are missing in the APK of course)
  4. Jan Vennemann 2019-09-13

    Thanks! I couldn't reproduce the exact same issue you are seeing but the build is erroring out for me with your provided assets example. Working on a fix right now!
  5. Jan Vennemann 2019-09-13

    PR(master): https://github.com/appcelerator/titanium_mobile/pull/11214 PR(8_2_X): https://github.com/appcelerator/titanium_mobile/pull/11215
  6. Michael Gangolf 2019-09-13

    Awesome! Works fine. Tested it multiple times and all assets are there. One minor issue: it will still minify those files and they get bigger. Eg. hyph.js is already minified and 139kb in my assets folder. After compiling appc will touch it again and it is 143kb (bin/assets/Ressources) cause it will add spaces around elements that had no space before !http://migaweb.de/Screenshot_20190913_201438.png! It still works but I would rather not have it touch my code files in the assets folder if it makes it bigger :)
  7. Jan Vennemann 2019-09-13

    This is due to Alloy trying to optimize all JS files by running it through babel and applying a few plugins. During that process the whitespaces are added it seems.
  8. Keerthi Mahalingam 2019-09-16

    FR passed. Waiting on Jenkins
  9. Keerthi Mahalingam 2019-09-16

    PR merged.
  10. Ebenezer Boateng 2019-10-04

    Bug fixed - verified in SDK version *8.2.1.v20191003075717* and *8.3.0.v20191003144543*

JSON Source