In Injected.js line 16, there is a line that causes Client initialize crash even if connection is good
You basically just have to comment this line to fix it, or you can get last version of whatsapp-web.js that also fixed the issue :
src/utils/Injected.js
[...]
window.Store.CryptoLib = window.mR.findModule('decryptE2EMedia')[0];
window.Store.DownloadManager = window.mR.findModule('downloadManager')[0].downloadManager;
// You just have to comment this line
// window.Store.Features = window.mR.findModule('FEATURE_CHANGE_EVENT')[0].LegacyPhoneFeatures;
window.Store.GroupMetadata = window.mR.findModule('GroupMetadata')[0].default.GroupMetadata;
window.Store.Invite = window.mR.findModule('sendJoinGroupViaInvite')[0];
window.Store.InviteInfo = window.mR.findModule('sendQueryGroupInvite')[0];
[...]
Expected behavior
I don't know why this line makes the creation bug, but sometimes window.mR.findModule('FEATURE_CHANGE_EVENT')[0] is not defined, so getting the index at 0 catches an error.
Is there an existing issue for this?
Describe the bug
In Injected.js line 16, there is a line that causes Client initialize crash even if connection is good You basically just have to comment this line to fix it, or you can get last version of whatsapp-web.js that also fixed the issue :
Expected behavior
I don't know why this line makes the creation bug, but sometimes window.mR.findModule('FEATURE_CHANGE_EVENT')[0] is not defined, so getting the index at 0 catches an error.
You can simply replace it by :
(That's what they did in wweb-js)
Steps to Reproduce the Bug or Issue
Create a new Client
Relevant Code
No response
Browser Type
Other (please write in Additional Context)
WhatsApp Account Type
Standard
Does your WhatsApp account have multidevice enabled?
Yes, I am using Multi Device
Environment
Os : Windows Phone : Iphone wweb.js-electron : last
Additional context
No response