wppconnect-team / wppconnect

WPPConnect is an open source project developed by the JavaScript community with the aim of exporting functions from WhatsApp Web to the node, which can be used to support the creation of any interaction, such as customer service, media sending, intelligence recognition based on phrases artificial and many other things, use your imagination
https://wppconnect.io
Other
1.92k stars 336 forks source link

restart authorized instance wppconnect failed #1366

Closed antirek closed 2 years ago

antirek commented 2 years ago

Description

wppconnect instance was started, after reading qr-code, instance authorized - and i can send/receive messages. sometimes wppconnect eat a lot of RAM, and I restarted it. But instance doesn't start. Browser show that whatsapp-web is loading and nothing. After clearing of browser directory I must again start wppconnect instance and read qr-code. Earlier wppconnect instance start without any additional authorizations after reboot.

In logs: start clear wppconnect instance:

info:     You're up to date
info:     [whatsappsession:browser] Using browser folder './tokens/whatsappsession'
info:     [whatsappsession:browser] Initializing browser...
info:     [whatsappsession:client] Initializing...
Status { statusSession: 'notLogged', session: 'whatsappsession' }
qr code callback start
info:     [whatsappsession:client] WhatsApp WEB version: 2.2236.10
info:     [whatsappsession:client] WA-JS version: 2.13.1
info:     [whatsappsession:session] Session Unpaired
Status { statusSession: 'qrReadSuccess', session: 'whatsappsession' }
Status { statusSession: 'inChat', session: 'whatsappsession' }

after reboot

info:     You're up to date
info:     [whatsappsession:browser] Using browser folder './tokens/whatsappsession'
info:     [whatsappsession:browser] Initializing browser...
info:     [whatsappsession:client] Initializing...
info:     [whatsappsession:client] WhatsApp WEB version: 2.2236.10
info:     [whatsappsession:client] WA-JS version: 2.13.1

no any data continue 5 minutes 

Screenshot from 2022-10-11 13-50-43

after delete token dir and start clear wppconnect instance - read qr-code again and can use to next reboot ))

Environment

antirek commented 2 years ago

if I change to old versions wppconnect, wa.js and whatsapp-web - authorized session up after reboot successful.

rsaisankalp commented 2 years ago

yes facing the same issue

jesusvalverde commented 2 years ago

same

dionatanfmsilva commented 2 years ago

Same problem here Testing on my local machine displays these errors on the console

001

antirek commented 2 years ago

up to latest wppconnect@1.17.1, wa.js@2.13.2, wa-version@1.1.174 also try test other versions wa-web: 2.2230.15 - all ok 2.2232.8 - all ok 2.2234.13 - all ok 2.2236.10 - problem 2.2238.7 - problem

rsaisankalp commented 2 years ago

Issue is not resolved. Same issue is persisting

rsaisankalp commented 2 years ago

Issue still persists in 1.18.0

jesusvalverde commented 2 years ago

On 16 independent bots, so far no issues with 1.18.0

edgardmessias commented 2 years ago

@rsaisankalp, please, make a test with 1.18.1

jesusvalverde commented 2 years ago

Updated to 1.18.1, reboot and no problems (so far)

WhatsApp WEB version: 2.2230.15 WA-JS version: 2.13.3

rsaisankalp commented 2 years ago

after connecting in 1.18.1

restarting it doesn't authorize the session. facing following error on reboot 1|wppconnect | __ __ 1|wppconnect | | | / / \/ \/ __/__ _ ___/ / 1|wppconnect | | | /| / / // / /_/ / / / \/ \/ \/ \/ / / 1|wppconnect | | |/ |/ / __/ __/ /__/ // / / / / / / / / // /
1|wppconnect | |/|/
/ // __/__// /// //\
/_/\/ 1|wppconnect | info: Checking for updates 1|wppconnect | info: You're up to date 1|wppconnect | info: [919686188814:browser] Using browser folder './userDataDir/919686188814' 1|wppconnect | info: [919686188814:browser] Initializing browser... 1|wppconnect | info: [919686188814:client] Initializing... 1|wppconnect | info: [919686188814:client] WhatsApp WEB version: 2.2234.13 1|wppconnect | info: [919686188814:client] WA-JS version: 2.13.3 1|wppconnect | info: [919686188814:client] Auto close configured to 60s 1|wppconnect | info: 2022-10-20T18:27:52.510Z isLogged 1|wppconnect | info: [919686188814:client] Auto close configured to 60s 1|wppconnect | info: [919686188814:client] Closing the page 1|wppconnect | info: 2022-10-20T18:28:52.778Z browserClose 1|wppconnect | error: 2022-10-20T18:28:52.856Z Protocol error (Runtime.callFunctionOn): Session closed. Most likely the page has been closed. - Error: Protocol error (Runtime.callFunctionOn): Session closed. Most likely the page has been closed. 1|wppconnect | at CDPSession.send (/home/ec2-user/whatsappserver/wppconnect-server/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:265:35) 1|wppconnect | at ExecutionContext._ExecutionContext_evaluate (/home/ec2-user/whatsappserver/wppconnect-server/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:268:46) 1|wppconnect | at ExecutionContext.evaluate (/home/ec2-user/whatsappserver/wppconnect-server/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:117:113) 1|wppconnect | at DOMWorld.evaluate (/home/ec2-user/whatsappserver/wppconnect-server/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:191:24)

antirek commented 2 years ago

I tested with wppconnect@1.18.1 and whatsapp-web 2.2240.7-beta - all good @edgardmessias thanks! @rsaisankalp up whatsapp-web version

edgardmessias commented 2 years ago

Thank's @antirek

rsaisankalp commented 2 years ago

Wppconnect 1.18.1 WA web version 2.2234.13

Unable to reconnect. Numbers gets disconnected within one day Some times recovers sometimes not

wppconne | info: Checking for updates 1|wppconne | info: [919686188814:browser] Using browser folder './userDataDir/919686188814' 1|wppconne | info: [919686188814:browser] Initializing browser... 1|wppconne | info: You're up to date 1|wppconne | info: [916281503099:browser] Using browser folder './userDataDir/916281503099' 1|wppconne | info: [916281503099:browser] Initializing browser... 1|wppconne | info: [919686188814:client] Initializing... 1|wppconne | info: [916281503099:client] Initializing...

1|wppconnect | info: [919686188814:client] WhatsApp WEB version: 2.2234.13 1|wppconnect | info: [919686188814:client] WA-JS version: 2.13.3 1|wppconnect | info: [919686188814:client] Auto close configured to 60s 1|wppconnect | info: 2022-10-22T01:02:55.306Z isLogged 1|wppconnect | info: [919686188814:client] Auto close configured to 60s 1|wppconnect | info: [916281503099:client] WhatsApp WEB version: 2.2234.13 1|wppconnect | info: [916281503099:client] WA-JS version: 2.13.3 1|wppconnect | info: [916281503099:client] Auto close configured to 60s 1|wppconnect | info: 2022-10-22T01:02:56.505Z isLogged 1|wppconnect | info: [916281503099:client] Auto close configured to 60s 1|wppconnect | info: [919686188814:client] Closing the page 1|wppconnect | info: 2022-10-22T01:03:55.588Z browserClose 1|wppconnect | error: 2022-10-22T01:03:55.750Z Protocol error (Runtime.callFunctionOn): Session closed. Most likely the page has been closed. - Error: Protocol error (Runtime.callFunctionOn): Session closed. Most likely the page has been closed. 1|wppconnect | at CDPSession.send (/home/ec2-user/whatsappserver/wppconnect-server/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:265:35) 1|wppconnect | at ExecutionContext._ExecutionContext_evaluate (/home/ec2-user/whatsappserver/wppconnect-server/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:268:46) 1|wppconnect | at ExecutionContext.evaluate (/home/ec2-user/whatsappserver/wppconnect-server/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:117:113) 1|wppconnect | at DOMWorld.evaluate (/home/ec2-user/whatsappserver/wppconnect-server/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:191:24) 1|wppconnect | info: [916281503099:client] Closing the page 1|wppconnect | info: 2022-10-22T01:03:56.745Z browserClose 1|wppconnect | error: 2022-10-22T01:03:56.885Z Protocol error (Runtime.callFunctionOn): Session closed. Most likely the page has been closed. - Error: Protocol error (Runtime.callFunctionOn): Session closed. Most likely the page has been closed. 1|wppconnect | at CDPSession.send (/home/ec2-user/whatsappserver/wppconnect-server/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:265:35) 1|wppconnect | at ExecutionContext._ExecutionContext_evaluate (/home/ec2-user/whatsappserver/wppconnect-server/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:268:46) 1|wppconnect | at ExecutionContext.evaluate (/home/ec2-user/whatsappserver/wppconnect-server/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:117:113) 1|wppconnect | at DOMWorld.evaluate (/home/ec2-user/whatsappserver/wppconnect-server/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:191:24)