Skip to content
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

TimeoutError: waiting for target failed: timeout 30000ms exceed #2182

Closed
ademir10 opened this issue May 20, 2024 · 1 comment
Closed

TimeoutError: waiting for target failed: timeout 30000ms exceed #2182

ademir10 opened this issue May 20, 2024 · 1 comment
Labels
bug Something isn't working needs triage

Comments

@ademir10
Copy link

ademir10 commented May 20, 2024

Description

Quando executar o wppconnect.create recebo a seguinte mensagem depois de alguns segundos:
TimeoutError: waiting for target failed: timeout 30000ms exceeded

Environment

  • WPPConnect version(s): 1.30.3
  • WA-JS version(s): X.Y.Z
  • Browser: Chrome XX / Chromium XX
  • OS: OSX Sonoma M1
  • Node version: Node 21.0.0
  • WhatsApp version: X.YYYY.ZZ
  • MultiDevice (BETA): no

Steps to Reproduce

  1. [First Step]
  2. [Second Step]
  3. [and so on...]

Log Output

info: [sessionName:browser] Initializing browser...
error: [sessionName:browser] Error no open browser
error: [sessionName:browser] waiting for target failed: timeout 30000ms exceeded
TimeoutError: waiting for target failed: timeout 30000ms exceeded
at Helper.waitWithTimeout (/Users/ademir/apps/logchat/node_modules/puppeteer/lib/helper.js:228:26)
at Browser.waitForTarget (/Users/ademir/apps/logchat/node_modules/puppeteer/lib/Browser.js:214:27)
at Browser. (/Users/ademir/apps/logchat/node_modules/puppeteer/lib/helper.js:112:23)
at ChromeLauncher.launch (/Users/ademir/apps/logchat/node_modules/puppeteer/lib/Launcher.js:247:21)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async PuppeteerExtra.launch (/Users/ademir/apps/logchat/node_modules/puppeteer-extra/dist/index.cjs.js:128:25)

If relevant, paste all of your Log Output

Your Code

gerar_qrcode: async function (req, res) {

//TENTEI INICIAR O BROWSER AQUI MAS NÃO ACONTECEU NADA DE DIFERENTE..
const browser = await puppeteer.launch({  
  defaultViewport: null,
  executablePath: "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
});

wppconnect.create({
  session: "sessionName",
  catchQR: (base64Qrimg, asciiQR, attempts, urlCode) => {
    console.log("Terminal qrcode: ", asciiQR)
    return resolve(res.view({ qr_gerado: urlCode }))
  },
  statusFind: (statusSession, session) => {
    console.log("Status Session: ", statusSession)
    console.log("Session name: ", session)
  },
  headless: "new"
})
  .then(client => {
    start(client)
  })
  .catch(erro => {
    console.log(erro)
  })

},
If relevant, paste all of your challenge code in here


## Additional context / Screenshot

Add any other context about the problem here. If applicable, add screenshots to help explain.
@ademir10 ademir10 added bug Something isn't working needs triage labels May 20, 2024
@icleitoncosta
Copy link
Contributor

Please, install de chromium browser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

No branches or pull requests

2 participants