mukulhase / WebWhatsapp-Wrapper

An API for sending and receiving messages over web.whatsapp [Working as of 18th May 2018]
https://webwhatsapi.readthedocs.io/en/latest/
MIT License
2.03k stars 797 forks source link

WAPI.createGroup fails with 'u is undefined' #749

Open OskJonsdottir opened 4 years ago

OskJonsdottir commented 4 years ago

Apparently the signature of the method window.Store.Wap.createGroup() has changed in some of the Whatsapp Web updates, so the implementation of WAPI.createGroup fails hopelessly. The existing implementation of WAPI.createGroup() is

window.WAPI.createGroup = function (name, contactsId) {
    if (!Array.isArray(contactsId)) {
        contactsId = [contactsId];
    }

    return window.Store.Wap.createGroup(name, contactsId);
};

but the current signature of window.Store.Wap.createGroup() seems to be

window.Store.Wap.createGroup = function (name, something, somethingElse, contacts) //NOT contactIds, and it's now the fourth parameter

I've tried calling window.Store.Wap.createGroup directly from the console in a WhatsApp Web session and it seems to work when you do something like

window.Store.Wap.createGroup("group007", 0, 0, [{id: "44123456789@c.us"}, {id: "886123456789@c.us"}])

I have no idea what the second and third arguments are.

frclba commented 4 years ago

Did you find a solution? I'm able to create a group but no user is being added to it.

RynKings commented 4 years ago

Apparently the signature of the method window.Store.Wap.createGroup() has changed in some of the Whatsapp Web updates, so the implementation of WAPI.createGroup fails hopelessly. The existing implementation of WAPI.createGroup() is

window.WAPI.createGroup = function (name, contactsId) {
    if (!Array.isArray(contactsId)) {
        contactsId = [contactsId];
    }

    return window.Store.Wap.createGroup(name, contactsId);
};

but the current signature of window.Store.Wap.createGroup() seems to be

window.Store.Wap.createGroup = function (name, something, somethingElse, contacts) //NOT contactIds, and it's now the fourth parameter

I've tried calling window.Store.Wap.createGroup directly from the console in a WhatsApp Web session and it seems to work when you do something like

window.Store.Wap.createGroup("group007", 0, 0, [{id: "44123456789@c.us"}, {id: "886123456789@c.us"}])

I have no idea what the second and third arguments are.

It Works !!

manojsitapara commented 4 years ago

Apparently the signature of the method window.Store.Wap.createGroup() has changed in some of the Whatsapp Web updates, so the implementation of WAPI.createGroup fails hopelessly. The existing implementation of WAPI.createGroup() is

window.WAPI.createGroup = function (name, contactsId) {
    if (!Array.isArray(contactsId)) {
        contactsId = [contactsId];
    }

    return window.Store.Wap.createGroup(name, contactsId);
};

but the current signature of window.Store.Wap.createGroup() seems to be

window.Store.Wap.createGroup = function (name, something, somethingElse, contacts) //NOT contactIds, and it's now the fourth parameter

I've tried calling window.Store.Wap.createGroup directly from the console in a WhatsApp Web session and it seems to work when you do something like

window.Store.Wap.createGroup("group007", 0, 0, [{id: "44123456789@c.us"}, {id: "886123456789@c.us"}])

I have no idea what the second and third arguments are.

It Works !!

I am able to fix this issue by above code changes, but it never return any value, it keep processing and getting following error

Error in function createGroup (Timed out after 60000 ms). Command: return WAPI.createGroup('Test15',{'id': 'xxxxxx@c.us'}, arguments[0])

Can you please help me to fix issue?

hedcet commented 4 years ago

use WapQuery for this

await window.Store.WapQuery.createGroup(name, contactIds);

refer here

mikelustosa commented 2 years ago

Apparently the signature of the method window.Store.Wap.createGroup() has changed in some of the Whatsapp Web updates, so the implementation of WAPI.createGroup fails hopelessly. The existing implementation of WAPI.createGroup() is

window.WAPI.createGroup = function (name, contactsId) {
    if (!Array.isArray(contactsId)) {
        contactsId = [contactsId];
    }

    return window.Store.Wap.createGroup(name, contactsId);
};

but the current signature of window.Store.Wap.createGroup() seems to be

window.Store.Wap.createGroup = function (name, something, somethingElse, contacts) //NOT contactIds, and it's now the fourth parameter

I've tried calling window.Store.Wap.createGroup directly from the console in a WhatsApp Web session and it seems to work when you do something like

window.Store.Wap.createGroup("group007", 0, 0, [{id: "44123456789@c.us"}, {id: "886123456789@c.us"}])

I have no idea what the second and third arguments are.

Not work more. Can you help?

mikelustosa commented 2 years ago

use WapQuery for this

await window.Store.WapQuery.createGroup(name, contactIds);

refer here

Link offline. Can you help to fix?

ebubekirbastama commented 1 year ago

Kesin Çözüm

Bu kod işinize yarayacaktır :) WAPI.createGroup('EBS Time', [ '90000000000@c.us', '90000000000@c.us', '90000000000@c.us' ]);