{ "id": "143106", "key": "TIMOB-18402", "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": "14826", "description": "Release 5.1.0-remaining iOS9 features, Android M features", "name": "Release 5.1.0", "archived": false, "released": true, "releaseDate": "2015-11-20" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-10-02T03:28:55.000+0000", "created": "2015-01-19T17:07:16.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "supportTeam" ], "versions": [], "issuelinks": [], "assignee": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "updated": "2015-10-19T21:43:40.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": "13600", "name": "LiveView", "description": "Live preview of Titanium apps" } ], "description": "h3. Issue\r\n\r\nWhile working on Appcelerator Studio and running the app on iOS with liveview we are receiving an error related to an Android conditional code which is causing an error to be thrown in the console \"[INFO] : [LiveView] Error Evaluating app.js @ Line: 16\".\r\n\r\nh3. Log\r\n\r\n{code}\r\n-- Start simulator log -------------------------------------------------------\r\n[INFO] : Application started\r\n[DEBUG] : Reading stylesheet from: /Users/marco/Library/Developer/CoreSimulator/Devices/A84E39F0-A1C7-4056-8017-8E26CF0EDDED/data/Containers/Bundle/Application/12C3A09D-8B20-4334-A8B3-15590578B1BC/sample.app/stylesheet.plist\r\n[LiveView] Client connected\r\n[DEBUG] : 2015-01-19 10:52:21.278 sample[93591:4712422] You've implemented -[ application:performFetchWithCompletionHandler:], but you still need to add \"fetch\" to the list of your supported UIBackgroundModes in your Info.plist.\r\n[DEBUG] : 2015-01-19 10:52:21.278 sample[93591:4712422] You've implemented -[ application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add \"remote-notification\" to the list of your supported UIBackgroundModes in your Info.plist.\r\n[INFO] : sample/1.0 (3.5.0.0014f83)\r\n[DEBUG] : Loading: /Users/marco/Library/Developer/CoreSimulator/Devices/A84E39F0-A1C7-4056-8017-8E26CF0EDDED/data/Containers/Bundle/Application/12C3A09D-8B20-4334-A8B3-15590578B1BC/sample.app/app.js, Resource: app_js\r\n[DEBUG] : Loading: /Users/marco/Library/Developer/CoreSimulator/Devices/A84E39F0-A1C7-4056-8017-8E26CF0EDDED/data/Containers/Bundle/Application/12C3A09D-8B20-4334-A8B3-15590578B1BC/sample.app/_app_props_.json, Resource: _app_props__json\r\n[INFO] : This is iOS\r\n[INFO] : dd\r\n[INFO] : [LiveView] Error Evaluating app.js @ Line: 16\r\n[ERROR] : ReferenceError: Can't find variable: x\r\n[ERROR] : File: app.js\r\n[ERROR] : Line: 16\r\n[ERROR] : SourceId: \r\n[ERROR] : Backtrace:\r\n[ERROR] : undefined\r\n[DEBUG] : Application booted in 330.896020 ms\r\n{code}\r\n\r\nh3. Testcase\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow();\r\n\r\nif(Ti.Platform.osname == 'android'){\r\n\t Ti.API.info('This is Android');\r\n\t var x = 'dd';\r\n\t Ti.API.info(x);\r\n}else{\r\n\t Ti.API.info('This is iOS');\r\n\t var y = 'dd';\r\n\t Ti.API.info(y);\r\n}\r\n\r\nwin.open();\r\n\r\n{code}\r\n\r\nh3. Steps to repro\r\n\r\n1. Enable liveview\r\n2. Run the testcase in iOS\r\n\r\nExpected Result:\r\nThe app will open \r\n\r\nActual Result:\r\nThe app opens but we receive an error log \"[INFO] : [LiveView] Error Evaluating app.js @ Line: 16\" related to and android conditional code\r\n", "attachment": [], "flagged": false, "summary": "LiveView: Throwing error while evaluating Android conditional code on iOS ", "creator": { "name": "mcota", "key": "mcota", "displayName": "Marco Cota", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "mcota", "key": "mcota", "displayName": "Marco Cota", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK: 3.4.x, 3.5.x\r\nAppcStudio: 3.4.1.201410281743", "comment": { "comments": [ { "id": "346025", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "PR: https://github.com/appcelerator/liveview/pull/84", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2015-03-16T04:13:23.000+0000", "updated": "2015-03-16T04:13:23.000+0000" }, { "id": "365610", "author": { "name": "kkolipaka", "key": "kkolipaka", "displayName": "Kondal Kolipaka", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Merged into master branch", "updateAuthor": { "name": "kkolipaka", "key": "kkolipaka", "displayName": "Kondal Kolipaka", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-10-02T03:28:55.000+0000", "updated": "2015-10-02T03:28:55.000+0000" }, { "id": "367208", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "Verified as fixed, ran the test case on several iOS configurations, and did not receive the error in question:\r\n\r\n8.4 Device & Simulator.\r\n9.0 Device & Simulator.\r\n\r\nMac OSX El Capitan 10.11 (15A284)\r\nStudio: 4.4.0.201510161811\r\nTi SDK: 5.2.0.v20151018201232\r\nAppc NPM: 4.2.1-5\r\nAppc CLI: 5.2.0-15\r\nTi CLI: 5.0.4\r\nXcode 7.0(7A218)\r\nNode v0.12.7\r\nproduction\r\n\r\n*Closing ticket.*\r\n", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2015-10-19T21:43:24.000+0000", "updated": "2015-10-19T21:43:24.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }