wppconnect-server
wppconnect-server copied to clipboard
Ao tentar iniciar uma sessão ocorre o erro: Auto Closed Called
Tenho um container no Azure que esta rodando a imagem do wppconnect-server, tendo um volume de compartilhamento de arquivos. Ao tentar iniciar uma sessão está ocorrendo o seguinte erro: error: Auto Closed Called
, conforme imagem abaixo.
Tentei algumas alternativas que ja havia em outras Issues, porém sem sucesso.
Como solucionar este problema que esta ocorrendo?
2023-11-29T18:58:06.824318932Z info: 2023-11-29T18:58:06.820Z Server is running on port: 21465
2023-11-29T18:58:06.825585998Z info: 2023-11-29T18:58:06.825Z Visit http://localhost:21465/api-docs for Swagger docs
2023-11-29T18:58:06.825870543Z info: 2023-11-29T18:58:06.825Z WPPConnect-Server version: 2.3.0
2023-11-29T18:59:00.354470458Z info:
2023-11-29T18:59:00.354513078Z _ ______ ____ ______ __
2023-11-29T18:59:00.354525913Z | | / / __ \/ __ \/ ____/___ ____ ____ ___ _____/ /_
2023-11-29T18:59:00.354533467Z | | /| / / /_/ / /_/ / / / __ \/ __ \/ __ \/ _ \/ ___/ __/
2023-11-29T18:59:00.354539097Z | |/ |/ / ____/ ____/ /___/ /_/ / / / / / / / __/ /__/ /_
2023-11-29T18:59:00.354545619Z |__/|__/_/ /_/ \____/\____/_/ /_/_/ /_/\___/\___/\__/
2023-11-29T18:59:00.354551831Z info: Checking for updates
2023-11-29T18:59:00.680112700Z info: You're up to date
2023-11-29T18:59:00.680946808Z info: [testevolume2:browser] Using browser folder './userDataDir/testevolume2'
2023-11-29T18:59:00.680978918Z info: [testevolume2:browser] Initializing browser...
2023-11-29T18:59:00.976249734Z
2023-11-29T18:59:00.976906908Z Puppeteer old Headless deprecation warning:
2023-11-29T18:59:00.976931565Z In the near future `headless: true` will default to the new Headless mode
2023-11-29T18:59:00.976943207Z for Chrome instead of the old Headless implementation. For more
2023-11-29T18:59:00.976949889Z information, please see https://developer.chrome.com/articles/new-headless/.
2023-11-29T18:59:00.976956902Z Consider opting in early by passing `headless: "new"` to `puppeteer.launch()`
2023-11-29T18:59:00.976962823Z If you encounter any bugs, please report them to https://github.com/puppeteer/puppeteer/issues/new/choose.
2023-11-29T18:59:00.976968935Z
2023-11-29T18:59:01.434500931Z http: [testevolume2:browser] checking headless...
2023-11-29T18:59:01.434706938Z http: [testevolume2:browser] headless option is active, browser hidden
2023-11-29T18:59:01.523060118Z info: [testevolume2:client] Initializing...
2023-11-29T18:59:01.531710335Z http: [testevolume2:client] Waiting page load
2023-11-29T18:59:02.527199748Z verbose: [testevolume2:client] Loading WhatsApp WEB
2023-11-29T18:59:02.528608373Z verbose: [testevolume2:client] WhatsApp WEB loaded
2023-11-29T18:59:07.837526538Z verbose: [testevolume2:page] Page loaded
2023-11-29T18:59:07.911631025Z verbose: [testevolume2:client] Injecting wapi.js
2023-11-29T18:59:13.320002541Z info: [testevolume2:session] Session Unpaired
2023-11-29T18:59:15.231523266Z verbose: [testevolume2:client] wapi.js injected
2023-11-29T18:59:16.741897043Z debug: [testevolume2:client] Exposing onMessage function
2023-11-29T18:59:16.916739574Z http: [testevolume2:client] Checking is logged...
2023-11-29T18:59:17.218481361Z info: [testevolume2:client] Auto close configured to 120s
2023-11-29T18:59:17.218978193Z info: [testevolume2:client] Closing the page
2023-11-29T18:59:17.219392702Z error: [testevolume2:client] Auto Close Called
2023-11-29T18:59:17.219634005Z debug: [testevolume2:client] Exposing onAnyMessage function
2023-11-29T18:59:17.220454836Z error: 2023-11-29T18:59:17.220Z Auto Close Called
2023-11-29T18:59:17.223221831Z verbose: [testevolume2:page] Page Closed
2023-11-29T18:59:17.313270349Z debug: [testevolume2:client] Exposing onAck function
2023-11-29T18:59:17.313366299Z debug: [testevolume2:client] Exposing onNotificationMessage function
2023-11-29T18:59:17.313377140Z debug: [testevolume2:client] Exposing onParticipantsChanged function
2023-11-29T18:59:17.313384243Z debug: [testevolume2:client] Exposing onStateChange function
2023-11-29T18:59:17.313717309Z debug: [testevolume2:client] Exposing onStreamChange function
2023-11-29T18:59:17.313822786Z debug: [testevolume2:client] Exposing onIncomingCall function
2023-11-29T18:59:17.314792676Z debug: [testevolume2:client] Exposing onInterfaceChange function
2023-11-29T18:59:17.314808125Z debug: [testevolume2:client] Exposing onPresenceChanged function
2023-11-29T18:59:17.314946005Z debug: [testevolume2:client] Exposing onLiveLocation function
2023-11-29T18:59:17.316116723Z debug: [testevolume2:client] Exposing onAddedToGroup function
2023-11-29T18:59:17.316320606Z debug: [testevolume2:client] Exposing onIncomingCall function
2023-11-29T18:59:17.317235865Z debug: [testevolume2:client] Exposing onRevokedMessage function
2023-11-29T18:59:17.317420341Z debug: [testevolume2:client] Exposing onReactionMessage function
2023-11-29T18:59:17.317507655Z debug: [testevolume2:client] Exposing onPollResponse function
2023-11-29T18:59:17.319041785Z debug: [testevolume2:client] Exposing onUpdateLabel function
2023-11-29T18:59:17.319276826Z debug: [testevolume2:client] Exposing onOrderStatusUpdate function
2023-11-29T18:59:17.322301618Z info: 2023-11-29T18:59:17.322Z browserClose
Meu config.ts:
export default {
secretKey: '**************',
host: 'http://localhost',
port: '21465',
deviceName: 'WppConnect',
poweredBy: 'WPPConnect-Server',
startAllSession: false,
tokenStoreType: 'file',
maxListeners: 15,
customUserDataDir: './userDataDir/',
webhook: {
url: null,
autoDownload: true,
uploadS3: false,
readMessage: true,
allUnreadOnStart: false,
listenAcks: true,
onPresenceChanged: true,
onParticipantsChanged: true,
onReactionMessage: true,
onPollResponse: true,
onRevokedMessage: true,
onLabelUpdated: true,
onSelfMessage: false,
ignore: ['status@broadcast'],
},
websocket: {
autoDownload: false,
uploadS3: false,
},
chatwoot: {
sendQrCode: true,
sendStatus: true,
},
archive: {
enable: true,
waitTime: 50,
daysToArchive: 45,
},
log: {
level: 'silly', // Before open a issue, change level to silly and retry a action
logger: ['console', 'file'],
},
createOptions: {
autoClose: 120000,
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',
],
/**
* Example of configuring the linkPreview generator
* If you set this to 'null', it will use global servers; however, you have the option to define your own server
* Clone the repository https://github.com/wppconnect-team/wa-js-api-server and host it on your server with ssl
*
* Configure the attribute as follows:
* linkPreviewApiServers: [ 'https://www.yourserver.com/wa-js-api-server' ]
*/
linkPreviewApiServers: null,
},
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',
},
aws_s3: {
region: 'sa-east-1',
access_key_id: null,
secret_key: null,
defaultBucketName: null,
endpoint: null,
forcePathStyle: null,
},
};
I'm having the same problem
problem resolved in new versions.
update your environment and create a new session again.