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.18k stars 3.62k forks source link

window.mR.findModule('Socket')[0].Socket; returns undefined #3203

Closed andrew-quicklution closed 5 days ago

andrew-quicklution commented 2 months ago

Is there an existing issue for this?

Describe the bug

The window.Store.AppState = window.mR.findModule('Socket')[0].Socket; in inject.js returns undefined and hence cannot get state

Expected behavior

returns AppState.state

It only doesn't work on certain WhatsApp Web versions

Steps to Reproduce the Bug or Issue

call window.mR.findModule('Socket')[0].Socket;

Relevant Code

No response

Browser Type

Chromium

WhatsApp Account Type

Standard

Does your WhatsApp account have multidevice enabled?

No, I am not using Multi Device

Environment

Windows iOS

Additional context

window.Store.Stream = window.mR.findModule('Stream')[0].Stream; also returns undefined. I just cannot get the connection state