-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Farewell, Webpack! Re-injection, Pairing Code login, and 2.24x jumbofix #2816
base: main
Are you sure you want to change the base?
Conversation
Also, the "eval" function from inject.js file isn't running due to content security policy !! |
using nodejs v13 after apply new moduleraid on whatsapp web version Version 2.3000.1012111500 still got error (node:10784) UnhandledPromiseRejectionWarning: Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'default') |
I believe that the issue is not in the pr itself but in the way moduleRaid is used and the way is finding modules, used within injected.js, because in many cases it assumes that the findModule method returns non empty array, maybe with old webpack this way it was feasible but now with comet this code needs some optimization I am not sure if the manipulation of these statements actually differs between node versions or between different modes, this need a lot of tests |
ModuleError: Requiring module "%s" with unresolved dependencies: %s Getting this error |
Please if you can print the full error so we can see in which file and in which line this error is occured |
Thank you. I'm using module raid and the code from inject.js |
maybe because i'm using backtick for this on module raid ? because without backtick it give error unexpected token '.' on nodejs v13 const isComet = |
Try to update your node version, as it seems that optional chaining is not supported in node older than node 14 |
can't do it. because the client still using windows 7. latest support can only using node v13 |
You must optimize code to use old javascript
So you must optimize this statement to use old javascript Try this:
|
I got this error
the error was caused by a change in the function so I change the
Tested Sending & Receive Message is ok. Update
|
i try remove that 2 line .default still error reading 'default' using node v13 and whatsapp web Version 2.3000.1012116664 (did your web version like mine ? i found that after 2.3000.xxxxx the number xxxxx keep increasing, maybe whatsapp keep updating or what ?) |
try following this change #2822
|
thx finally fix it. I miss the array [0] change to [1]. thx you very much |
This comment was marked as off-topic.
This comment was marked as off-topic.
I tried everything but I still get this error TypeError: Cannot read properties of undefined (reading 'default'). Is there a solution? I am using the new whatsapp web.js 1.24. Please help me |
@ozkanydin , try this: webVersionCache: { I'm using the vesion But I couldn't solve the video sending problem in this version |
thanks for the reply @danyllo106 I'm getting this error. Do you have a solution this time? Can you help me? I've been trying for days.
Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading '_find') |
Have you tried uninstalling node_modules from the project, .wwebjs_auth and .wwebjs_cache |
@danyllo106 |
hi it solves this problem: "Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'push')" but it doesn't make the application work! it can't start WhatsApp, there's no auth message anymore it doesn't show anything |
But how can I use methods from the channel pull? I need to send a message into the WhatsApp channel. |
Oi, sobre os erros que estão acontecendo na hora de escanear o QR code e em seguida aparecer o erro: C:\wamp64\www\testebot\node_modules\puppeteer\lib\cjs\puppeteer\common\Execution Error: Evaluation failed: TypeError: Cannot read properties of undefined (readin Consegui resolver mudando no arquivo node_modules@pedroslopez\moduleraid\moduleraid.js a linha do fillModuleArray: fillModuleArray = function() { fillModuleArray(); Para essta: fillModuleArray = function() { fillModuleArray(); |
I still get this error mentioned in #3100 once in a while.
|
remotepath: ...wppconnect-team/wa-version/main/html/2.2413.51-beta.html" not found, What is the alternative ? |
im have same problem, any solution ? |
it
it seems all of the old & compatible version of whatsapp has been removed from wppconnect github at https://github.com/wppconnect-team/wa-version/tree/main/html . you can access the old html content on previous git version (like following https://raw.githubusercontent.com/wppconnect-team/wa-version/601b90a9fffce8a19e08efba9bd804fdcb43f656/html/2.2412.54.html ) but on my server it seems whatsapp has deactivated all of old whatsapp web version. i am currently trying out the bleeding edge library version ( |
I'm already using What am I doing wrong? |
Thanks to @rbkayz for helping with the createGroup newFunction |
WWeb v2.24.xx left the cycle, use this branch until it is merged or another solution is providedTo migrate to WWeb v2.3000.x do these steps:1. If you have
|
TL;DR:
WhatsApp released 2.3000x, a version that does not use Webpack anymore. We had to change the Store system to no longer use
moduleRaid
. Instability issues are caused by relying on selectors & DOM Observers for login, as well as increased performance issues. This prompted me to adopt the "New startup flow" that I mentioned here. This update is important. This update will boost reliability in WWebJS at least 400%. I also added pairing code login for those who needed it since I had the docs on hand (I reverse engineer then take notes, so I know what I know when I make them into PRs). It changes a lot in the authentication and launching. I advise you all to test your systems before deploying to production (even though this build should be prod-safe).You should immediately update to my version and cease using any other fork or version. Your system will work regardless if you are using a web cache, local cache, no cache.. LocalAuth, RemoteAuth, NoAuth... 2.24 and 2.3000.
TO INSTALL:
If you encounter a
git not found
error in the NPM/yarn install: Download git, https://git-scm.comThank you for your trust and time and thank you to my sponsors for their contribution.
PR Details
This PR adds support for Wwebjs past version 2.3000.x and 2.24..x. Send "F" in the chat for Webpack!
As always, very big thanks to my sponsors for their support! I am only able to do this thanks to them!
Also thanks to @allburov for his work on #2827, helped me a bit to know which modules are problematic.
This PR also adds re-injection in the case of navigation or refresh or intentional logout and pairing code login option.
It also changes a lot of the code in the startup flow.
To note:
await client.initialize()
returns it promise much earlier at the point of a new QR code (no login). The behavior is almost the same when logged in (it resolves the promise at AROUND ready).ORGANIZING
,INTIAL_LOAD
,DOWNLOADING
,...)This update will bring a lot of performance, time savings and increased reliability due to this refactor. We are not relying on constantly changing and dynamic HTML to get QR codes, to detect logins and this will make it much better. I also went out of my way and reversed all of the Pairing Code infra to get the only needed functions (3) and made them into this way so that we stop getting failed attempts like #2363
Description
Related Issue
closes #2789, closes #1787, closes #3016
Motivation and Context
After WhatsApp's update to 2.3000.x, moduleRaid no longer detected webpack (since they changed build systems)
After WhatsApp's update to 2.24xx.x, the manifest json no longer included the version, requiring a revamp for the cache system!
How Has This Been Tested
I tested this on many machines and concluded it is non-obtrusive. This will not break old versions and works with new ones
Types of changes
Checklist