Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WhatsApp does not work on v2.3XXX #2789

Open
1 task done
Eonus opened this issue Feb 25, 2024 · 155 comments · May be fixed by #2816
Open
1 task done

WhatsApp does not work on v2.3XXX #2789

Eonus opened this issue Feb 25, 2024 · 155 comments · May be fixed by #2816
Labels
bug Something isn't working v2.3000.xx The issue specifically relates to WWeb v2.3000.xx

Comments

@Eonus
Copy link

Eonus commented Feb 25, 2024

Is there an existing issue for this?

  • I have searched the existing issues

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 (ef2f725)
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 (17c75cc new 2.2408.1 wweb version)
  2. I found where error is thrown, it is inside moduleraid library (Related issue - Evaluation failed: TypeError: Cannot read properties of undefined (reading 'push') moduleRaid#5)
  3. Other related issues - TypeError: Cannot read properties of undefined (reading 'push') #2785
@Eonus Eonus added the bug Something isn't working label Feb 25, 2024
@Eonus
Copy link
Author

Eonus commented Feb 25, 2024

Please don't close this issue because I took the time to find the specific place where this error occurs. I've searched through existing issues and not a single potential duplicate mentions a solution. My previous issue was closed without any clarifications about reasons for that.

@DRCHAZ
Copy link

DRCHAZ commented Feb 25, 2024

Same problem last 3 days

@Eonus
Copy link
Author

Eonus commented Feb 25, 2024

This is the line which cause the problem (https://github.com/pedroslopez/moduleRaid/blob/1867c12241b0d6200bd0d8dc852e875d95278ea3/moduleraid.js#L14):
image

@DRCHAZ
Copy link

DRCHAZ commented Feb 26, 2024

Please help

@ono77
Copy link

ono77 commented Feb 26, 2024

How do you get wweb version 2.3000? Last version seems to be 2.2408

@DRCHAZ
Copy link

DRCHAZ commented Feb 26, 2024

As I see they are rolling out WhatsApp web v 2.3000 little by little, so bug need to be fixed.

@Eonus
Copy link
Author

Eonus commented Feb 26, 2024

I get this version from Client.getWWebVersion https://docs.wwebjs.dev/Client.html#getWWebVersion

@DRCHAZ
Copy link

DRCHAZ commented Feb 29, 2024

Any updates?
Still receiving this error.
After clearing session, reconnection of account passes couple of hours and error showing.

@micmil1977
Copy link

Apparently they are moving from Webpack to some other framework called Comet.
In order to reproduce the problem and get the 2.3000 version that is based on Comet you need to add a cookie: wa_build=c
You can add it manually in DevTools and refresh the page.
Hopefully this will help someone to figure out how to find the modules under Comet.
As a temporary workaround for users that are already getting the Comet version, remove this cookie or change it to wa_build=w and refresh the page.

@alechkos
Copy link
Collaborator

alechkos commented Mar 1, 2024

Until the patch for wweb v2.3xxx is out use the webcache with wweb v2.2xxx
#1847
#2293 (comment)

Relevant wweb versions can be found here

@Kertis90
Copy link

Kertis90 commented Mar 6, 2024

Is there any update or solution related to this issue?

@adisutomo89
Copy link

Screenshot 2024-03-08 175934

I use LocalAuth every time I want to reload the cache, the error message always appears, please help me

@adisutomo89
Copy link

adisutomo89 commented Mar 9, 2024

Screenshot 2024-03-08 175934

I use LocalAuth every time I want to reload the cache, the error message always appears, please help me

SOLVED Use :

webVersionCache: {
type: 'remote',
remotePath: 'https://raw.githubusercontent.com/wppconnect-team/wa-version/main/html/2.2410.1.html',
}

@alechkos alechkos mentioned this issue Mar 9, 2024
7 tasks
@alechkos alechkos changed the title Cannot read properties of undefined (reading 'push') at fillModuleArray at moduleRaid WhatsApp does not work on v2.3XXX Mar 10, 2024
@rajeshshettysrs
Copy link

Screenshot 2024-03-08 175934
I use LocalAuth every time I want to reload the cache, the error message always appears, please help me

SOLVED Use :

webVersionCache: { type: 'remote', remotePath: 'https://raw.githubusercontent.com/wppconnect-team/wa-version/main/html/2.2410.1.html', }

please share WAPI js file

@tbsmark86
Copy link

The proposed workaround is not working for me but thanks for the push in the right direction. I changed it to a slightly older version:

    webVersionCache: {
                type: 'remote',
                remotePath: 'https://raw.githubusercontent.com/wppconnect-team/wa-version/main/html/2.2409.0.html',
            }

@rajeshshettysrs
Copy link

The proposed workaround is not working for me but thanks for the push in the right direction. I changed it to a slightly older version:

    webVersionCache: {
                type: 'remote',
                remotePath: 'https://raw.githubusercontent.com/wppconnect-team/wa-version/main/html/2.2409.0.html',
            }

Sir how to add in WAPI javascript file?

@jaovitubr
Copy link

Aparentemente, eles estão mudando do Webpack para algum outro framework chamado Comet. Para reproduzir o problema e obter a versão 2.3000 que é baseada no Comet você precisa adicionar um cookie: wa_build=c Você pode adicioná-lo manualmente no DevTools e atualizar a página. Espero que isso ajude alguém a descobrir como encontrar os módulos sob o Cometa. Como uma solução temporária para usuários que já estão recebendo a versão do Cometa, remova esse cookie ou altere-o para wa_build=w e atualize a página.

What framework is this? link plz

@tinyCoder32
Copy link

Apparently they are moving from Webpack to some other framework called Comet. In order to reproduce the problem and get the 2.3000 version that is based on Comet you need to add a cookie: wa_build=c You can add it manually in DevTools and refresh the page. Hopefully this will help someone to figure out how to find the modules under Comet. As a temporary workaround for users that are already getting the Comet version, remove this cookie or change it to wa_build=w and refresh the page.

Not anymore, WhatsApp now immediately logs you out when you play with it.

@alechkos
Copy link
Collaborator

alechkos commented Mar 12, 2024

const wwebVersion = '2.2412.54';

const client = new Client({
    authStrategy: new LocalAuth(), // your authstrategy here
    puppeteer: {
        // puppeteer args here
    },
    // locking the wweb version
    webVersionCache: {
        type: 'remote',
        remotePath: `https://raw.githubusercontent.com/wppconnect-team/wa-version/main/html/${wwebVersion}.html`,
    },
});

Relevant WWeb versions can be found here

@alechkos alechkos mentioned this issue Apr 3, 2024
1 task
@jeffersonmiranda0

This comment was marked as off-topic.

@wmazuchi
Copy link

wmazuchi commented Apr 3, 2024

What worked for me:

Get the moduleraid.js file from this link https://github.com/wwebjs/moduleRaid

And apply the changes from #2789 (comment) and #2789 (comment) comments.

It's working perfectly.

@albanirneves
Copy link

albanirneves commented Apr 3, 2024

could anyone make a PR with the solution?

@brunox64

This comment was marked as off-topic.

@codigoinerte

This comment was marked as off-topic.

@yogiigabe

This comment was marked as off-topic.

@5h1ro

This comment was marked as off-topic.

@koral99digital
Copy link

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

@albanirneves
Copy link

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?

@diazzaid

This comment was marked as resolved.

@koral99digital

This comment was marked as outdated.

@Dintec

This comment was marked as resolved.

@PurpShell
Copy link
Sponsor Collaborator

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.

Repository owner locked as too heated and limited conversation to collaborators Apr 4, 2024
@PurpShell
Copy link
Sponsor Collaborator

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

Incorrect.

marcelolohamann referenced this issue Apr 7, 2024
* Upgade node version

* Update package.json

* Node v18

* Update README.md

* Prevent unverified lib upgrade

---------

Co-authored-by: Rajeh Taher <rajeh@reforward.dev>
Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
@alechkos alechkos added the v2.3000.xx The issue specifically relates to WWeb v2.3000.xx label May 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working v2.3000.xx The issue specifically relates to WWeb v2.3000.xx
Projects
None yet
Development

Successfully merging a pull request may close this issue.