Cordova-plugin-contacts not working on some devices


I’ve been working with the $cordovaContacts plugin in order to grab all of the contacts from a device and then I do a filter later so a user can search for a contact’s name and have their email show up. I have this working on my own iOS and android devices, both when installing directly from my computer and through test flight and google play, however it doesn’t seem to be working for some of my beta testers.

They get a message the first time they install it asking for permission to access their contacts but when they actually try to search for something, the results are blank. They have confirmed with me that they do have contacts with emails that they are trying to search for. Here is my load contacts function:
(I switched from $cordovaContacts to navigator.contacts after $cordovaContacts didn’t appear to be working, but they should work the same to my understanding)

function loadContacts(){
template: ‘Loading Contacts…’
var options = new ContactFindOptions();
options.filter = “”;
options.multiple = true;
var fields = ["*"];
navigator.contacts.find(fields, onSuccess, onError, options);

onSuccess function:

function onSuccess(allContacts){
self.contacts = allContacts;
if(contact.emails != null){
var name =;
var email = contact.emails[0];
var contact = { name: name, email: email.value};

function onError(err){
console.log(“error:”, error);

And my search functions are:

function search(){
if( != “”){
self.list = results;
self.list = ‘’;

function searchContacts(searchFilter) {
var deferred = $q.defer();
if(searchFilter != “” ){
var matches = self.emails.filter( function(email) {
if(typeof != ‘undefined’){
if( !== -1
|| !== -1 ) return true;
var matches = {};
$timeout( function(){
deferred.resolve( matches );
}, 100);
return deferred.promise;

Any feedback on what could be going wrong would be awesome


Hello, am also facing the same problem. Did you get to know why it’s so…


For me the problem was that one of the contacts on the testers’ phone had a null or an undefined field, which my code did not account for