wppconnect-team / wa-js

WPPConnect/WA-JS is an open-source project with the aim of exporting functions from WhatsApp Web
https://wppconnect.io/wa-js/
Apache License 2.0
325 stars 120 forks source link

Error when joining groups via invite link #1986

Closed DXPRO closed 2 weeks ago

DXPRO commented 3 weeks ago

WA-JS Version

v3.2.6

WhatsApp Version

2.3000.1013954634

Browser Version

Chrome Version 125.x

Operation System

Windows 11

Steps to reproduce

To reproduce the error, simply call the await function WPP.group.join('https://chat....');

What is expected?

It is expected to return information with the group ID

What is actually happening?

When executing the function, the following error is generated:

{
    "message": "conflict",
    "name": "ServerStatusCodeError",
    "stack": "ServerStatusCodeError: conflict\n    at b.d [as constructor] (https://static.whatsapp.net/rsrc.php/v3iFnM4/yC/l/rt/UFx0esevvMc.js?_nc_x=Ij3Wp8lg5Kz:603:217)\n    at new b (https://static.whatsapp.net/rsrc.php/v3iFnM4/yC/l/rt/UFx0esevvMc.js?_nc_x=Ij3Wp8lg5Kz:1375:253)\n    at https://static.whatsapp.net/rsrc.php/v3i-zO4/yF/l/rt/OHAR86o1nzy.js?_nc_x=Ij3Wp8lg5Kz:240:2838\n    at Generator.next (<anonymous>)\n    at h (https://static.whatsapp.net/rsrc.php/v3izIj4/yv/l/rt/7UIiMFVlzQ1p_4k-rxLz1wnlZDWgB2SdOVi4z36XE8OqSFUZAg0qDTjvsWqehdEtWwDQVEH-g-FDC.js?_nc_x=Ij3Wp8lg5Kz:277:125)\n    at g (https://static.whatsapp.net/rsrc.php/v3izIj4/yv/l/rt/7UIiMFVlzQ1p_4k-rxLz1wnlZDWgB2SdOVi4z36XE8OqSFUZAg0qDTjvsWqehdEtWwDQVEH-g-FDC.js?_nc_x=Ij3Wp8lg5Kz:277:349)",
    "status": 409,
    "statusCode": 409
}

Any additional comments?

No response

DXPRO commented 3 weeks ago

This error occurs when the administrator authorization setting to join the group is activated!

icleitoncosta commented 2 weeks ago

Could you please update and test the latest version? I just tested it, even with the permission to add members enabled, I tested a few times and all worked normally.

DXPRO commented 2 weeks ago

The link below shows the execution of the same invitation link, at first, the option to allow new members without authorization is unchecked, and normally returns the group ID, after enabling the option, it generates the conflict error, I'm using the web version: 2.3000.1014088179 In WhatsApp Business, this error occurs in previous versions too! I tested with WA-JS 3.3.1

https://prnt.sc/7VeTRXXlHtBf