wppconnect-server
wppconnect-server copied to clipboard
WAPI is not defined
Description
anytime i restart the server ( using CTRL+C and start it again ) or ( using pm2 restart ) or ( restarting whole server/VPS ) old session aren't working again, and no way to start them, only way to bypass it is by creating new session and giving up on old ones which breaks the system because have to scan qrcode over and over and over agian.
Similar Issues:
- https://github.com/wppconnect-team/wppconnect-server/issues/909#issuecomment-1255039452 on #909
- https://discord.com/channels/844351092758413353/844351724600688657/1021436871936577726
- https://discord.com/channels/844351092758413353/844351724600688657/1021538719150395482
- https://discord.com/channels/844351092758413353/844351724600688657/1022025194300248064
- https://discord.com/channels/844351092758413353/844351724600688657/1022847492301258782
Environment
- Wppconnect-server version(s): 1.6.2 ( latest on 24-sep-2022 )
- Browser: Chromium and Chrome (105.0.5195.127)
- OS: Windows 11 and Centos 6 and Ubuntu (tested on all them)
- Node version: 14.18.1
- WhatsApp version: 2.2234.13
- WA-JS version: 2.12.0
- MultiDevice (BETA): yes
- config.json:
{
"secretKey": "THISISMYSECURETOKEN",
"host": "http://localhost",
"port": "21465",
"deviceName": "Localhost",
"poweredBy": "Localhost-Server",
"startAllSession": false,
"tokenStoreType": "file",
"maxListeners": 15,
"customUserDataDir": "./userDataDir/",
"webhook": {
"url": "http://127.0.0.1:8000/api/internal-node",
"autoDownload": false,
"uploadS3": false,
"readMessage": false,
"allUnreadOnStart": false,
"listenAcks": false,
"onPresenceChanged": false,
"onParticipantsChanged": false,
"onReactionMessage": false
},
"archive": {
"enable": false,
"waitTime": 10,
"daysToArchive": 45
},
"log": {
"level": "error",
"logger": ["console", "file"]
},
"createOptions": {
"browserArgs": [
"--disable-web-security",
"--no-sandbox",
"--disable-web-security",
"--aggressive-cache-discard",
"--disable-cache",
"--disable-application-cache",
"--disable-offline-load-stale-cache",
"--disk-cache-size=0",
"--disable-background-networking",
"--disable-default-apps",
"--disable-extensions",
"--disable-sync",
"--disable-translate",
"--hide-scrollbars",
"--metrics-recording-only",
"--mute-audio",
"--no-first-run",
"--safebrowsing-disable-auto-update",
"--ignore-certificate-errors",
"--ignore-ssl-errors",
"--ignore-certificate-errors-spki-list"
]
},
"mapper": {
"enable": false,
"prefix": "tagone-"
},
"db": {
"mongodbDatabase": "tokens",
"mongodbCollection": "",
"mongodbUser": "",
"mongodbPassword": "",
"mongodbHost": "",
"mongoIsRemote": true,
"mongoURLRemote": "",
"mongodbPort": 27017,
"redisHost": "localhost",
"redisPort": 6379,
"redisPassword": "",
"redisDb": 0,
"redisPrefix": "docker"
}
}
Steps to Reproduce
- Open server
- link whatsapp
- restart server somehow
- start same session ( or it will auto start if specified in config )
Log Output
[nodemon] restarting due to changes...
[nodemon] starting `babel-node src/server.js`
info: 2022-09-24T14:16:18.025Z Server is running on port: 21465
info: 2022-09-24T14:16:18.028Z Visit http://localhost:21465/api-docs for Swagger docs
info: 2022-09-24T14:16:18.029Z WPPConnect-Server version: 1.6.2
info:
_ ______ ____ ______ __
| | / / __ \/ __ \/ ____/___ ____ ____ ___ _____/ /_
| | /| / / /_/ / /_/ / / / __ \/ __ \/ __ \/ _ \/ ___/ __/
| |/ |/ / ____/ ____/ /___/ /_/ / / / / / / / __/ /__/ /_
|__/|__/_/ /_/ \____/\____/_/ /_/_/ /_/\___/\___/\__/
info: Checking for updates
info: You're up to date
info: [9757b00d-d707-4dfd-8704-f0dae87b0eac:browser] Using browser folder './userDataDir/9757b00d-d707-4dfd-8704-f0dae87b0eac'
info: [9757b00d-d707-4dfd-8704-f0dae87b0eac:browser] Initializing browser...
info: [9757b00d-d707-4dfd-8704-f0dae87b0eac:client] Initializing...
info: [9757b00d-d707-4dfd-8704-f0dae87b0eac:client] Auto close configured to 60s
info: 2022-09-24T14:17:16.217Z isLogged
info: [9757b00d-d707-4dfd-8704-f0dae87b0eac:client] Auto close configured to 60s
info: 2022-09-24T14:17:16.477Z inChat
error: 2022-09-24T14:17:16.704Z WAPI is not defined - Error: WAPI is not defined
at C:\Users\Saif\IdeaProjects\wppconnect-server\node_modules\@wppconnect-team\wppconnect\dist\api\helpers\evaluate-and-return.js:106:31
at step (C:\Users\Saif\IdeaProjects\wppconnect-server\node_modules\@wppconnect-team\wppconnect\dist\api\helpers\evaluate-and-return.js:49:23)
at Object.next (C:\Users\Saif\IdeaProjects\wppconnect-server\node_modules\@wppconnect-team\wppconnect\dist\api\helpers\evaluate-and-return.js:30:53)
at fulfilled (C:\Users\Saif\IdeaProjects\wppconnect-server\node_modules\@wppconnect-team\wppconnect\dist\api\helpers\evaluate-and-return.js:21:58)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
JS Stack: ReferenceError: WAPI is not defined
at pptr://__puppeteer_evaluation_script__:56:47
at pptr://__puppeteer_evaluation_script__:56:77
at Y (https://web.whatsapp.com/bootstrap_qr.c8a228a8ac9e7fc0fc33.js:40:119374)
at new y (https://web.whatsapp.com/bootstrap_qr.c8a228a8ac9e7fc0fc33.js:40:111941)
at anonymous (pptr://__puppeteer_evaluation_script__:54:14)
Your Code
none
Additional context / Screenshot
none
I'm also having this problem.
I am also facing same issue. although its connected but if you check the status it shows {"status":"INITIALIZING","version":"1.6.2"}
Maybe fixed by https://github.com/wppconnect-team/wppconnect/pull/1340 ? .. not sure, will test tomorrow.
Não esta corrigido, segue apresentando o mesmo problema!
para mim tbm o mesmo problema. the same problem...
Same problem is ocurring on windows o.s.
I Have tried changing "allUnreadOnStart": true or false, with same results
PS: This problem started after updating to 1.17.0.
Same problem is ocurring on windows o.s.
I Have tried changing "allUnreadOnStart": true or false, with same results
PS: This problem started after updating to 1.17.0.
Good to know about it, i'll revert to older versions, maybe will fix. i'm fully updated too.
Same problem is ocurring on windows o.s. I Have tried changing "allUnreadOnStart": true or false, with same results PS: This problem started after updating to 1.17.0.
Good to know about it, i'll revert to older versions, maybe will fix. i'm fully updated too.
So, any luck? Is it fixed?
Same problem is ocurring on windows o.s. I Have tried changing "allUnreadOnStart": true or false, with same results PS: This problem started after updating to 1.17.0.
Good to know about it, i'll revert to older versions, maybe will fix. i'm fully updated too.
So, any luck? Is it fixed?
Don't have tested yet, test it by yourself.
same issue please fix it in the lastest version
Could you test with latest release?
Yes tested with latest not fixed yet
1.15.0 working well here by now, i'll keep testing it, any issues i'll let all of u know. tks.
- not tested latest yet, but i'll keep using 1.15.0 for some time, that's a perfect version *
This has been fixed in version 1.6.4