{ "id": "163889", "key": "TIMOB-24017", "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": "16980", "description": "New V8", "name": "Release 6.0.0", "archived": false, "released": true, "releaseDate": "2016-11-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-10-13T10:21:09.000+0000", "created": "2016-10-11T23:19:51.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2017-03-20T17:11:06.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": "10206", "name": "iOS", "description": "iOS Platform" }, { "id": "10207", "name": "Tooling" } ], "description": "When a client connects to the log server in the iOS app, it would helpful for the server to immediately respond with information about the app including the app id, version, environment (sim/device), and deploy type.\r\n\r\nThe format can be simple and basically mimic how HTTP works. When a new connection is accepted, it would immediately write:\r\n\r\n{code}\r\nid: com.foo.bar\r\nname: Testapp\r\nversion: 1.0.0\r\ndeploy-type: development\r\ntitanium-sdk: 6.0.0\r\n\r\n{code}\r\n\r\nThe client will interpret all lines prior to {{\\n\\n}} to be a header. Subsequent lines are to be interpreted as log lines.\r\n\r\nWe need this feature so that a client can validate it has connected to the correct log server. It's possible for two different apps to listen on the same work and a client may think it's connecting to one app's log server when in fact it's connecting to another app's log server.", "attachment": [], "flagged": false, "summary": "iOS: Add support for headers to the log server", "creator": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "environment": null, "closedSprints": [ { "id": 732, "state": "closed", "name": "2016 Sprint 21 Tooling", "startDate": "2016-10-08T00:54:00.000Z", "endDate": "2016-10-22T00:54:00.000Z", "completeDate": "2016-10-24T04:18:13.798Z", "originBoardId": 199 } ], "comment": { "comments": [ { "id": "398794", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Published ioslib@1.0.2\r\nPR: https://github.com/appcelerator/ioslib/pull/50", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2016-10-13T02:03:16.000+0000", "updated": "2016-10-13T02:03:16.000+0000" }, { "id": "398795", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "TiSDK master PR: https://github.com/appcelerator/titanium_mobile/pull/8503\r\nTiSDK 6_0_X PR: https://github.com/appcelerator/titanium_mobile/pull/8504\r\n\r\nTo test:\r\n\r\n# Create an app called \"testapp1\"\r\n# Add {{12345}} in the {{}} section of the tiapp.xml\r\n# Build app for device\r\n# LEAVE CLI, SIM, & APP RUNNING!\r\n# Open 2nd terminal\r\n# Create an app called \"testapp2\"\r\n# Add {{12345}} in the {{}} section of the tiapp.xml\r\n# Build app for device\r\n\r\nNOTE: The app ids must be different.\r\n\r\nIt should error when the CLI tries to 2nd app tries to connect to the 2nd app's log server.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2016-10-13T02:21:53.000+0000", "updated": "2016-10-13T06:23:17.000+0000" }, { "id": "398805", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I used the test step after scons'ing the PR from 6_0_X. doesn't error out, still logging independently of each other.\r\n[~hansknoechel] if you have time test it out too?", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-10-13T04:37:06.000+0000", "updated": "2016-10-13T04:37:06.000+0000" }, { "id": "398806", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "OK, so this is probably impossible to test with the simulator because my code is too smart. If you look at the build log output for the first app, it will select the port 12345. However, if you look at the build log output for the 2nd app, it will say a different port than 12345. Why is this you might ask? The build starts a local Node.js server to make sure that the port is available since the iOS Simulator shares ports with the local machine.\r\n\r\nFor device builds, we can't tell if a port is available unless we try connecting to it. We could test the port, but this is not foolproof. If testapp1 is not running when testapp2 is building, but testapp1 is launched while testapp2 is being installed, then you'll still run into the problem that this ticket attempts to solve.\r\n\r\nSo, if you do the above steps for a device build, it should show the error for the 2nd app.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2016-10-13T06:22:46.000+0000", "updated": "2016-10-13T06:22:46.000+0000" }, { "id": "398819", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Great work! APPROVED!", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-10-13T10:20:55.000+0000", "updated": "2016-10-13T10:20:55.000+0000" }, { "id": "413726", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-20T17:11:06.000+0000", "updated": "2017-03-20T17:11:06.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }