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

Pin Functionality is breaking in newer version of WhatsApp (Whatsapp Version 2.3000.1013068429) #1871

Closed
mkamra2000 opened this issue Apr 26, 2024 · 2 comments

Comments

@mkamra2000
Copy link
Contributor

mkamra2000 commented Apr 26, 2024

WA-JS Version

3.1.1

WhatsApp Version

2.3000.1013068429

Browser Version

Chrome 124.0.6367.78

Operation System

Windows 11

Steps to reproduce

Use this code:-
WPP.chat.pin(activeChat.id._serialized);

What is expected?

When clicking on the pin button, the active chat should be pinned, and WhatsApp shouldn't log out.

What is actually happening?

On Clicking on Pin Button, this handler (pinBtnHandler) runs in our code:-

function pinBtnHandler(e) {
    console.log("pin btn clicked");
    WPP.chat.pin(activeChat.id._serialized);
}

On Clicking of Pin Button, This console error is coming

Uncaught (in promise) a {message: 'MasterDatabaseEncryptionKey.fts_hmac_keys was accessed before init', name: 'DbEncKeyNotLoadedError', stack: 'DbEncKeyNotLoadedError: MasterDatabaseEncryptionKe…3/yN/r/WFGO2fI2MBA.js?_nc_x=Ij3Wp8lg5Kz:104:1128)'}

After this console error, WhatsApp is logging out.
image (40)

Any additional comments?

On Phone this is also showing:-
Screenshot_20240425_155717_WhatsApp

@icleitoncosta
Copy link
Contributor

Hello, could you test the function again? Maybe there was some issue with this version of WhatsApp. I tested it on 2.3000.1013073077 and it works normally.

@mkamra2000
Copy link
Contributor Author

mkamra2000 commented Apr 27, 2024

Still happening with me on using pin functionality
image

Code that I used

WPP.chat.pin("[email protected]")
I'm trying to pin a group chat. My WhatsApp was logged in at that time, but as soon as I hit enter after putting this code, it logged out with the following error.

Error Stack Trace

