Skip to content

getAllContacts returns undefined #2007

@syafiqfaiz

Description

@syafiqfaiz

Are you using the latest version of the library?

  • I have checked and am using the latest version of the library.

Current Behavior

	whatsapp.getAllContacts().then((contacts) => {
		debugger
	}).catch((err)=>{
		console.log('getContacts error: ', err)
	});

contacts returns undefined

Expected Behavior

contacts returns an array of contacts

Steps To Reproduce

run this

	whatsapp.getAllContacts().then((contacts) => {
		debugger
	}).catch((err)=>{
		console.log('getContacts error: ', err)
	});

Mode

My own code

create() code

var _waConfig = {
	sessionId: "something",
	licenseKey: "something",
};
wa.create(_waConfig)
.then(async client => await _whatsappStart(client))
.catch(e => {
	console.log('CREATE ERROR', e.message);
});

DEBUG INFO

Debug Info {
  WA_VERSION: '2.2130.9',
  PAGE_UA: 'WhatsApp/2.2108.8 Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36',
  WA_AUTOMATE_VERSION: '4.14.1',
  BROWSER_VERSION:  'HeadlessChrome/93.0.4577.0'
}

Environment

- OS: ubuntu 20.04
- Node: v14.15.5
- npm: 7.9.0

Screenshots

image

Anything else?

it was working fine before,
suddenly breaks few hours ago

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions