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

Cannot read properties of undefined (reading 'LegacyPhoneFeatures') #1913

Closed
1 task done
Eonus21 opened this issue Jan 10, 2023 · 43 comments · Fixed by #1930
Closed
1 task done

Cannot read properties of undefined (reading 'LegacyPhoneFeatures') #1913

Eonus21 opened this issue Jan 10, 2023 · 43 comments · Fixed by #1930
Labels
bug Something isn't working

Comments

@Eonus21
Copy link

Eonus21 commented Jan 10, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Today I started to receive such error on account start:

Evaluation failed: TypeError: Cannot read properties of undefined (reading 'LegacyPhoneFeatures')\n at puppeteer_evaluation_script:13:76"

I think it is because of new WWeb version

Expected behavior

As a user, I expect to be able to start account.

Steps to Reproduce the Bug or Issue

  1. Install required deps and basic example
  2. Try to start account with existing MD session
  3. Receive this error

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: Ubuntu 18
whatsapp-web.js version: latest (from commit 8655bad)
node v16.18.0

Additional context

No response

@Eonus21 Eonus21 added the bug Something isn't working label Jan 10, 2023
@NissiusRibas
Copy link

I have the same problem, it started today.

Estou com o mesmo problema, começou hoje.

@asenawritescode
Copy link

Someone suggested in the discord group to go to the directory below
node_modules\whatsapp-web.js\src\util\Injected.js
line 16 and comment it out.
image

It works for me currently on windows chrome

@cacetuc cacetuc mentioned this issue Jan 10, 2023
1 task
@segoviadanielm
Copy link

segoviadanielm commented Jan 10, 2023

Someone suggested in the discord group to go to the directory below node_modules\whatsapp-web.js\src\util\Injected.js line 16 and comment it out. image

It works for me currently on windows chrome

This worked for me too - Macos and linux server!

@robjean9
Copy link

Someone suggested in the discord group to go to the directory below node_modules\whatsapp-web.js\src\util\Injected.js line 16 and comment it out. image
It works for me currently on windows chrome

This worked for me too!

This worked for me too

@ViktorEmma
Copy link

This problem with new Beta version : 2.2301.5

@vladkucherov
Copy link

This problem with new Beta version : 2.2301.5

Where can I find the PR?

@Eonus
Copy link

Eonus commented Jan 11, 2023

@pedroslopez @PurpShell please check mentioned merge request

@T3uZ
Copy link

T3uZ commented Jan 11, 2023

Funcionou perfeitamente para mim, obrigado.

@PurpShell
Copy link
Sponsor Collaborator

Will work on this

@dravagnolli
Copy link

Está solução funcionou perfeitamente para mim!

@heloisarsantos
Copy link

Didn't work for me

@Diego-Schmidt
Copy link

Adding // to line 16 on injected worked for me on windows.

@FelixSimonOrg
Copy link

worked for me aswell

@pedropuppim
Copy link

me too

@Helvio88
Copy link

This prevents the client from starting and imho should be reviewed quickly. Especially painful for docker environments.

@edudesouza
Copy link

commenting line 16, worked

@oktayyoruk
Copy link

Someone suggested in the discord group to go to the directory below node_modules\whatsapp-web.js\src\util\Injected.js line 16 and comment it out. image

This worked for me too, thank you

@ipepoi
Copy link

ipepoi commented Jan 12, 2023

Someone suggested in the discord group to go to the directory below node_modules\whatsapp-web.js\src\util\Injected.js line 16 and comment it out. image

It works for me currently on windows chrome

Also, it works for me! Thanks

[Kernel]
3.10.0-1160.53.1.el7.x86_64

[OS-Release]
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster

@percyortiz6420
Copy link

percyortiz6420 commented Jan 12, 2023

Someone suggested in the discord group to go to the directory below node_modules\whatsapp-web.js\src\util\Injected.js line 16 and comment it out. image

It works for me currently on windows chrome

This worked for me too, thank you

@BraZucco
Copy link

Work for me too. Thank you

@jDiegoMartinez
Copy link

jDiegoMartinez commented Jan 12, 2023

Funciona comentando esa linea de codigo, pero siempre y cuando no se reinicie el servidor, si el servidor es reiniciado y trata de conectar de nuevo los usuarios logueados, se pierde la autenticacion y genera un nuevo qr.

Que mas se puede hacer en ese caso?

@wslsolucoes
Copy link

Funcionou , mas no docker tem que mudar toda vez que bilda

@Helvio88
Copy link

Funcionou , mas no docker tem que mudar toda vez que bilda

RUN sed -i 's/.LegacyPhoneFeatures;/?.LegacyPhoneFeatures;/' ./node_modules/whatsapp-web.js/src/util/Injected.js

@Hendroarifin
Copy link

work for me too..tankyu

@nael-lilik
Copy link

it's work for me. after comment that section. Thanks

@ilhamsafiudin
Copy link

thanks bro

@hamidsaifi77
Copy link

Hi, i got the solution to this by doing:-

Path:- node_modules/whatsapp-web.js/src/util/Injected.js
Line number 16

This
window.Store.Features = window.mR.findModule('FEATURE_CHANGE_EVENT')[0].LegacyPhoneFeatures;

to

This
window.Store.Features = window.mR.findModule('FEATURE_CHANGE_EVENT')[0]?.LegacyPhoneFeatures;

@elhumbertoz
Copy link
Contributor

Thank you, it is working.

@Yuri-Lima
Copy link

Thank you, it is working too.

@Angelslord
Copy link

Someone suggested in the discord group to go to the directory below node_modules\whatsapp-web.js\src\util\Injected.js line 16 and comment it out. image

It works for me currently on windows chrome

Thats work for me too...

@Haythamasalama
Copy link

Someone suggested in the discord group to go to the directory below node_modules\whatsapp-web.js\src\util\Injected.js line 16 and comment it out. image
It works for me currently on windows chrome

This worked for me too!

This worked for me too

@AlbertoJCS
Copy link

Someone suggested in the discord group to go to the directory below node_modules\whatsapp-web.js\src\util\Injected.js line 16 and comment it out. image

It works for me currently on windows chrome

Its works for me too. thanks!

@aphwolf
Copy link

aphwolf commented Jan 14, 2023

Alguém sugeriu no grupo de discórdia ir para o diretório abaixo node_modules\whatsapp-web.js\src\util\Injected.js linha 16 e comentá-lo. imagem

Funciona para mim atualmente no windows chrome

obrigado funcionou aqui!

@slottler
Copy link

Thank you so much! I've been stuck for the last 2 days, and this fixed my problem.

@samiadham12
Copy link

Thank you so much!

@anthonywebster
Copy link

same problem

@fofware
Copy link

fofware commented Jan 15, 2023

@pedroslopez Thanks Very much, Grate Job

@pedroslopez
Copy link
Owner

A fix has now been released! Please update to v1.19.1 to address the issue.

@kammy1996
Copy link

211552777-3db64f18-89ac-4dc8-83d5-d254b3b33bc6

This worked for me using Windows, Chromium

@jhonmvr
Copy link

jhonmvr commented Jan 17, 2023

Funciona comentando esa linea de codigo, pero siempre y cuando no se reinicie el servidor, si el servidor es reiniciado y trata de conectar de nuevo los usuarios logueados, se pierde la autenticacion y genera un nuevo qr.

Que mas se puede hacer en ese caso?

tienes que guardar los archivos de auntenticacion en el disco.

@profficio
Copy link

Worked for me.
Thanks a bunch !!

@ronaldoalm
Copy link

Funcionou , mas no docker tem que mudar toda vez que bilda

RUN sed -i 's/.LegacyPhoneFeatures;/?.LegacyPhoneFeatures;/' ./node_modules/whatsapp-web.js/src/util/Injected.js

Thank you very much!

@devkoller
Copy link

devkoller commented Jan 20, 2023

Someone suggested in the discord group to go to the directory below node_modules\whatsapp-web.js\src\util\Injected.js line 16 and comment it out. image

It works for me currently on windows chrome

Worked for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet