Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23790] node-ios-device: emitter error during process exit and uncaught exception

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2016-08-22T06:37:44.000+0000
Affected Version/sn/a
Fix Version/sRelease 5.5.0, node-ios-device 0.11.1, ioslib 0.13.1, node-ios-device 0.11.2, ioslib 0.13.2, ioslib 0.15.0, ioslib 0.15.1, ioslib 0.15.2, ioslib 0.15.3, ioslib 0.15.4, node-ios-device 1.0.0, ioslib 1.0.0, ioslib 1.0.1
ComponentsiOS, Tooling
Labelsn/a
ReporterChris Barber
AssigneeChris Barber
Created2016-08-18T20:50:19.000+0000
Updated2018-08-06T17:49:11.000+0000

Description

Running an iOS app on device from Ti CLI causes exception when quitting via CTRL-C.
/Users/chris/Library/Application Support/Titanium/mobilesdk/osx/6.1.0/node_modules/node-ios-device/ios-device.js:199
		if (emitter._events[udid].length <= 0) {
                           ^
TypeError: Cannot read property 'length' of undefined
    at stop (/Users/chris/Library/Application Support/Titanium/mobilesdk/osx/6.1.0/node_modules/node-ios-device/ios-device.js:199:28)
    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)
I also noticed that node-ios-device would sometimes blow up due to an uncaught exception:
<snip>
[TRACE] ** BUILD SUCCEEDED **
[INFO]  Finished building the application in 37s 687ms
  node-ios-device Calling binding.devices() +44s
  node-ios-device Found 1 device +1ms
[INFO]  Installing app on device: Milkshake
  node-ios-device Found 1 device +978ms
libc++abi.dylib: terminating with uncaught exception of type std::runtime_error
Abort trap: 6

Comments

  1. Chris Barber 2016-08-18

    node-ios-device PR: https://github.com/appcelerator/node-ios-device/pull/21 Published node-ios-device@0.11.1 ioslib PR: https://github.com/appcelerator/ioslib/pull/40 Published ioslib@0.13.1 tisdk master PR: https://github.com/appcelerator/titanium_mobile/pull/8240 tisdk 6_0_X PR: https://github.com/appcelerator/titanium_mobile/pull/8241 tisdk 5_5_X PR: https://github.com/appcelerator/titanium_mobile/pull/8242
  2. Chris Barber 2016-08-18

    To test, build an iOS app for device. Make sure the device is connected over both USB and Wifi. How do you know if you are connected via Wifi? I have no clue. Another way to test this is to just run node-ios-device's log test since the bug essentially has to do with starting the syslog service.
  3. Eric Merriman 2018-08-06

    Cleaning up older fixed issues. If this issue should not have been closed as fixed, please reopen.

JSON Source