{ "id": "83450", "key": "TIMOB-6495", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2011-12-06T19:21:26.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "RTN", "cb-tooling", "core" ], "versions": [ { "id": "12570", "name": "Release 1.7.5", "archived": true, "released": true, "releaseDate": "2011-11-02" }, { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-01-09T19:49:52.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "App will not build successfully when including a file with a name longer than 100 characters in Resources. This works fine on iOS, tested with the same SDK versions.\r\n\r\nh4. Use Case:\r\nYou may ask yourself why would anyone want to include a file with more than 100 characters.\r\nUsing base64 to encode remote file path for caching image locally and shipping the cached images with the app. This works fine when you create the files on the device but when you try to grab the cached images and include them in the build, the build fails.\r\n\r\nh4. Workaround:\r\nUse a file name that is 100 characters or less.\r\n\r\nh4. Steps to reproduce:\r\nStep 1: create an app\r\nStep 2: move a file into the Resources directory of the app\r\nStep 3: rename that file to \"aHR0cDovL21tYXBwY21zLmNvbS9kZW1vL3NpdGVzL2RlZmF1bHQvZmlsZXMvc3R5bGVzL2dhasbGxlcnlfZnVsbC9wdWJsaWMvaG9\" or just download the attached file. (the name is 101 chars long).\r\nStep 4: run the run the application\r\nStep 5: see the error in the console log below\r\nStep 6: rename the file and remove one char.\r\nStep 7: do a clean build\r\nStep 8: notice that there is no error\r\n\r\nh4. Console log\r\n{code}\r\n[INFO] Titanium SDK version: 1.8.0.1 (11/30/11 10:44 c058ed0...)\r\n[INFO] Fastdev server running, deploying in Fastdev mode\r\n[INFO] Copying project resources..\r\n[INFO] Detected tiapp.xml change (or assets deleted), forcing full re-build...\r\n[INFO] Force including all modules...\r\n[INFO] Force including all modules...\r\n[INFO] Compiling Javascript Resources ...\r\n[INFO] Copying platform-specific files ...\r\n[INFO] Compiling localization files\r\n[INFO] Waiting for SDCard to become available..\r\n[INFO] Compiling Android Resources... This could take some time\r\n[ERROR] /Users/jalter/Documents/Titanium Studio Workspace2/Test7/build/android/bin/assets/Resources/aHR0cDovL21tYXBwY21zLmNvbS9kZW1vL3NpdGVzL2RlZmF1bHQvZmlsZXMvc3R5bGVzL2dhasbGxlcnlfZnVsbC9wdWJsaWMvaG9: error: Invalid filename. Unable to add.\r\n[ERROR] Exception occured while building Android project:\r\n[ERROR] Traceback (most recent call last):\r\n[ERROR] File \"/Users/jalter/Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1.v20111130104443/android/builder.py\", line 2027, in \r\n[ERROR] s.build_and_run(False, avd_id, debugger_host=debugger_host)\r\n[ERROR] File \"/Users/jalter/Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1.v20111130104443/android/builder.py\", line 1896, in build_and_run\r\n[ERROR] launched, launch_failed = self.package_and_deploy()\r\n[ERROR] File \"/Users/jalter/Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1.v20111130104443/android/builder.py\", line 1438, in package_and_deploy\r\n[ERROR] unsigned_apk = self.create_unsigned_apk(ap_)\r\n[ERROR] File \"/Users/jalter/Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1.v20111130104443/android/builder.py\", line 1336, in create_unsigned_apk\r\n[ERROR] resources_zip = zipfile.ZipFile(resources_zip_file)\r\n[ERROR] File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/zipfile.py\", line 699, in __init__\r\n[ERROR] self.fp = open(file, modeDict[mode])\r\n[ERROR] IOError: [Errno 2] No such file or directory: '/Users/jalter/Documents/Titanium Studio Workspace2/Test7/build/android/bin/app.ap_'\r\n{code}", "attachment": [ { "id": "24498", "filename": "aHR0cDovL21tYXBwY21zLmNvbS9kZW1vL3NpdGVzL2RlZmF1bHQvZmlsZXMvc3R5bGVzL2dhasbGxlcnlfZnVsbC9wdWJsaWMvaG9", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-06T19:21:26.000+0000", "size": 58627, "mimeType": "application/octet-stream" } ], "flagged": false, "summary": "Android: Can't include file names longer than 100 characters in Resources ", "creator": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "OSX 10.7.2\r\nTiSDK 1.7.5\r\nTiSDK 1.8.0.1.v20111130104443\r\nAndroid Emulator 2.3.3\r\nAndroid SDK R15", "comment": { "comments": [ { "id": "249102", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "issue reproduces\n\nTested with\nTitanium Studio, build: 3.0.1.201212181159\nTitanium SDK version: 3.1.0\nAndroid Emulator: Android SDK version: 2.2 ", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-26T08:10:42.000+0000", "updated": "2013-04-26T08:10:42.000+0000" }, { "id": "393821", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Confirmed with Titanium SDK 6.1.0 (master):\r\n\r\n{code}\r\n[INFO] Packaging application: /opt/android-sdk/build-tools/24.0.0-preview/aapt \"package\" \"-f\" \"-m\" \"-J\" \"/Users/chris/appc/workspace/testapp/build/android/gen\" \"-M\" \"/Users/chris/appc/workspace/testapp/build/android/AndroidManifest.xml\" \"-A\" \"/Users/chris/appc/workspace/testapp/build/android/bin/assets\" \"-S\" \"/Users/chris/appc/workspace/testapp/build/android/res\" \"-I\" \"/opt/android-sdk/platforms/android-23/android.jar\" \"-F\" \"/Users/chris/appc/workspace/testapp/build/android/bin/app.ap_\" \"--auto-add-overlay\" \"--extra-packages\" \"ti.modules.titanium.ui:android.support.v7.appcompat:android.support.v7.cardview\" \"-S\" \"/var/folders/wx/j1v32g355xj28rnt9yb_6hfm0000gn/T/116722-44830-1fygspp/res\" \"-S\" \"/var/folders/wx/j1v32g355xj28rnt9yb_6hfm0000gn/T/116722-44830-175ary1/res\" \"-S\" \"/var/folders/wx/j1v32g355xj28rnt9yb_6hfm0000gn/T/116722-44830-ksms2m/res\"\r\n[ERROR] Failed to package application:\r\n[ERROR] \r\n[ERROR] /Users/chris/appc/workspace/testapp/build/android/bin/assets/Resources/aHR0cDovL21tYXBwY21zLmNvbS9kZW1vL3NpdGVzL2RlZmF1bHQvZmlsZXMvc3R5bGVzL2dhasbGxlcnlfZnVsbC9wdWJsaWMvaG9.txt: error: Invalid filename. Unable to add.\r\n{code}\r\n\r\nWe have 4 options:\r\n\r\n1. We stop the build as soon as we detect a file name that is too long.\r\n2. We wait for the new Titanium build and we either force encryption of files with long filenames.\r\n3. We wait for the new Titanium build and we allow the encryption storage system to support unencrypted files.\r\n4. We do nothing and let the Android tools break the build.\r\n\r\nOption 1 is better than option 4, but we still won't be able to support long filenames.\r\n\r\nOption 2 and 3 won't happen anytime soon and depends on Ti.Filesystem also supporting the encryption storage engine, which I believe it will have to anyways.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2016-08-22T18:49:34.000+0000", "updated": "2016-08-22T18:49:34.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }