{"action":"created","issue":{"url":"https://api.github.com/repos/don/cordova-plugin-ble-central/issues/235","repository_url":"https://api.github.com/repos/don/cordova-plugin-ble-central","labels_url":"https://api.github.com/repos/don/cordova-plugin-ble-central/issues/235/labels{/name}","comments_url":"https://api.github.com/repos/don/cordova-plugin-ble-central/issues/235/comments","events_url":"https://api.github.com/repos/don/cordova-plugin-ble-central/issues/235/events","html_url":"https://github.com/don/cordova-plugin-ble-central/issues/235","id":153531079,"number":235,"title":"Unhandled exception crash on connect","user":{"login":"artman186","id":12416425,"avatar_url":"https://avatars.githubusercontent.com/u/12416425?v=3","gravatar_id":"","url":"https://api.github.com/users/artman186","html_url":"https://github.com/artman186","followers_url":"https://api.github.com/users/artman186/followers","following_url":"https://api.github.com/users/artman186/following{/other_user}","gists_url":"https://api.github.com/users/artman186/gists{/gist_id}","starred_url":"https://api.github.com/users/artman186/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artman186/subscriptions","organizations_url":"https://api.github.com/users/artman186/orgs","repos_url":"https://api.github.com/users/artman186/repos","events_url":"https://api.github.com/users/artman186/events{/privacy}","received_events_url":"https://api.github.com/users/artman186/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-06T20:24:01Z","updated_at":"2016-05-09T12:57:26Z","closed_at":"2016-05-09T12:57:26Z","body":"Hey Don, got another issue for you.  We have a sporadic error occurring that actually creates a hard crash of the application (this doesn't happen every time, but does happen often).  The iOS crash logs aren't much help, although I have attached one (this happens on multiple devices).  I think the key lies in the JavaScript console output right before the app crashes:\r\n\r\n```\r\n<Warning>: connect\r\n<Warning>: Connecting to peripheral with UUID : E85105F1-8FDE-DEEC-6136-136D443828A1\r\n<Warning>: didConnectPeripheral\r\n<Warning>: didDiscoverServices\r\n<Warning>: didDiscoverCharacteristicsForService\r\n<Warning>: Found characteristics for service <CBService: 0x16148d0a0, isPrimary = YES, UUID = 1BC50001-0200-0AA5-E311-24CB004A98C5>\r\n<Warning>: Characteristic <CBCharacteristic: 0x15f7acd20, UUID = 1BC50002-0200-0AA5-E311-24CB004A98C5, properties = 0x12, value = (null), notifying = NO>\r\n<Warning>: Characteristic <CBCharacteristic: 0x15f76e7e0, UUID = 1BC50006-0200-0AA5-E311-24CB004A98C5, properties = 0x12, value = (null), notifying = NO>\r\n<Warning>: didDiscoverCharacteristicsForService\r\n<Warning>: Found characteristics for service <CBService: 0x16142e6c0, isPrimary = YES, UUID = B5600001-A0F8-16AF-BB42-1D3B642EC2E1>\r\n<Warning>: Characteristic <CBCharacteristic: 0x1613395d0, UUID = B5600003-A0F8-16AF-BB42-1D3B642EC2E1, properties = 0x12, value = (null), notifying = NO>\r\n<Warning>: Characteristic <CBCharacteristic: 0x161339630, UUID = B5600004-A0F8-16AF-BB42-1D3B642EC2E1, properties = 0x12, value = (null), notifying = NO>\r\n<Warning>: Characteristic <CBCharacteristic: 0x15f7d90f0, UUID = B5600005-A0F8-16AF-BB42-1D3B642EC2E1, properties = 0xA, value = (null), notifying = NO>\r\n<Warning>: Characteristic <CBCharacteristic: 0x15f7d9150, UUID = B5600007-A0F8-16AF-BB42-1D3B642EC2E1, properties = 0x12, value = (null), notifying = NO>\r\n<Warning>: Characteristic <CBCharacteristic: 0x161392cd0, UUID = B5600008-A0F8-16AF-BB42-1D3B642EC2E1, properties = 0xA, value = (null), notifying = NO>\r\n<Warning>: Characteristic <CBCharacteristic: 0x161392d30, UUID = B5600009-A0F8-16AF-BB42-1D3B642EC2E1, properties = 0xA, value = (null), notifying = NO>\r\n<Warning>: Characteristic <CBCharacteristic: 0x161392d90, UUID = B560000B-A0F8-16AF-BB42-1D3B642EC2E1, properties = 0x8, value = (null), notifying = NO>\r\n<Warning>: didDiscoverCharacteristicsForService\r\n<Warning>: Found characteristics for service <CBService: 0x16148c300, isPrimary = YES, UUID = Battery>\r\n<Warning>: Characteristic <CBCharacteristic: 0x1613304f0, UUID = Battery Level, properties = 0x12, value = (null), notifying = NO>\r\n<Warning>: didDiscoverCharacteristicsForService\r\n<Warning>: Found characteristics for service <CBService: 0x1614901b0, isPrimary = YES, UUID = Device Information>\r\n<Warning>: Characteristic <CBCharacteristic: 0x16136da20, UUID = Manufacturer Name String, properties = 0x2, value = (null), notifying = NO>\r\n<Warning>: Characteristic <CBCharacteristic: 0x16138af30, UUID = Model Number String, properties = 0x2, value = (null), notifying = NO>\r\n<Warning>: Characteristic <CBCharacteristic: 0x161347560, UUID = Hardware Revision String, properties = 0x2, value = (null), notifying = NO>\r\n<Warning>: Characteristic <CBCharacteristic: 0x161355880, UUID = Firmware Revision String, properties = 0x2, value = (null), notifying = NO>\r\n<Warning>: didDiscoverCharacteristicsForService\r\n<Warning>: Found characteristics for service <CBService: 0x15f5f7730, isPrimary = YES, UUID = 00001530-1212-EFDE-1523-785FEABCD123>\r\n<Warning>: Characteristic <CBCharacteristic: 0x16137ac50, UUID = 00001532-1212-EFDE-1523-785FEABCD123, properties = 0x4, value = (null), notifying = NO>\r\n<Warning>: Characteristic <CBCharacteristic: 0x161375770, UUID = 00001531-1212-EFDE-1523-785FEABCD123, properties = 0x18, value = (null), notifying = NO>\r\n<Warning>: read\r\n<Warning>: getData\r\n<Error>: -[NSNull isEqualToString:]: unrecognized selector sent to instance 0x1a1af7490\r\n<Error>: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull isEqualToString:]: unrecognized selector sent to instance 0x1a1af7490'\r\n\r\n```\r\nWe are running version 1.1.0, this is happening on various iPads running version 9.2.x and 9.3.1.  The attached crash logs are from an iPad Air 2 running iOS 9.3.1.\r\n[crashes.zip](https://github.com/don/cordova-plugin-ble-central/files/252987/crashes.zip)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/don/cordova-plugin-ble-central/issues/comments/217856752","html_url":"https://github.com/don/cordova-plugin-ble-central/issues/235#issuecomment-217856752","issue_url":"https://api.github.com/repos/don/cordova-plugin-ble-central/issues/235","id":217856752,"user":{"login":"artman186","id":12416425,"avatar_url":"https://avatars.githubusercontent.com/u/12416425?v=3","gravatar_id":"","url":"https://api.github.com/users/artman186","html_url":"https://github.com/artman186","followers_url":"https://api.github.com/users/artman186/followers","following_url":"https://api.github.com/users/artman186/following{/other_user}","gists_url":"https://api.github.com/users/artman186/gists{/gist_id}","starred_url":"https://api.github.com/users/artman186/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artman186/subscriptions","organizations_url":"https://api.github.com/users/artman186/orgs","repos_url":"https://api.github.com/users/artman186/repos","events_url":"https://api.github.com/users/artman186/events{/privacy}","received_events_url":"https://api.github.com/users/artman186/received_events","type":"User","site_admin":false},"created_at":"2016-05-09T12:57:26Z","updated_at":"2016-05-09T12:57:26Z","body":"I added a lot more logging myself, and it turns out the issue was on my end.  We identified a scenario where we were in fact sending an \"undefined\" as a device ID so the crash wasn't as \"inconsistent\" as we thought.  My apologies, thanks for checking into this."}}