Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23823] iOS: Error when device is disconnected while running a build

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2016-08-30T04:01:02.000+0000
Affected Version/sRelease 5.5.0
Fix Version/sRelease 5.5.0, ioslib 0.13.2
ComponentsiOS, Tooling
Labelsn/a
ReporterChris Barber
AssigneeChris Barber
Created2016-08-24T22:55:56.000+0000
Updated2016-09-01T22:11:05.000+0000

Description

There is a bug in node-ios-device that occurs when you build an iOS app for device, then launch it. After the log output has been displayed, disconnect the device and the iOS build will detect the disconnection and shutdown the log relaying, however the new node-ios-device changes will now throw an error when trying to turn off syslog relaying for a device that isn't connected.
[TRACE] ** BUILD SUCCEEDED **
[INFO]  Finished building the application in 56s 251ms
[INFO]  Installing app on device: Milkshake
[INFO]  App successfully installed on device: Milkshake
Please manually launch the application or press CTRL-C to quit

-- Start application log -----------------------------------------------------
[DEBUG] Reading stylesheet from: /var/containers/Bundle/Application/5EEE6F9B-704E-4E2D-B508-D05A538DD331/testapp.app/stylesheet.plist
[INFO]  testapp/1.0 (6.1.0.46368b4)
[DEBUG] Loading: /var/containers/Bundle/Application/5EEE6F9B-704E-4E2D-B508-D05A538DD331/testapp.app/app.js, Resource: app_js
[DEBUG] { 
[DEBUG]     prop = 42;
[DEBUG] } 
[DEBUG] Loading: /var/containers/Bundle/Application/5EEE6F9B-704E-4E2D-B508-D05A538DD331/testapp.app/_app_props_.json, Resource: _app_props__json
[INFO]  n = 1
[INFO]  (null)
[DEBUG] (null)
[INFO]  (null)
[WARN]  (null)
[ERROR] (null)
[TRACE] (null)
[DEBUG] (null)
[INFO]  (null)
[WARN]  (null)
[ERROR] (null)
[DEBUG] Application booted in 510.275006 ms

/Users/chris/Library/Application Support/Titanium/mobilesdk/osx/6.1.0/node_modules/node-ios-device/ios-device.js:200
			binding.stopLogRelay(udid);
           ^
Error: Device '96b755565d7a18f229efb26408cdab44b7fc0255' not connected
    at Error (native)
    at stop (/Users/chris/Library/Application Support/Titanium/mobilesdk/osx/6.1.0/node_modules/node-ios-device/ios-device.js:200:12)
    at /Users/chris/Library/Application Support/Titanium/mobilesdk/osx/6.1.0/node_modules/ioslib/lib/device.js:118:16
    at EventEmitter.handler (/Users/chris/Library/Application Support/Titanium/mobilesdk/osx/6.1.0/node_modules/node-ios-device/ios-device.js:102:12)
    at emitOne (events.js:77:13)
    at EventEmitter.emit (events.js:169:7)
NOTE: the device was disconnected after the "Application booted..." line.

Comments

  1. Chris Barber 2016-08-24

    Published node-ios-device@0.11.2. PR https://github.com/appcelerator/node-ios-device/pull/23. Published ioslib@0.13.2. PR https://github.com/appcelerator/ioslib/pull/41. Titanium Mobile master PR: https://github.com/appcelerator/titanium_mobile/pull/8265 Titanium Mobile 6_0_X PR: https://github.com/appcelerator/titanium_mobile/pull/8266 Titanium Mobile 5_5_X PR: https://github.com/appcelerator/titanium_mobile/pull/8267
  2. Chee Kiat Ng 2016-08-26

    CR and FT passed. when device is disconnected after launching the app, I see {{-- End application log ----------} PRs merged
  3. Eric Wieber 2016-09-01

    Verified fixed, using: MacOS 10.12 (16A239m) Studio 4.7.1.201608190732 Ti SDK 5.5.0.v20160831204306 Appc NPM 4.2.7 Appc CLI 5.5.0-5 Alloy 1.9.1 Xcode 8.0 (8S201h) Disconnecting a device while an app is running no longer throws an error. Instead a warning indicating the device is no longer connected is displayed. Tested by creating several apps, building them for devices, then disconnecting the devices while the app is running and printing messages to the console.

JSON Source