{ "id": "84020", "key": "TIMOB-6739", "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": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" }, { "id": "12091", "description": "", "name": "Sprint 2011-51", "archived": true, "released": true, "releaseDate": "2011-12-26" }, { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" }, { "id": "12677", "description": "Release 1.8 Service Pack 1", "name": "Release 1.8.1", "archived": true, "released": true, "releaseDate": "2012-01-31" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-12-19T11:13:58.000+0000", "created": "2011-12-17T11:12:35.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "verified-1.8.0.1" ], "versions": [ { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" } ], "issuelinks": [], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2012-08-27T13:43:12.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": "11500", "name": "MobileWeb", "description": "Mobile Web (HTML) Platform" } ], "description": "I seem to be unable to package a project for MobileWeb in Titanium Studio.\r\n\r\nSteps to replicate:\r\n\r\n# Install 1.8.0.1.RC2\r\n# Create a new mobile project, selecting at least Mobile Web as a platform\r\n# Make sure the selected SDK in tiapp.xml is 1.8.0.1.RC2\r\n# Choose Deploy > Package Mobile Web\r\n# Select \"Copy Mobile Web app to a directory\" and select a location on your file system\r\n# Click \"Finish\"\r\n\r\nA dialog comes up with \"Failed to package project\"\r\n\r\nTo diagnose, turn on Preferences > Studio > Troubleshooting, turn the slider to \"ALL\" and checkmark \"Debug specific components\", clicking on \"com.aptana.core/debug/shell\". Exit the preference dialog. Re-run the build and once the error happens, view the log file.\r\n\r\nAt the bottom is the command used to run the builder. For me, it is:\r\n\r\n\"/usr/bin/python\" \"/Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1.RC2/mobileweb/builder.py\" \"/Users/ingo/Documents/Aptana Studio 3 Workspace/rc2test\" \"production\"\r\n\r\nRunning that on the command line results in:\r\n\r\n{code}\r\n[DEBUG] found: /Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1.RC2/mobileweb/src/screen.js\r\n[DEBUG] found: /Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1.RC2/mobileweb/src/interactable.js\r\n[DEBUG] found: /Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1.RC2/mobileweb/src/clickable.js\r\n[DEBUG] found: /Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1.RC2/mobileweb/src/eventdriven.js\r\n[DEBUG] found: /Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1.RC2/mobileweb/src/styleable.js\r\nTraceback (most recent call last):\r\n File \"/Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1.RC2/mobileweb/builder.py\", line 21, in \r\n main(sys.argv)\r\n File \"/Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1.RC2/mobileweb/builder.py\", line 18, in main\r\n compiler.Compiler(project_dir,deploytype)\r\n File \"/Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1.RC2/mobileweb/compiler.py\", line 189, in __init__\r\n titanium_js += '%s;\\n' % self.load_api(api_file, api)\r\n File \"/Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1.RC2/mobileweb/compiler.py\", line 285, in load_api\r\n return jspacker.jsmin(file_contents)\r\n File \"/Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1.RC2/mobileweb/jspacker.py\", line 39, in jsmin\r\n JavascriptMinify().minify(ins, outs)\r\n File \"/Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1.RC2/mobileweb/jspacker.py\", line 213, in minify\r\n self._jsmin()\r\n File \"/Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1.RC2/mobileweb/jspacker.py\", line 204, in _jsmin\r\n self._action(1)\r\n File \"/Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1.RC2/mobileweb/jspacker.py\", line 159, in _action\r\n raise UnterminatedRegularExpression()\r\njspacker.UnterminatedRegularExpression\r\n{code}\r\n\r\nNote...switching from \"production\" to \"development\" makes the above command line work.\r\n", "attachment": [], "flagged": false, "summary": "MobileWeb: Unable to package project in Titanium Studio", "creator": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Works in 1.8.0.1.RC1, fails in 1.8.0.1.RC2, OS X Lion", "comment": { "comments": [ { "id": "176412", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I don't believe this is Titanium Studio specific, unless TiStudio is using the wrong command-line options.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-17T11:13:08.000+0000", "updated": "2011-12-17T11:13:08.000+0000" }, { "id": "176413", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Your commands are correct. We've never tested \"production\". Only \"development\". I'm not surprised it doesn't work.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2011-12-17T12:04:46.000+0000", "updated": "2011-12-17T12:04:58.000+0000" }, { "id": "176417", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Note that it _did_ work in the R1 release (and previous versions), so the break is recent.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-17T14:06:56.000+0000", "updated": "2011-12-17T14:06:56.000+0000" }, { "id": "176420", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "After reading the error more closely, I see that jsmin (jspacker.py) doesn't like the following line's regex:\r\n\r\n{code}\r\nreturn /^url\\(/.test(url) ? url : \"url(\" + Ti._5.getAbsolutePath(url) + \")\";\r\n{code}\r\n\r\nSpecifically, it's dying on the escaped \"(\". In any case, it's not a bug in mobileweb's code, but rather in jsmin.\r\n\r\nI tried updating jsmin to the latest version, but things broke badly.\r\n\r\nInstead of wasting time getting jsmin to work, I'd prefer to switch to Closure compiler (TIMOB-5997).", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2011-12-17T15:15:53.000+0000", "updated": "2011-12-17T15:15:53.000+0000" }, { "id": "176421", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "As it is, people can't package mobileweb at all in this release if they use Studio with RC2. What should I recommend as a work-around?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-17T15:43:04.000+0000", "updated": "2011-12-17T15:43:04.000+0000" }, { "id": "176422", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Well, since mobileweb isn't production ready, don't call builder with \"production\". Use \"development\" mode.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2011-12-17T15:57:52.000+0000", "updated": "2011-12-17T15:57:52.000+0000" }, { "id": "176427", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Pull request: https://github.com/appcelerator/titanium_mobile/pull/1044", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2011-12-17T19:21:25.000+0000", "updated": "2011-12-17T19:21:25.000+0000" }, { "id": "176429", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "To test, from Ti Studio, click Deploy > Package - Mobile Web. If you don't get any errors and the mobile web app launches, it worked!", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2011-12-17T19:22:38.000+0000", "updated": "2011-12-17T19:22:38.000+0000" }, { "id": "176535", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified as fixed in 1.8.0.1.\r\nSDK: 1.8.0.1.v20111219111633\r\nStudio: 1.0.7.201112152014\r\nOS: OS X Lion, Windows 7, Ubuntu 10.04\r\nBrowsers Tested: Chrome", "updateAuthor": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-19T12:31:00.000+0000", "updated": "2011-12-19T12:31:00.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }