[ 
https://issues.apache.org/jira/browse/CB-5769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13877115#comment-13877115
 ] 

Mark Van Cooten commented on CB-5769:
-------------------------------------

I'm seeing this as well.  

I personally have literally hundreds of contacts built up over the years from 
google contacts, and wouldn't want to go and find which are causing the issue.  
let alone ask my helpdesk to be able to assist users to do this.  

01-21 15:25:51.293: D/CordovaLog(17817): 
file:///data/data/com.ContactsApp/files/www/default/worklight/cordova.js: Line 
1034 : processMessage failed: Error: TypeError: Cannot read property 
'formatted' of null
01-21 15:25:51.293: D/CordovaLog(17817): 
file:///data/data/com.ContactsApp/files/www/default/worklight/cordova.js: Line 
1035 : processMessage failed: Stack: TypeError: Cannot read property 
'formatted' of null
01-21 15:25:51.293: D/CordovaLog(17817):     at 
file:///data/data/com.ContactsApp/files/www/default/js/main.js:51:39
01-21 15:25:51.293: D/CordovaLog(17817):     at 
file:///data/data/com.ContactsApp/files/www/default/worklight/plugins/org.apache.cordova.contacts/www/contacts.js:53:17
01-21 15:25:51.293: D/CordovaLog(17817):     at Object.callbackFromNative 
(file:///data/data/com.ContactsApp/files/www/default/worklight/cordova.js:291:54)
01-21 15:25:51.293: D/CordovaLog(17817):     at processMessage 
(file:///data/data/com.ContactsApp/files/www/default/worklight/cordova.js:1028:21)
01-21 15:25:51.293: D/CordovaLog(17817):     at Function.processMessages 
(file:///data/data/com.ContactsApp/files/www/default/worklight/cordova.js:1062:13)
01-21 15:25:51.293: D/CordovaLog(17817):     at pollOnce 
(file:///data/data/com.ContactsApp/files/www/default/worklight/cordova.js:932:17)
01-21 15:25:51.293: D/CordovaLog(17817):     at pollOnceFromOnlineEvent 
(file:///data/data/com.ContactsApp/files/www/default/worklight/cordova.js:927:5)


> Contact Find crashes if contact has no name
> -------------------------------------------
>
>                 Key: CB-5769
>                 URL: https://issues.apache.org/jira/browse/CB-5769
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android, Plugin Contacts
>    Affects Versions: 3.0.0
>         Environment: Nexus 4, android 4.4, phonegap build 
>            Reporter: Abe S
>
> There seems to be a bug in the contacts finder, it crashes when a contact has 
> no name, and name is one of the selected fields.
> Here is what my function call looks like:
> {code}
> navigator.contacts.find( ["name", "phoneNumbers"],
>   function (contacts) {
>     // DO STUFF HERE
>   },
>   function (contactError) {
>     alert('There was an error loading contacts, please try again.');
>   },
>   {
>     filter: "",
>     multiple: true,
>   }
> );
> {code}
> And when there is one contact on the device with no name it crashes with this 
> stacktrace:
> {noformat}
> processMessage failed: Error: TypeError: Cannot read property 'formatted' of 
> null
> processMessage failed: Stack: TypeError: Cannot read property 'formatted' of 
> null
>     at Object.eval (eval at <anonymous> 
> (http://debug.build.phonegap.com/target/target-script-min.js:2340:26), 
> <anonymous>:18:65)
>     at Function.b.extend.each 
> (file:///android_asset/www/js/jquery-1.9.1.min.js:3:5257)
>     at navigator.contacts.find.filter (eval at <anonymous> 
> (http://debug.build.phonegap.com/target/target-script-min.js:2340:26), 
> <anonymous>:15:12)
>     at Function.b.extend.each 
> (file:///android_asset/www/js/jquery-1.9.1.min.js:3:5257)
>     at navigator.contacts.find.filter (eval at <anonymous> 
> (http://debug.build.phonegap.com/target/target-script-min.js:2340:26), 
> <anonymous>:12:9)
>     at win 
> (file:///android_asset/www/plugins/org.apache.cordova.contacts/www/contacts.js:51:17)
>     at Object.cordova.callbackFromNative 
> (file:///android_asset/www/cordova.js:307:54)
>     at processMessage (file:///android_asset/www/cordova.js:1029:21)
>     at Function.androidExec.processMessages 
> (file:///android_asset/www/cordova.js:1063:13)
>     at pollOnce (file:///android_asset/www/cordova.js:933:17)
> {noformat}
> Of course, when I add a name to that contact, it no longer crashes.
> This is experienced on phonegpa 3.0, on phonegap build, so it might be 
> already fixed in later versions of phonegap, but that could easily be tested 
> by anyone using those later versions.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to