{"action":"created","issue":{"url":"https://api.github.com/repos/hypery2k/cordova-email-plugin/issues/23","repository_url":"https://api.github.com/repos/hypery2k/cordova-email-plugin","labels_url":"https://api.github.com/repos/hypery2k/cordova-email-plugin/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/hypery2k/cordova-email-plugin/issues/23/comments","events_url":"https://api.github.com/repos/hypery2k/cordova-email-plugin/issues/23/events","html_url":"https://github.com/hypery2k/cordova-email-plugin/issues/23","id":187575180,"number":23,"title":"Crash when checking availability","user":{"login":"ohh2ahh","id":2352329,"avatar_url":"https://avatars.githubusercontent.com/u/2352329?v=3","gravatar_id":"","url":"https://api.github.com/users/ohh2ahh","html_url":"https://github.com/ohh2ahh","followers_url":"https://api.github.com/users/ohh2ahh/followers","following_url":"https://api.github.com/users/ohh2ahh/following{/other_user}","gists_url":"https://api.github.com/users/ohh2ahh/gists{/gist_id}","starred_url":"https://api.github.com/users/ohh2ahh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ohh2ahh/subscriptions","organizations_url":"https://api.github.com/users/ohh2ahh/orgs","repos_url":"https://api.github.com/users/ohh2ahh/repos","events_url":"https://api.github.com/users/ohh2ahh/events{/privacy}","received_events_url":"https://api.github.com/users/ohh2ahh/received_events","type":"User","site_admin":false},"labels":[{"id":181767277,"url":"https://api.github.com/repos/hypery2k/cordova-email-plugin/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":{"login":"hypery2k","id":979121,"avatar_url":"https://avatars.githubusercontent.com/u/979121?v=3","gravatar_id":"","url":"https://api.github.com/users/hypery2k","html_url":"https://github.com/hypery2k","followers_url":"https://api.github.com/users/hypery2k/followers","following_url":"https://api.github.com/users/hypery2k/following{/other_user}","gists_url":"https://api.github.com/users/hypery2k/gists{/gist_id}","starred_url":"https://api.github.com/users/hypery2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hypery2k/subscriptions","organizations_url":"https://api.github.com/users/hypery2k/orgs","repos_url":"https://api.github.com/users/hypery2k/repos","events_url":"https://api.github.com/users/hypery2k/events{/privacy}","received_events_url":"https://api.github.com/users/hypery2k/received_events","type":"User","site_admin":false},"assignees":[{"login":"hypery2k","id":979121,"avatar_url":"https://avatars.githubusercontent.com/u/979121?v=3","gravatar_id":"","url":"https://api.github.com/users/hypery2k","html_url":"https://github.com/hypery2k","followers_url":"https://api.github.com/users/hypery2k/followers","following_url":"https://api.github.com/users/hypery2k/following{/other_user}","gists_url":"https://api.github.com/users/hypery2k/gists{/gist_id}","starred_url":"https://api.github.com/users/hypery2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hypery2k/subscriptions","organizations_url":"https://api.github.com/users/hypery2k/orgs","repos_url":"https://api.github.com/users/hypery2k/repos","events_url":"https://api.github.com/users/hypery2k/events{/privacy}","received_events_url":"https://api.github.com/users/hypery2k/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2016-11-06T17:22:01Z","updated_at":"2016-11-18T19:07:23Z","closed_at":null,"body":"The plugin crashes with the following error when it checks for the availability (see screenshot).\r\n\r\n```\r\n*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array'\r\n*** First throw call stack:\r\n(0x1890821c0 0x187abc55c 0x188f5e4ac 0x1001916dc 0x10034925c 0x10034921c 0x1003572d4 0x100358e6c 0x100358bb8 0x1881162b8 0x188115da4)\r\nlibc++abi.dylib: terminating with uncaught exception of type NSException\r\n(lldb)\r\n```\r\n\r\n![screenshot](https://cloud.githubusercontent.com/assets/2352329/20039937/d8838cc4-a44d-11e6-9561-257517e33dbe.png)\r\n\r\nI'm using the plugin in combination with Ionic 2 RC.2 and [Ionic Native](https://ionicframework.com/docs/v2/native/email-composer/). The app is running on a real device with iOS 10.1.1.\r\n\r\nMy code:\r\n```\r\n    let address: string = '...';\r\n    let subject: string = '...';\r\n    \r\n    EmailComposer.isAvailable().then((available: boolean) => {\r\n      if(available) {\r\n        let email = {\r\n          to: address,\r\n          subject: subject,\r\n          isHtml: false\r\n        };\r\n\r\n        EmailComposer.open(email);\r\n      }\r\n      else {\r\n        // Fallback\r\n      }\r\n    });\r\n```\r\n\r\n```\r\nSystem information:\r\n\r\nCordova CLI: 6.4.0\r\nIonic Framework Version: 2.0.0-rc.2\r\nIonic CLI Version: 2.1.4\r\nIonic App Lib Version: 2.1.2\r\nIonic App Scripts Version: 0.0.39\r\nios-deploy version: 1.9.0\r\nios-sim version: 5.0.9\r\nOS: Mac OS X Sierra\r\nNode Version: v7.0.0\r\nXcode version: Xcode 8.1 Build version 8B62\r\n```\r\n\r\n<bountysource-plugin>\r\n\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/39006702-crash-when-checking-availability?utm_campaign=plugin&utm_content=tracker%2F12875371&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F12875371&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/hypery2k/cordova-email-plugin/issues/comments/261614650","html_url":"https://github.com/hypery2k/cordova-email-plugin/issues/23#issuecomment-261614650","issue_url":"https://api.github.com/repos/hypery2k/cordova-email-plugin/issues/23","id":261614650,"user":{"login":"hypery2k","id":979121,"avatar_url":"https://avatars.githubusercontent.com/u/979121?v=3","gravatar_id":"","url":"https://api.github.com/users/hypery2k","html_url":"https://github.com/hypery2k","followers_url":"https://api.github.com/users/hypery2k/followers","following_url":"https://api.github.com/users/hypery2k/following{/other_user}","gists_url":"https://api.github.com/users/hypery2k/gists{/gist_id}","starred_url":"https://api.github.com/users/hypery2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hypery2k/subscriptions","organizations_url":"https://api.github.com/users/hypery2k/orgs","repos_url":"https://api.github.com/users/hypery2k/repos","events_url":"https://api.github.com/users/hypery2k/events{/privacy}","received_events_url":"https://api.github.com/users/hypery2k/received_events","type":"User","site_admin":false},"created_at":"2016-11-18T19:07:23Z","updated_at":"2016-11-18T19:07:23Z","body":"does it working with 1.2.2?"}}
{"actor":{"display_login":"hypery2k"}}