Whatsapp-web.js: required update

Created on 19 Nov 2020  路  14Comments  路  Source: pedroslopez/whatsapp-web.js

required update

bug

Most helpful comment

i get this error please help
Cannot read property 'default' of undefined

seems like whatsapp changed their code, all we can do is wait for update.

All 14 comments

stopped working for you?

i get this error please help
Cannot read property 'default' of undefined

i will show full error
(node:6120) UnhandledPromiseRejectionWarning: Error: Evaluation failed: TypeError:
Cannot read property 'default' of undefined
at __puppeteer_evaluation_script__:5:51
at ExecutionContext._evaluateInternal (D:\Project\whatsapp_api\node_modules\puppeteerlib\cjs\puppeteer\common\ExecutionContext.js:217:19)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:6120) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This
error originated either by throwing inside of an async function without a catch
block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)

i get this error please help
Cannot read property 'default' of undefined

seems like whatsapp changed their code, all we can do is wait for update.

that happen after i scan the barcode

ok we will wait

I got same error.

Error: Evaluation failed: TypeError: Cannot read property 'default' of undefined

Same here.

Same here

Same here

Error: Evaluation failed: TypeError: Cannot read property 'default' of undefined
at __puppeteer_evaluation_script__:5:51
at ExecutionContext._evaluateInternal (/home/user/mybot/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:217:19)
at processTicksAndRejections (node:internal/process/task_queues:93:5)
at async ExecutionContext.evaluate (/home/user/mybot/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:106:16)
at async Client.initialize (/home/user/mybot/node_modules/whatsapp-web.js/src/Client.js:145:9)

node_modules/@pedroslopez/moduleraid/moduleraid.js

does not work

exports.ExposeStore = (moduleRaidStr) => {
    eval('var moduleRaid = ' + moduleRaidStr);
    // eslint-disable-next-line no-undef
    window.mR = moduleRaid();
    window.Store = window.mR.findModule('Chat')[1].default; // index 1

it works

exports.ExposeStore = (moduleRaidStr) => {
    eval('var moduleRaid = ' + moduleRaidStr);
    // eslint-disable-next-line no-undef
    window.mR = moduleRaid();
    window.Store = window.mR.findModule('Chat')[0].default; // index 0

window.Store = window.mR.findModule('Chat')[1].default

I found that in src/util/injected.js, but changing 1 for 0 had no effect here.

Thank you @pedroslopez and @Jessekalli worked here.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

riagie picture riagie  路  6Comments

gabriel-tandil picture gabriel-tandil  路  5Comments

ocracy picture ocracy  路  5Comments

fdciabdul picture fdciabdul  路  6Comments

waltergammarota picture waltergammarota  路  8Comments