{ "id": "175268", "key": "TIMOB-28005", "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": [ { "id": "21039", "name": "Release 9.0.3", "archived": false, "released": true, "releaseDate": "2020-06-10" } ], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2020-07-08T18:33:15.000+0000", "created": "2020-07-07T17:36:05.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-07-08T21:49:13.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "When reinstalling an APK on an android 23 emulator using adb the following error can be seen {{Failure [INSTALL_FAILED_ALREADY_EXISTS]}} but if you use an android 29 emulator, the issue can not be seen. \r\n\r\n*Test Steps:*\r\n# Build a titanium application \r\n# Find the generated .apk e.g. {{build/android/app/build/outputs/apk/debug/app-debug.apk}}\r\n# Open an android 23 emulator \r\n# Run {{adb install %Path_to_apk_goes_here%}} e.g. {{adb install /Users/samir/Desktop/Appc/Repos/Masterss/yeti/Modules/Activity_Indicator/Acceptance/App/temporaryApp/build/android/app/build/outputs/apk/debug/app-debug.apk}}\r\n# Run the same command again\r\n\r\n*Actual result*\r\nFollowing error is shown: \r\n{{Failure [INSTALL_FAILED_ALREADY_EXISTS]}}\r\n\r\n*Expected result*\r\nFor app to reinstall like on Android29\r\n\r\n*Potential related issue in the appium Yeti suite the following error is also sometimes seen when installing the app using adb on Android23 (Android29 works fine).*\r\n\r\n{code:java}\r\n [ERROR] Error: [init({\"platformName\":\"Android\",\"platformVersion\":\"6.0\",\"deviceName\":\"android-23-x86\",\"app\":\"/Users/samir/Desktop/Appc/\r\nRepos/Masterss/yeti/Modules/Activity_Indicator/Acceptance/App/temporaryApp/build/android/app/build/outputs/apk/debug/app-debug.apk\",\"avdArgs\":\"-wipe-data\",\"avd\":\"android-2\r\n3-x86\",\"avdReadyTimeout\":180000,\"avdLaunchTimeout\":120000,\"autoGrantPermissions\":true,\"appPackage\":\"com.appcelerator.Acceptance\",\"appActivity\":\".AcceptanceActivity\",\"uiaut\r\nomator2ServerLaunchTimeout\":60000,\"uiautomator2ServerInstallTimeout\":60000,\"automationName\":\"UiAutomator2\",\"deviceReadyTimeout\":60,\"newCommandTimeout\":600})] The environme\r\nnt you requested was unavailable.\r\nAn unknown server-side error occurred while processing the command. Original error: pkg: /data/local/tmp/appium_cache/40f9c7c8ed2607f2e8d6338b9ab41b299111c72c.apk\r\nFailure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Android: Unable to reinstall on apk using adb on Android 23", "creator": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "MacOS Big Sur: 11.0 Beta\r\nXcode: 12.0 Beta \r\nJava Version: 1.8.0_242\r\nAndroid NDK: 21.3.6528147\r\nNode.js: 12.18.1\r\n\"\"NPM\":\"5.0.0\",\"CLI\":\"8.0.0\"\"\r\nAPI23 Nexus 5X Emulator", "comment": { "comments": [ { "id": "456019", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "When using Google's \"adb\" tool, you need to pass it the \"-r\" command line argument to tell it to replace/re-install an existing installation. This is documented by Google here...\r\nhttps://developer.android.com/studio/command-line/adb\r\n\r\nSo, just do this...\r\n{code}\r\n./adb install -r \r\n{code}\r\n\r\nNote that it's always safe to use the \"-r\" argument, even if the APK hasn't been installed yet. So, you should always use the \"-r\" argument.\r\n\r\nFYI: When you do \"appc run\" with our CLI, it always sets the \"-r\" as well.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-07-07T20:28:05.000+0000", "updated": "2020-07-07T20:28:05.000+0000" }, { "id": "456023", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket, above suggestion worked and was able to fix the {{[INSTALL_PARSE_FAILED_NO_CERTIFICATES]}} error by doing an Environment reset and running {{Zip - d %APK_Path% 'META-INF/.SF' 'META-INF/.RSA' 'META-INF/*SF'}}", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-07-08T18:32:52.000+0000", "updated": "2020-07-08T18:32:52.000+0000" }, { "id": "456026", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "If the META-INF files in the APK are causing an issue, then you can have the gradle build system exclude them.\r\n\r\nCreate a {{build.gradle}} file under the project's {{./platform/android}} directory.\r\n{code:groovy}\r\nandroid {\r\n\tpackagingOptions {\r\n\t\texclude 'META-INF/*'\r\n\t}\r\n}\r\n{code}\r\n", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-07-08T21:49:13.000+0000", "updated": "2020-07-08T21:49:13.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }