Closed rajeshshettysrs closed 5 months ago
Please advise the exact version of your WhatsApp web. Here we are still on version 2.2410.1 where everything works fine.
Please advise the exact version of your WhatsApp web. Here we are still on version 2.2410.1 where everything works fine. WhatsApp business account sir and Version is 2.3000.1011925186
Please advise the exact version of your WhatsApp web. Here we are still on version 2.2410.1 where everything works fine. WhatsApp business account sir and Version is 2.3000.1011925186
Here in Brazil, this update has not yet arrived. Contact me on whatsapp +55 81 996302385 so I can try to help you
In Brazil this update is now arriving gradually.
Here have a idea to get modules to new version...
Someone can help to convert? https://d33gom43gwygbg.cloudfront.net/utils/api.js
Here have a idea to get modules to new version...
Someone can help to convert? https://d33gom43gwygbg.cloudfront.net/utils/api.js
Yes. Working..
So, what is the fix? How to fix webpackChunkwhatsapp_web_client?
You can do something like:
const newMakeStore = () => {
if (!window.Store) {
console.log("New make Store carregado!", "EPAA NOVO, 08/03/24 ")
let modules = self.require('__debug').modulesMap;
let keys = Object.keys(modules).filter(e=>e.includes("WA"));
let modulesFactory = {};
for (let key of keys){
if(!modules[key])
continue;
let module = modules[key];
modulesFactory[key] = {
default: module.defaultExport,
factory: module.factory,
...module
};
if(Object.keys(modulesFactory[key].default).length == 0) {
try{
self.ErrorGuard.skipGuardGlobal(true);
Object.assign(modulesFactory[key], self.importNamespace(key));
}catch(e){
console.error("Error importing:",key)
}
}
}
function getStore(modules) {
let foundCount = 0;
let neededObjects = [
{
id: "MdCheck",
conditions: (module) => (module && module.isLegacyWebdBackend) ? module : null
},
{ id: "Store", conditions: (module) => (module.default && module.default.Chat && module.default.Msg) ? module.default : null },
{ id: "MediaCollection", conditions: (module) => (module.default && module.default.prototype && module.default.prototype.processAttachments) ? module.default : null },
{ id: "MediaProcess", conditions: (module) => (module.BLOB) ? module : null },
{ id: "Wap", conditions: (module) => (module.createGroup) ? module : null },
{ id: "ServiceWorker", conditions: (module) => (module.default && module.default.killServiceWorker) ? module : null },
{ id: "State", conditions: (module) => (module.STATE && module.STREAM) ? module : null },
{ id: "WapDelete", conditions: (module) => (module.sendConversationDelete && module.sendConversationDelete.length == 2) ? module : null },
{ id: "Conn", conditions: (module) => (module.default && module.default.ref && module.default.refTTL) ? module.default : null },
{ id: "WapQuery", conditions: (module) => (module.queryExist) ? module : ((module.default && module.default.queryExist) ? module.default : null) },
{ id: "CryptoLib", conditions: (module) => (module.decryptE2EMedia) ? module : null },
{ id: "OpenChat", conditions: (module) => (module.default && module.default.prototype && module.default.prototype.openChat) ? module.default : null },
{ id: "UserConstructor", conditions: (module) => (module.default && module.default.prototype && module.default.prototype.isServer && module.default.prototype.isUser) ? module.default : null },
{ id: "SendTextMsgToChat", conditions: (module) => (module.sendTextMsgToChat) ? module.sendTextMsgToChat : null },
{ id: "SendSeen", conditions: (module) => (module.sendSeen) ? module.sendSeen : null },
{ id: "sendDelete", conditions: (module) => (module.sendDelete) ? module.sendDelete : null },
{ id: "FeatureChecker", conditions: (module) => (module && module.getProtobufFeatureName) ? module : null },
{ id: "GetMaybeMeUser", conditions: (module) => (module && module.getMaybeMeUser) ? module : null },
{ id: "QueryExist", conditions: (module) => (module.queryExist) ? module : null },
{
id: "FindChat",
conditions: (module) => (module && module.findChat) ? module : null
},
{
id: "OpenChat",
conditions: (module) => (module.OpenChatFlow) ? module.OpenChatFlow : null
},
{
id: "ChatUtilsSetArchive",
conditions: (module) => (module.setArchive) ? module : null
},
{
id: "ChatState",
conditions: (module) => (module.sendChatStateComposing) ? module : null
},
{
id: "WidFactory",
conditions: (module) => (module.createWid) ? module : null
},
{
id: "isMDBackend",
conditions: (module) => (module.isMDBackend) ? module : null
},
{
id: "PresenceUtils",
conditions: (module) => (module.sendPresenceAvailable) ? module : null
},
{
id: "MediaPrep",
conditions: (module) => (module && module.uploadProductImage && module.MediaPrep) ? module : null
},
];
for (let idx in modules) {
if ((typeof modules[idx] === "object") && (modules[idx] !== null)) {
neededObjects.forEach((needObj) => {
if (!needObj.conditions || needObj.foundedModule)
return;
let neededModule = needObj.conditions(modules[idx]);
if (neededModule !== null) {
foundCount++;
needObj.foundedModule = neededModule;
}
});
if (foundCount == neededObjects.length) {
break;
}
}
}
let neededStore = neededObjects.find((needObj) => needObj.id === "Store");
window.Store = neededStore.foundedModule ? neededStore.foundedModule : {};
neededObjects.splice(neededObjects.indexOf(neededStore), 1);
neededObjects.forEach((needObj) => {
if (needObj.foundedModule) {
window.Store[needObj.id] = needObj.foundedModule;
}
});
window.Store.Chat.modelClass.prototype.sendMessage = function (e) {
window.Store.SendTextMsgToChat(this, ...arguments);
}
console.log(window.Store)
return window.Store;
}
getStore(modulesFactory);
}
}
const oldMakeStore = () => {
console.log("EPAA NOVO, 08/03/24 ", (Debug || {}).VERSION)
if (!window.Store) {
(function () {
function getStore(modules) {
let foundCount = 0;
let neededObjects = [
{ id: "Store", conditions: (module) => (module.default && module.default.Chat && module.default.Msg) ? module.default : null},
{ id: "MediaCollection", conditions: (module) => (module.default && module.default.prototype && (module.default.prototype.processFiles !== undefined||module.default.prototype.processAttachments !== undefined)) ? module.default : null },
{ id: "MediaProcess", conditions: (module) => (module.BLOB) ? module : null },
{ id: "Archive", conditions: (module) => (module.setArchive) ? module : null },
{ id: "Block", conditions: (module) => (module.blockContact && module.unblockContact) ? module : null },
{ id: "ChatUtil", conditions: (module) => (module.sendClear) ? module : null },
{ id: "GroupInvite", conditions: (module) => (module.queryGroupInviteCode) ? module : null },
{ id: "Wap", conditions: (module) => (module.createGroup) ? module : null },
{ id: "ServiceWorker", conditions: (module) => (module.default && module.default.killServiceWorker) ? module : null },
{ id: "State", conditions: (module) => (module.STATE && module.STREAM) ? module : null },
{ id: "_Presence", conditions: (module) => (module.setPresenceAvailable && module.setPresenceUnavailable) ? module : null },
{ id: "WapDelete", conditions: (module) => (module.sendConversationDelete && module.sendConversationDelete.length == 2) ? module : null },
{ id: 'FindChat', conditions: (module) => (module && module.findChat) ? module : null},
{ id: "Conn", conditions: (module) => (module.default && module.default.ref && module.default.refTTL) ? module.default : null },
{ id: "WapQuery", conditions: (module) => (module.queryExist) ? module : ((module.default && module.default.queryExist) ? module.default : null) },
{ id: "WapQueryMD", conditions: (module) => (module.queryWidExists && module.queryPhoneExists) || (module.queryExists && module.queryPhoneExists) ? module : null},
{ id: "CryptoLib", conditions: (module) => (module.decryptE2EMedia) ? module : null },
{ id: "OpenChat", conditions: (module) => (module.default && module.default.prototype && module.default.prototype.openChat) ? module.default : null },
{ id: "UserConstructor", conditions: (module) => (module.default && module.default.prototype && module.default.prototype.isServer && module.default.prototype.isUser) ? module.default : null },
{ id: "SendTextMsgToChat", conditions: (module) => (module.sendTextMsgToChat) ? module.sendTextMsgToChat : null },
{ id: "ReadSeen", conditions: (module) => (module.sendSeen) ? module : null },
{ id: "sendDelete", conditions: (module) => (module.sendDelete) ? module.sendDelete : null },
{ id: "addAndSendMsgToChat", conditions: (module) => (module.addAndSendMsgToChat) ? module.addAndSendMsgToChat : null },
{ id: "sendMsgToChat", conditions: (module) => (module.sendMsgToChat) ? module.sendMsgToChat : null },
{ id: "Catalog", conditions: (module) => (module.Catalog) ? module.Catalog : null },
{ id: "bp", conditions: (module) => (module.default&&module.default.toString&&module.default.toString().includes('bp_unknown_version')) ? module.default : null },
{ id: "MsgKey", conditions: (module) => (module.default&&module.default.toString&&module.default.toString().includes('MsgKey error: obj is null/undefined')) ? module.default : null },
{ id: "Parser", conditions: (module) => (module.convertToTextWithoutSpecialEmojis) ? module.default : null },
{ id: "Builders", conditions: (module) => (module.TemplateMessage && module.HydratedFourRowTemplate) ? module : null },
{ id: "Me", conditions: (module) => (module.PLATFORMS && module.Conn) ? module.default : null },
{ id: "CallUtils", conditions: (module) => (module.sendCallEnd && module.parseCall) ? module : null },
{ id: "Identity", conditions: (module) => (module.queryIdentity && module.updateIdentity) ? module : null },
{ id: "MyStatus", conditions: (module) => (module.getStatus && module.setMyStatus) ? module : null },
{ id: "ChatStates", conditions: (module) => (module.sendChatStatePaused && module.sendChatStateRecording && module.sendChatStateComposing) ? module : null },
{ id: "GroupActions", conditions: (module) => (module.sendExitGroup && module.localExitGroup) ? module : null },
{ id: "Features", conditions: (module) => (module.FEATURE_CHANGE_EVENT && module.features) ? module : null },
{ id: "MessageUtils", conditions: (module) => (module.storeMessages && module.appendMessage) ? module : null },
{ id: "WebMessageInfo", conditions: (module) => (module.WebMessageInfo && module.WebFeatures) ? module.WebMessageInfo : null },
{ id: "createMessageKey", conditions: (module) => (module.createMessageKey && module.createDeviceSentMessage) ? module.createMessageKey : null },
{ id: "Participants", conditions: (module) => (module.addParticipants && module.removeParticipants && module.promoteParticipants && module.demoteParticipants) ? module : null },
{ id: "WidFactory", conditions: (module) => (module.isWidlike && module.createWid && module.createWidFromWidLike) ? module : null },
{ id: "Base", conditions: (module) => (module.setSubProtocol && module.binSend && module.actionNode) ? module : null },
{ id: "Versions", conditions: (module) => (module.loadProtoVersions && module.default && module.default["15"] && module.default["16"] && module.default["17"]) ? module : null },
{ id: "Sticker", conditions: (module) => (module.default && module.default.Sticker) ? module.default.Sticker : null },
{ id: "MediaUpload", conditions: (module) => (module.default && module.default.mediaUpload) ? module.default : null },
{ id: "UploadUtils", conditions: (module) => (module.default && module.default.encryptAndUpload) ? module.default : null }
];
for (let idx in modules) {
if ((typeof modules[idx] === "object") && (modules[idx] !== null)) {
neededObjects.forEach((needObj) => {
if (!needObj.conditions || needObj.foundedModule)
return;
let neededModule = needObj.conditions(modules[idx]);
if (neededModule !== null) {
foundCount++;
needObj.foundedModule = neededModule;
}
});
if (foundCount == neededObjects.length) {
break;
}
}
}
let neededStore = neededObjects.find((needObj) => needObj.id === "Store");
window.Store = neededStore.foundedModule ? neededStore.foundedModule : {};
neededObjects.splice(neededObjects.indexOf(neededStore), 1);
neededObjects.forEach((needObj) => {
if (needObj.foundedModule) {
window.Store[needObj.id] = needObj.foundedModule;
}
});
window.Store.Chat.modelClass.prototype.sendMessage = function (e) {
window.Store.SendTextMsgToChat(this, ...arguments);
}
return window.Store;
}
if (typeof webpackJsonp === 'function') {
webpackJsonp([], {'parasite': (x, y, z) => getStore(z)}, ['parasite']);
} else {
let tag = new Date().getTime();
webpackChunkwhatsapp_web_client.push([
["parasite" + tag],
{
},
function (o, e, t) {
let modules = [];
for (let idx in o.m) {
let module = o(idx);
modules.push(module);
}
getStore(modules);
}
]);
}
})();
}
}
const chooseFunction = () => {
versionString = (Debug || {}).VERSION;
versionNumber = parseFloat(versionString);
comparisonNumber = 2.3;
return (versionNumber >= comparisonNumber) ? newMakeStore() : oldMakeStore()
}
chooseFunction()
Also you need change this code:
window.WAPI.checkNumberStatus = async function (id, done) {
try {
let isMd = true
let result
try {
result = await window.Store.WapQueryMD.queryPhoneExists(id);
}
catch(e){
isMd = false
}
result = isMd ? result : await window.Store.WapQuery.queryPhoneExists(id);
let data = isMd ? window.WAPI._serializeNumberStatusObjMD(result) : window.WAPI._serializeNumberStatusObjMD(result)
if(isMd){
SetConsoleMessage("NewCheckIsValidNumber", JSON.stringify({ id : data.id, valid : data.status}));
}else{
SetConsoleMessage("NewCheckIsValidNumber", JSON.stringify({ id : id, valid : data.canReceiveMessage}))
}
if (done !== undefined) done(data)
return data;
} catch (e) {
SetConsoleMessage("NewCheckIsValidNumber", JSON.stringify({ id : id, valid : false}));
result = window.WAPI._serializeNumberStatusObjMD({
status: e,
jid: id
});
if (done !== undefined) done(result)
return result
}
};
Acabei de pegar um cliente aqui com a 2.3, apliquei o fix sujerido la mas continua o mesmo erro.
[15/03/24 12:09:36 - CONSOLE IGNORADO]
Uncaught ReferenceError: webpackChunkwhatsapp_web_client is not defined
[15/03/24 12:09:36 - CONSOLE IGNORADO]
Uncaught ReferenceError: WAPI is not defined
[15/03/24 12:11:14 - CONSOLE IGNORADO]
Uncaught (in promise) TypeError: all.includes is not a function
Thank you very much sir 🙏🙏
I am getting Javascript error:webpackChunkwhatsapp_web_client is not defined while sending message. Getting above error after whatsapp business Version 2.3 update.Please help