[TIMOB-27398] Android: Random assets missing after compiling
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2019-10-04T15:59:08.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 8.2.1 |
Components | Android |
Labels | android, assets, engSchedule, regression |
Reporter | Michael Gangolf |
Assignee | Jan Vennemann |
Created | 2019-09-07T18:19:22.000+0000 |
Updated | 2019-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
File | Date | Size |
---|---|---|
assets.zip | 2019-09-11T19:46:22.000+0000 | 89408 |
Screenshot_20190907_200524.png | 2019-09-07T18:15:32.000+0000 | 77421 |
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)[~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.
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)
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!
PR(master): https://github.com/appcelerator/titanium_mobile/pull/11214 PR(8_2_X): https://github.com/appcelerator/titanium_mobile/pull/11215
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 :)
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.
FR passed. Waiting on Jenkins
PR merged.
Bug fixed - verified in SDK version *8.2.1.v20191003075717* and *8.3.0.v20191003144543*