Uncaught (in promise) Invariant Violation: Minified invariant #56367; %s
    at a (https://static.whatsapp.net/rsrc.php/v3/yz/r/vSgPJr1eTij.js?_nc_x=Ij3Wp8lg5Kz:64:372)
    at Object.f [as getStorage] (https://static.whatsapp.net/rsrc.php/v3ikKs4/yP/l/makehaste_jhash/H1JyfZJftPX.js?_nc_x=Ij3Wp8lg5Kz:219:402)
    at Object.b [as getMessageTable] (https://static.whatsapp.net/rsrc.php/v3ikKs4/yP/l/makehaste_jhash/H1JyfZJftPX.js?_nc_x=Ij3Wp8lg5Kz:443:6479)
    at Object.A [as getKeyMsgsFromChatHistory] (https://static.whatsapp.net/rsrc.php/v3ikKs4/yP/l/makehaste_jhash/H1JyfZJftPX.js?_nc_x=Ij3Wp8lg5Kz:1642:6275)
    at https://static.whatsapp.net/rsrc.php/v3i64v4/yF/l/makehaste_jhash/DVqHjk6EUsr.js?_nc_x=Ij3Wp8lg5Kz:15:10579
    at Array.map (<anonymous>)
    at I (https://static.whatsapp.net/rsrc.php/v3i64v4/yF/l/makehaste_jhash/DVqHjk6EUsr.js?_nc_x=Ij3Wp8lg5Kz:15:10515)
    at https://static.whatsapp.net/rsrc.php/v3i64v4/yF/l/makehaste_jhash/DVqHjk6EUsr.js?_nc_x=Ij3Wp8lg5Kz:15:8697
    at Generator.next (<anonymous>)
    at h (https://static.whatsapp.net/rsrc.php/v3/ye/r/mhctbROcDIM.js?_nc_x=Ij3Wp8lg5Kz:24:125)
    at g (https://static.whatsapp.net/rsrc.php/v3/ye/r/mhctbROcDIM.js?_nc_x=Ij3Wp8lg5Kz:24:349)
    at https://static.whatsapp.net/rsrc.php/v3/ye/r/mhctbROcDIM.js?_nc_x=Ij3Wp8lg5Kz:24:408
    at new Promise (<anonymous>)
    at https://static.whatsapp.net/rsrc.php/v3/ye/r/mhctbROcDIM.js?_nc_x=Ij3Wp8lg5Kz:24:277
    at https://static.whatsapp.net/rsrc.php/v3i64v4/yF/l/makehaste_jhash/DVqHjk6EUsr.js?_nc_x=Ij3Wp8lg5Kz:15:9945
    at https://static.whatsapp.net/rsrc.php/v3ikKs4/yP/l/makehaste_jhash/H1JyfZJftPX.js?_nc_x=Ij3Wp8lg5Kz:838:526
    at https://static.whatsapp.net/rsrc.php/v3ikKs4/yP/l/makehaste_jhash/H1JyfZJftPX.js?_nc_x=Ij3Wp8lg5Kz:830:4787
    at l (https://static.whatsapp.net/rsrc.php/v3/ye/r/mhctbROcDIM.js?_nc_x=Ij3Wp8lg5Kz:25:383)
    at t._invoke (https://static.whatsapp.net/rsrc.php/v3/ye/r/mhctbROcDIM.js?_nc_x=Ij3Wp8lg5Kz:25:2503)
    at t.next (https://static.whatsapp.net/rsrc.php/v3/ye/r/mhctbROcDIM.js?_nc_x=Ij3Wp8lg5Kz:25:745)
    at c (https://static.whatsapp.net/rsrc.php/v3/ye/r/mhctbROcDIM.js?_nc_x=Ij3Wp8lg5Kz:25:1128)
    at https://static.whatsapp.net/rsrc.php/v3/ye/r/mhctbROcDIM.js?_nc_x=Ij3Wp8lg5Kz:25:1517
    at new Promise (<anonymous>)
    at w.h [as _invoke] (https://static.whatsapp.net/rsrc.php/v3/ye/r/mhctbROcDIM.js?_nc_x=Ij3Wp8lg5Kz:25:1478)
    at w.next (https://static.whatsapp.net/rsrc.php/v3/ye/r/mhctbROcDIM.js?_nc_x=Ij3Wp8lg5Kz:25:745)
    at Object.async (https://static.whatsapp.net/rsrc.php/v3/ye/r/mhctbROcDIM.js?_nc_x=Ij3Wp8lg5Kz:25:1680)
    at https://static.whatsapp.net/rsrc.php/v3ikKs4/yP/l/makehaste_jhash/H1JyfZJftPX.js?_nc_x=Ij3Wp8lg5Kz:830:4649
    at a.<anonymous> (https://static.whatsapp.net/rsrc.php/v3ikKs4/yP/l/makehaste_jhash/H1JyfZJftPX.js?_nc_x=Ij3Wp8lg5Kz:830:7580)
    at l (https://static.whatsapp.net/rsrc.php/v3/ye/r/mhctbROcDIM.js?_nc_x=Ij3Wp8lg5Kz:25:383)
    at t._invoke (https://static.whatsapp.net/rsrc.php/v3/ye/r/mhctbROcDIM.js?_nc_x=Ij3Wp8lg5Kz:25:2503)
    at t.next (https://static.whatsapp.net/rsrc.php/v3/ye/r/mhctbROcDIM.js?_nc_x=Ij3Wp8lg5Kz:25:745)
    at c (https://static.whatsapp.net/rsrc.php/v3/ye/r/mhctbROcDIM.js?_nc_x=Ij3Wp8lg5Kz:25:1128)
    at https://static.whatsapp.net/rsrc.php/v3/ye/r/mhctbROcDIM.js?_nc_x=Ij3Wp8lg5Kz:25:1517
    at new Promise (<anonymous>)
    at w.h [as _invoke] (https://static.whatsapp.net/rsrc.php/v3/ye/r/mhctbROcDIM.js?_nc_x=Ij3Wp8lg5Kz:25:1478)
    at w.next (https://static.whatsapp.net/rsrc.php/v3/ye/r/mhctbROcDIM.js?_nc_x=Ij3Wp8lg5Kz:25:745)
    at Object.async (https://static.whatsapp.net/rsrc.php/v3/ye/r/mhctbROcDIM.js?_nc_x=Ij3Wp8lg5Kz:25:1680)
    at e.$13 (https://static.whatsapp.net/rsrc.php/v3ikKs4/yP/l/makehaste_jhash/H1JyfZJftPX.js?_nc_x=Ij3Wp8lg5Kz:830:7377)
    at https://static.whatsapp.net/rsrc.php/v3ikKs4/yP/l/makehaste_jhash/H1JyfZJftPX.js?_nc_x=Ij3Wp8lg5Kz:830:7213
    at Array.forEach (<anonymous>)
    at e.$14 (https://static.whatsapp.net/rsrc.php/v3ikKs4/yP/l/makehaste_jhash/H1JyfZJftPX.js?_nc_x=Ij3Wp8lg5Kz:830:7171)
    at https://static.whatsapp.net/rsrc.php/v3ikKs4/yP/l/makehaste_jhash/H1JyfZJftPX.js?_nc_x=Ij3Wp8lg5Kz:830:8002

qeternity pushed a commit to qeternity/wa-js that referenced this issue May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants