question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TimeoutError: waiting for function failed: timeout 30000ms exceeded

See original GitHub issue

Opa, blz?

Antes de mais nada, parabéns pelo pacote, muito legal! Já consegui fazer o uso normal dos serviços, inclusive já obtive dados de uma carteira minha e de alguns amigos, porém, 1 amigo em específico está dando o seguinte erro:

Logging at CEI… Selecting institution 3 - XP INVESTIMENTOS CCTVM S/A (3) TimeoutError: waiting for function failed: timeout 30000ms exceeded at new WaitTask (/home/src/node_modules/puppeteer/lib/DOMWorld.js:549:28) at DOMWorld.waitForFunction (/home/src/node_modules/puppeteer/lib/DOMWorld.js:454:12) at Frame.waitForFunction (/home/src/node_modules/puppeteer/lib/FrameManager.js:657:28) at Page.waitForFunction (/home/src/node_modules/puppeteer/lib/Page.js:1141:29) at Function.getStockHistory (/home/src/app/lib/StockHistoryCrawler.js:103:24) at processTicksAndRejections (internal/process/task_queues.js:97:5) at async CeiCrawler.getStockHistory (/home/src/app/lib/CeiCrawler.js:111:16) at async /home/src/app/cei-process-new.js:50:36

Tentei dar uma olhada no que poderia ser, mas não encontrei nada que pudesse resolver. As options que estou utilizando:

            const ceiCrawlerOptions = {
                puppeteerLaunch: {
                    headless: true,
                    timeout: 0,
                    args: ['--no-sandbox']
                },
                trace: true,
                capEndDate: true
            };

O erro acontece na chamada de: let stockHistory = await ceiCrawler.getStockHistory();

Agradeço desde já qualquer ajuda, Abraço

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:21 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
Menighincommented, Aug 11, 2020

Pois é… Vou fechar a issue mas ela ta sempre no radar… Se aparecerem mais usuários reclamando desse comportamento a gente pode ver de endereçar ela… Se por um acaso seu amigo conseguir contatar a B3 e resolver tb, deixa o caminho das pedras aqui hehe

Valeuzão!

2reactions
Menighincommented, Aug 8, 2020

@matheusdalzot a opção navigationTimeout foi adicionada na versão 0.3.0… Se nao me engano vcs estavam utilizando uma versao mais antiga, n?

@damicothiago na verdade parece que temos um problema maior entao 😕 Eu ja to pegando a conta a partir daquela label. Só que esse erro aí, Cannot read rows of null, é porque o crawler nao esta encontrando a tabela de dividendos na pagina. To achando que o seletor dela é diferente quando a opcao Todos esta selecionada D: Tu consegue checar pra mim?

Em contas “normais” o seletor das páginas são esses: Dividendos: .responsive tbody Negociações: #ctl00_ContentPlaceHolder1_rptAgenteBolsa_ctl00_rptContaBolsa_ctl00_pnAtivosNegociados table tbody Carteira:

  • Ações: #ctl00_ContentPlaceHolder1_rptAgenteContaMercado_ctl00_rptContaMercado_ctl00_rprCarteira_ctl00_grdCarteira tbody
  • Tesouro direto: #ctl00_ContentPlaceHolder1_rptAgenteContaMercado_ctl00_rptContaMercado_ctl00_trBodyTesouroDireto tbody

Pelo jeito, nesse caso do seu amigo, esse seletor de negociacoes nao existe… =s

Edit: Pode ser tb que ele tenha uma corretora sem negociacao. Vi aqui que o código desse crawler nao tava null-safe. Subi mais um commit, ve se agora vai

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is Puppeteer failing simple tests with: "waiting for function ...
The weird thing is that your default timeout isn't 30 seconds as the package's default, check that. However, to fix your issue: await...
Read more >
TimeoutError: waiting for function failed: timeout 30000ms ...
I have checked and am using the latest version of the library. Current Behavior. After update to latest Open-WA version (4.20.8) and enable ......
Read more >
How to solve Puppeteer TimeoutError: Navigation timeout of ...
How to solve Puppeteer TimeoutError: Navigation timeout of 30000 ms exceeded ... (specifically the TimeoutError) after a page takes more than 30000ms (30 ......
Read more >
Puppeteer timeout | Make videos programmatically in React
TimeoutError : waiting for function failed: timeout 30000ms exceeded ... Puppeteer will wait to make a screenshot, but aborts it after 30 seconds...
Read more >
Fix: navigation timeout of 30000 ms exceeded in puppeteer?
In this video, I am going to show you how we can fix navigation timeout of 30000 ms exceeded in puppeteer.You will generally...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found