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

"no elements in sequence" and "TimeoutError: Timed out after waiting 30000ms" from executing waitForNetworkIdle() #84

Open
iwaduarte opened this issue Jan 13, 2025 · 0 comments

Comments

@iwaduarte
Copy link

I have been encountering this error for the past two months.

I have a while loop, and sometimes when I execute it

    await jobPage
      .waitForNetworkIdle({ idleTime: 800 })
      .catch((err) => console.log("Idle timeout", err));

It does not respect the idleTime and gives the error:

   
    timeout TimeoutError: Timed out after waiting 30000ms
    at file:///mnt/c/Users/iwadu/Desktop/my-git/applier/node_modules/rebrowser-puppeteer-core/lib/esm/puppeteer/common/util.js:237:19
    at file:///mnt/c/Users/iwadu/Desktop/my-git/applier/node_modules/rebrowser-puppeteer-core/lib/esm/third_party/rxjs/rxjs.js:1936:31
    at OperatorSubscriber2._this._next (file:///mnt/c/Users/iwadu/Desktop/my-git/applier/node_modules/rebrowser-puppeteer-core/lib/esm/third_party/rxjs/rxjs.js:993:9)
    at Subscriber2.next (file:///mnt/c/Users/iwadu/Desktop/my-git/applier/node_modules/rebrowser-puppeteer-core/lib/esm/third_party/rxjs/rxjs.js:696:12)
    at AsyncAction2.<anonymous> (file:///mnt/c/Users/iwadu/Desktop/my-git/applier/node_modules/rebrowser-puppeteer-core/lib/esm/third_party/rxjs/rxjs.js:2280:20)
    at AsyncAction2._execute (file:///mnt/c/Users/iwadu/Desktop/my-git/applier/node_modules/rebrowser-puppeteer-core/lib/esm/third_party/rxjs/rxjs.js:1360:12)
    at AsyncAction2.execute (file:///mnt/c/Users/iwadu/Desktop/my-git/applier/node_modules/rebrowser-puppeteer-core/lib/esm/third_party/rxjs/rxjs.js:1349:22)
    at AsyncScheduler2.flush (file:///mnt/c/Users/iwadu/Desktop/my-git/applier/node_modules/rebrowser-puppeteer-core/lib/esm/third_party/rxjs/rxjs.js:1427:26)
    at listOnTimeout (node:internal/timers:573:17)
    at process.processTimers (node:internal/timers:514:7) {
  [cause]: undefined

and if I catch the function above and try executing the waitForNetworkIdle again I get

Error
    at _super (file:///mnt/c/Users/iwadu/Desktop/my-git/applier/node_modules/rebrowser-puppeteer-core/lib/esm/third_party/rxjs/rxjs.js:422:22)
    at new EmptyErrorImpl (file:///mnt/c/Users/iwadu/Desktop/my-git/applier/node_modules/rebrowser-puppeteer-core/lib/esm/third_party/rxjs/rxjs.js:1873:5)
    at Object.complete (file:///mnt/c/Users/iwadu/Desktop/my-git/applier/node_modules/rebrowser-puppeteer-core/lib/esm/third_party/rxjs/rxjs.js:1918:18)
    at ConsumerObserver2.complete (file:///mnt/c/Users/iwadu/Desktop/my-git/applier/node_modules/rebrowser-puppeteer-core/lib/esm/third_party/rxjs/rxjs.js:775:25)
    at Subscriber2._complete (file:///mnt/c/Users/iwadu/Desktop/my-git/applier/node_modules/rebrowser-puppeteer-core/lib/esm/third_party/rxjs/rxjs.js:734:24)
    at Subscriber2.complete (file:///mnt/c/Users/iwadu/Desktop/my-git/applier/node_modules/rebrowser-puppeteer-core/lib/esm/third_party/rxjs/rxjs.js:712:12)
    at Subscriber2._complete (file:///mnt/c/Users/iwadu/Desktop/my-git/applier/node_modules/rebrowser-puppeteer-core/lib/esm/third_party/rxjs/rxjs.js:734:24)
    at Subscriber2.complete (file:///mnt/c/Users/iwadu/Desktop/my-git/applier/node_modules/rebrowser-puppeteer-core/lib/esm/third_party/rxjs/rxjs.js:712:12)
    at Subscriber2._complete (file:///mnt/c/Users/iwadu/Desktop/my-git/applier/node_modules/rebrowser-puppeteer-core/lib/esm/third_party/rxjs/rxjs.js:734:24)
    at Subscriber2.complete (file:///mnt/c/Users/iwadu/Desktop/my-git/applier/node_modules/rebrowser-puppeteer-core/lib/esm/third_party/rxjs/rxjs.js:712:12) {
  message: 'no elements in sequence'
}

Sometimes the code randomly gives the no elements in sequence. I did not find anything here in issues related to that error. What should I do? I am using "rebrowser-puppeteer-core": "^23.10.3"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant