pedroslopez / whatsapp-web.js

A WhatsApp client library for NodeJS that connects through the WhatsApp Web browser app
https://wwebjs.dev
Apache License 2.0
15.05k stars 3.58k forks source link

WhatsApp does not work on v2.3XXX #2789

Closed Eonus closed 1 month ago

Eonus commented 6 months ago

Is there an existing issue for this?

Describe the bug

Three days ago I started to receive the following error on account start: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'push')\n at fillModuleArray (eval at <anonymous> (:2:5), <anonymous>:6:74)\n at moduleRaid (eval at <anonymous> (:2:5), <anonymous>:15:3)\n at puppeteer_evaluation_script:4:17

Expected behavior

As a user, I expect to be logged in and able to send messages. But I am seeing desribed error.

Steps to Reproduce the Bug or Issue

  1. Run basic example
  2. On some accounts it is not logged in

Relevant Code

No response

Browser Type

Chromium

WhatsApp Account Type

Standard

Does your WhatsApp account have multidevice enabled?

Yes, I am using Multi Device

Environment

OS: Linux and Windows whatsapp-web.js version: latest, installed directly from GitHub (https://github.com/pedroslopez/whatsapp-web.js/commit/ef2f725bce1bd1afd8491f9de0cd2ed06a6febc3) WhatsApp Web version: 2.3000.1011643235 Node.js version: v18.19.0

Additional context

  1. It is possible that the problem is related to new version (https://github.com/pedroslopez/whatsapp-web.js/commit/17c75ccf5f5a5103e80f8eaa08e641f065de4fea new 2.2408.1 wweb version)
  2. I found where error is thrown, it is inside moduleraid library (Related issue - https://github.com/pedroslopez/moduleRaid/issues/5)
  3. Other related issues - https://github.com/pedroslopez/whatsapp-web.js/issues/2785
diazzaid commented 5 months ago

worked for me

  1. git clone https://github.com/pedroslopez/whatsapp-web.js.git
  2. git checkout webpack-exodus
  3. const {Client, LocalAuth, ClientInfo, Message, MessageMedia, Contact, Location, GroupNotification , Label, Call} = require('./whatsapp-web.js/index');
koral99digital commented 5 months ago

hi guys dont waste time, this is the solution that worked for me: #2816

But how can i implement it? It's already in the npm latest version?

i went line by line... its not on the latest version yet

Dintec commented 5 months ago

Estou com esse erro desde ontem. Alguém conseguiu resolver o problema ou tem um erro parecido? Procurei aplicar as resoluções já citadas nos comentários e não funcionou.

image

PurpShell commented 5 months ago

Hey everyone! To install the patch, please run:

npm install github:pedroslopez/whatsapp-web.js#webpack-exodus

The reason it has not been merged yet is because I am still working on stability.

PurpShell commented 5 months ago

Código completo aqui nesta PR abaixo, mas precisa de compilar o moduleRaid e instalar pelo .tgz dele. PR 2882

Incorrect.