{ "id": "109737", "key": "TIMOB-12740", "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": "15691", "description": "2013 Sprint 19", "name": "2013 Sprint 19", "archived": true, "released": true, "releaseDate": "2013-09-20" }, { "id": "15693", "description": "2013 Sprint 19 API", "name": "2013 Sprint 19 API", "archived": true, "released": true, "releaseDate": "2013-09-20" }, { "id": "15593", "description": "Release 3.1.3", "name": "Release 3.1.3", "archived": true, "released": true, "releaseDate": "2013-09-18" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-09-17T17:54:22.000+0000", "created": "2013-02-14T21:23:39.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "qe-3.1.3", "qe-sdk3.0.2", "tooling" ], "versions": [], "issuelinks": [ { "id": "32337", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "86557", "key": "TIMOB-7680", "fields": { "summary": "iOS: iTunes_sync.scpt - Error reported when iTunes sync script launched during build with iPod connected to iTunes", "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" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "32724", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "109455", "key": "TIMOB-12647", "fields": { "summary": "iOS: iTunes Sync - \"Failed to initiate iTunes sync\" message is returned even though your app is synced with iTunes", "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" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-11-25T20:55:26.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": "10207", "name": "Tooling" } ], "description": "Description:\r\nHaving 2 devices plugged in and trying to install app on device intermittently fails to initiate iTunes. However it does auto sync app on one of devices.\r\nDisconnecting one of the devices and trying to install app on it works fine.\r\n\r\n\r\nActual result in 3.0.0.GA\r\n[WARN] : \b\b \b An error occurred running the iOS Package Application tool\r\n(it does initiate iTunes and sync works fine, this message appears every time)\r\nActual result in 3.0.2:\r\n[INFO] : \b\b \b Installing application into iTunes\r\n[INFO] : \b\b \b Initiating iTunes sync\r\n[ERROR] : \b\b \bFailed to initiate iTunes sync\r\n[ERROR] : \b\b \b/Users/oromero/Library/Application Support/Titanium/mobilesdk/osx/3.0.2.v20130207164659/iphone/itunes_sync.scpt: execution error: Can’t make name of *4* into type Unicode text. (-1700)\r\n[ERROR] : \b\b \b\r\n[ERROR] : \b\b \bProject failed to build after 20s 423ms\r\n\r\n\r\n\r\nTested with:\r\nTitanium Studio, build: 3.0.2.201302141201\r\nTitanium SDK, build: 3.0.2.v20130207164659 \r\niTunes 11.0.1\r\n\r\nOne device and One cord plugged in to Mac 10.8.2 Mountain Lion\r\n\r\nActual result:\r\n[INFO] : \b\b \b Initiating iTunes sync\r\n[ERROR] : \b\b \bFailed to initiate iTunes sync\r\n[ERROR] : \b\b \b/Users/oromero/Library/Application Support/Titanium/mobilesdk/osx/3.0.2.v20130207164659/iphone/itunes_sync.scpt: execution error: Can’t make name of *3* into type Unicode text. (-1700)\r\n[ERROR] : \b\b \b\r\n[ERROR] : \b\b \bProject failed to build after 17s 73ms\r\n\r\nI noticed iTunes sync usually fails after importing projects. \r\n\r\n", "attachment": [], "flagged": false, "summary": "iOS: iTunes script intermittently fails to initiate sync", "creator": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium Studio, build: 3.0.2.201302081641\r\nTitanium SDK, build: 3.0.2.v20130207164659 \r\nDevices:\r\niPhone4 iOS 5.1.1\r\niPad mini iOS 6.0.2", "comment": { "comments": [ { "id": "267413", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Occurs with 3.1.2 Studio and SDK 3.1.2.GA\n\n{code}\n[ERROR] : Failed to initiate iTunes sync\n[ERROR] : /Users/emerriman/Library/Application Support/Titanium/mobilesdk/osx/3.1.2.GA/iphone/itunes_sync.scpt: execution error: Can’t make name of 4 into type Unicode text. (-1700)\n[ERROR] : \n[ERROR] : Project failed to build after 1m 25s 638ms\n{code}\n", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-20T22:29:26.000+0000", "updated": "2013-08-20T22:29:26.000+0000" }, { "id": "267892", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Try this:\n{code}\ntell application \"iTunes\"\n\trepeat with n in sources\t\n\t\tif (kind of n is iPod) then\n\t\t\ttry\n\t\t\t\tupdate n\n\t\t\ton error errorStr number errorNumber\n\t\t\t\tlog \"The device \" & name of source n & \" was unable to sync (\" & errorStr & \":\" & errorNumber & \")\"\n\t\t\tend try\n\t\tend if\n\tend repeat\nend tell\n{code}", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-23T18:35:50.000+0000", "updated": "2013-08-23T18:35:50.000+0000" }, { "id": "267893", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Part of the problem was the existing line:\n{code}\non error errorStr number errorNumber\n\t\t\t\tlog \"The device \" & name of n & \" was unable to sync (\" & errorStr & \":\" & errorNumber & \")\"\n{code}\n\nIt should be \"name of source n\". Fixing this generates another error, which looks like this for our device \"aquaman\":\n{code}\n(*The device aquaman was unable to sync (iTunes got an error: 5 doesn’t understand the update message.:-1708)*)\n{code}\n\nChanging the lines:\n{code}\nrepeat with n from 1 to the count of sources\n\t\tif the kind of source n is iPod then\n{code}\n\nto this:\n{code}\nrepeat with n in sources\t\n\t\tif (kind of n is iPod) then\n{code}\nSorts out that problem.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-23T18:40:45.000+0000", "updated": "2013-08-23T18:40:45.000+0000" }, { "id": "269068", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Another sample:\n{code}\nif not checkItunesIsActive() then return\ntell application \"iTunes\"\n\ttry\n\t\tset theSources to (every source whose kind is iPod)\n\t\trepeat with src in theSources\n\t\t\ttry\n\t\t\t\twith timeout of 600 seconds\n\t\t\t\t\ttell src to update\n\t\t\t\tend timeout\n\t\t\ton error errorStr number errorNumber\n\t\t\t\tlog \"The device \" & name of n & \" was unable to sync (\" & errorStr & \":\" & errorNumber & \")\"\n\t\t\tend try\n\t\tend repeat\n\tend try\nend tell\nto checkItunesIsActive()\n\ttell application id \"sevs\" to return (exists (some process whose name is \"iTunes\"))\nend checkItunesIsActive\n{code}", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-30T17:49:34.000+0000", "updated": "2013-08-30T17:49:34.000+0000" }, { "id": "269069", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "After some additional testing the 2 sample scripts above will fail with an error when Itunes is already syncing. I have not accounted for this. The error returned is -1708.\n", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-30T17:53:49.000+0000", "updated": "2013-08-30T17:53:49.000+0000" }, { "id": "269108", "author": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/4629", "updateAuthor": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-30T20:33:52.000+0000", "updated": "2013-08-30T20:33:52.000+0000" }, { "id": "269110", "author": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Backport PR: https://github.com/appcelerator/titanium_mobile/pull/4630", "updateAuthor": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-30T20:38:40.000+0000", "updated": "2013-08-30T20:38:40.000+0000" }, { "id": "269111", "author": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This was the proper fix for itunes_sync.scpt, which I paste below since the actual file that is checked into the repo is a binary file AppleScript file.\n\n{code}\n\ntell application \"iTunes\"\n\trepeat with iTunesSource in sources\n\t\tif (kind of iTunesSource is iPod) then\n\t\t\ttry\n\t\t\t\tupdate iTunesSource\n\t\t\ton error errorStr number errorNumber\n\t\t\t\tlog \"The device \" & name of iTunesSource & \" was unable to sync (\" & errorStr & \":\" & errorNumber & \")\"\n\t\t\tend try\n\t\tend if\n\tend repeat\nend tell\n{code}", "updateAuthor": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-30T20:42:08.000+0000", "updated": "2013-08-30T20:42:08.000+0000" }, { "id": "270196", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This _is_ merged to 3.1.3, but still _remains to be merged_ for 3.2.0 (master)", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-07T22:29:28.000+0000", "updated": "2013-09-07T22:29:28.000+0000" }, { "id": "270261", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "To test the fix:\n1) Connect 3 iOS devices\n2) Build with 3.1.2.GA to see fail case. (this ticket)\n3) Build with 3.1.3.v2013090714460 or later - pass if no error presented on sync step\n4) If using iTunes 11, set app to install and sync all devices\n5) Make a change to project in studio - re-build for device\n6) After sync, ensure all devices see the update you made\n7) Additional test - try to time a manual sync via iTunes to occur when the build sync starts (potential error generation)\n8) Additional test - launch the script via applescript editor, set bottom tab to \"events\" and run script. Ad-hoc test \n\n", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-09T04:10:50.000+0000", "updated": "2013-09-09T04:10:50.000+0000" }, { "id": "270288", "author": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I Executed above 1-7 steps successfully with no intermittent fail or crash. But could not execute the 8th step.", "updateAuthor": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-09T11:37:55.000+0000", "updated": "2013-09-09T11:37:55.000+0000" }, { "id": "271526", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "8th Step verified. Closing as fixed.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-17T17:53:55.000+0000", "updated": "2013-09-17T17:53:55.000+0000" }, { "id": "274301", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Note that this has still not been merged to master.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-08T23:11:05.000+0000", "updated": "2013-10-08T23:11:05.000+0000" }, { "id": "276035", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "As Ingo stated, this still occurs on:\n\nTitanium Studio, build: 3.2.0.201310181940\nOS: Mac OS X Mountain Lion (10.8.5)\nSDK build: 3.2.0.v20131018154951\nTi CLI: 3.2.0 (72f7426b4ee6c2d2883c666d5b7e03906a16012f)", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-10-21T21:59:08.000+0000", "updated": "2013-10-21T21:59:08.000+0000" }, { "id": "276235", "author": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~emerriman], can you try again testing and merging this with master/3.2.0 please? You couldn't do this before because master was broken, but I don't think this is still the case.", "updateAuthor": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-22T21:37:48.000+0000", "updated": "2013-10-22T21:39:20.000+0000" }, { "id": "276478", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~mlangston], I still see this issue on the latest master/3.2.0\n\nTested on:\n\nTitanium Studio, build: 3.2.0.201310230548\nOS: Mac OS X Mountain Lion (10.8.5)\nSDK build: 3.2.0.v20131023140842\nTi CLI: 3.2.0 (72f7426b4ee6c2d2883c666d5b7e03906a16012f)", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-10-23T22:34:19.000+0000", "updated": "2013-10-23T22:34:19.000+0000" }, { "id": "276479", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "It's not merged. It still has a merge-3.2.0 label on it.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-23T22:35:42.000+0000", "updated": "2013-10-23T22:35:42.000+0000" }, { "id": "280777", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Was able to still reproduce the issue on:\r\n\r\nTitanium Studio, build: 3.2.0.201311211626\r\nSDK build: 3.2.0.v20131121163252 \r\nCLI: 3.2.0-alpha\r\nAlloy: 1.3.0 (it://github.com/appcelerator/alloy.git#1_3_X)\r\nXcode: 5.0.2\r\nDevice: ipad 2 (7.0.2), iphone 5 (6.1.3), iphone 5 (7.0.2)\r\n\r\nNote: \r\n\r\nIf using 3.2.0 SDK, you will get a different error message, but the bug is still the same:\r\n\r\n[TRACE] : ** BUILD SUCCEEDED **\r\n[INFO] : Installing application into iTunes\r\n[INFO] : Initiating iTunes sync\r\n[ERROR] : Project failed to build after 15s 565ms\r\n\r\nAnd the ~/Library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/iphone/itunes_sync.scpt will fix this issue.", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-11-22T19:58:46.000+0000", "updated": "2013-11-22T20:02:21.000+0000" }, { "id": "281217", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed. Verified iTunes script does not intermittently fail to initiate sync. Also, verified the same script from ~/Library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/iphone/itunes_sync.scpt is in the 3.2.0 SDK.\n\nTested on:\n\nTitanium Studio, build: 3.2.0.201311221859\nSDK build: 3.2.0.v20131122172908\nCLI: 3.2.0-alpha\nAlloy: 1.3.0-alpha6\nXcode: 5.0.2\nDevice: ipad 3 (7.0.2), iphone 5 (6.1.3), iphone 5 (7.0.2)", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-11-25T20:55:17.000+0000", "updated": "2013-11-25T20:55:17.000+0000" } ], "maxResults": 19, "total": 19, "startAt": 0 } } }