-
-
Notifications
You must be signed in to change notification settings - Fork 603
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
Error during health check evaluation #3218
Comments
Hi, it seems WA recent update breaks session health checking. Previous versions 4.71.11 and 4.71.10 are affected too.
Debug info:
|
I tried several versions up to 4.71.4 and 4.68.0, the problem continues |
yes, i could not find a solution to the problem, is on backburner in my case. |
thanks for reporting this. fix coming soon, it will require updating |
@github-actions run ⚡ Release! ⚡(async () => {
function exec(cmd) {
try {
execSync(cmd, {stdio: 'inherit'})
} catch (error) {
console.log(`Status Code: ${error.status} with '${error.message}'`);
}
}
//set the version type
process.env.VERS = "patch"
// Config
const gitUserEmail = "github-actions[bot]@users.noreply.github.com";
const gitUserName = "github-actions[bot]";
exec(`echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc`);
exec(`git config --global user.email "${gitUserEmail}"`);
exec(`git config --global user.name "${gitUserName}"`);
exec(`npm i -D`);
exec(`npm run release-ci $VERS`);
// types only package
exec('npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN')
exec(`npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN && npm run types:publish `);
exec(`git commit -a -m 'updated types-only package'`);
exec(`git push --force`);
//comment on the issue
var result = execSync(`npx auto-changelog -o ./tempchangelog.txt --commit-limit false --template ./compact-keepachangelog.hbs --stdout`).toString();
await postComment(result);
//create changelog image
exec(`npm run release-image`);
exec(`git commit -a -m 'updated release-image'`);
exec(`git push --force`);
})(); |
Changelog🚀 Release 4.71.13 (2024-06-11)
|
Thank you @smashah, it's working now. |
Working now Thanks |
Are you using the latest version of the library?
What type of session are you experiencing this issue on?
Multi-device and I have set multiDevice to true in my config OR am using the --multi-device flag
What type of host account are you experiencing this issue on?
Personal account (normal)
Mode
EASY API/CLI
Current Behavior
when client.healthCheck().then(... is run an exception is thrown.
Error during health check evaluation: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'length')
at window.. (pptr://puppeteer_evaluation_script:1:361038)
at pptr://puppeteer_evaluation_script:6:28
.../node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js:258
throw new Error('Evaluation failed: ' + (0, util_js_1.getExceptionMessage)(exceptionDetails));
^
Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'length')
at window.. (pptr://puppeteer_evaluation_script:1:361038)
at pptr://puppeteer_evaluation_script:6:28
at ExecutionContext._ExecutionContext_evaluate (.../node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js:258:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async ExecutionContext.evaluate (..../node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js:146:16)
apears to be in @open-wa/wa-automate/dist/api/Client.js
this function
healthCheck() {
return __awaiter(this, void 0, void 0, function* () {
return yield this._page.evaluate(() => WAPI.healthCheck());
});
} i tried to mitigate the error by changing the function in node_modules, but the healthCheck does not work.
console.log('this._page=',this._page.evaluate);
const result = yield this._page.evaluate(() => {
console.log('wapi=',WAPI); WAPI is not executed.
Expected Behavior
I expect client.healthCheck to run normally. This is my implementation of the function
client.healthCheck().then(function (val) {
console.log("HealthCheck ", val);
if (val.state = wa.STATE.CONNECTED && val.online) {
var request = {
method: 'post',
url: HEARTBEAT_URL,
};
console.log("Will send heartbeat");
axios(request).then(async function(response) {
console.log("heartbeat successfull")
});
} else {
console.log("HealthCheck failed");
}
And this is the setup of the client:
wa.create({
sessionId: "COVID_HELPER",
multiDevice: true, //required to enable multiDevice support
authTimeout: 60, //wait only 60 seconds to get a connection with the host account devi>
blockCrashLogs: true,
disableSpins: true,
headless: true,
hostNotificationLang: 'PT_BR',
logConsole: true,
ezqr: true,
popup: true,
autoRefresh:false,
qrTimeout: 0, //0 means it will wait forever for you to scan the qr code
}).then(client => start(client));
Steps To Reproduce
const wa = require('@open-wa/wa-automate');
wa.create({
sessionId: "COVID_HELPER",
multiDevice: true, //required to enable multiDevice support
authTimeout: 60, //wait only 60 seconds to get a connection with the host account devi>
blockCrashLogs: true,
disableSpins: true,
headless: true,
hostNotificationLang: 'PT_BR',
logConsole: true,
ezqr: true,
popup: true,
autoRefresh:false,
qrTimeout: 0, //0 means it will wait forever for you to scan the qr code
}).then(client => start(client));
function start(client) {
console.log("This is the start");
try{
}
create() code OR full CLI command + CONFIG
No response
DEBUG INFO
Environment
Screenshots/Logs
Anything else?
No response
The text was updated successfully, but these errors were encountered: