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

fix: remove tryCancel call from inside event handler #68

Merged
merged 1 commit into from
Mar 14, 2022

Conversation

B4nan
Copy link
Member

@B4nan B4nan commented Mar 14, 2022

This fixes following error:

2022-03-05T07:00:59.212Z   Error: handlePageFunction timed out after 120 seconds.
2022-03-05T07:00:59.213Z       at Timeout._onTimeout (/home/myuser/node_modules/@apify/timeout/index.js:84:74)
2022-03-05T07:00:59.214Z       at listOnTimeout (node:internal/timers:559:17)
2022-03-05T07:00:59.216Z       at processTimers (node:internal/timers:502:7)
2022-03-05T07:00:59.547Z /home/myuser/node_modules/@apify/timeout/index.js:44
2022-03-05T07:00:59.548Z         throw new InternalTimeoutError('Promise handler has been canceled due to a timeout');
2022-03-05T07:00:59.550Z               ^
2022-03-05T07:00:59.551Z
2022-03-05T07:00:59.553Z InternalTimeoutError: Promise handler has been canceled due to a timeout
2022-03-05T07:00:59.554Z     at tryCancel (/home/myuser/node_modules/@apify/timeout/index.js:44:15)
2022-03-05T07:00:59.556Z     at /home/myuser/node_modules/browser-pool/dist/puppeteer/puppeteer-controller.js:48:41
2022-03-05T07:00:59.557Z     at runMicrotasks (<anonymous>)
2022-03-05T07:00:59.558Z     at processTicksAndRejections (node:internal/process/task_queues:96:5)

This fixes following error:

```
2022-03-05T07:00:59.212Z   Error: handlePageFunction timed out after 120 seconds.
2022-03-05T07:00:59.213Z       at Timeout._onTimeout (/home/myuser/node_modules/@apify/timeout/index.js:84:74)
2022-03-05T07:00:59.214Z       at listOnTimeout (node:internal/timers:559:17)
2022-03-05T07:00:59.216Z       at processTimers (node:internal/timers:502:7)
2022-03-05T07:00:59.547Z /home/myuser/node_modules/@apify/timeout/index.js:44
2022-03-05T07:00:59.548Z         throw new InternalTimeoutError('Promise handler has been canceled due to a timeout');
2022-03-05T07:00:59.550Z               ^
2022-03-05T07:00:59.551Z
2022-03-05T07:00:59.553Z InternalTimeoutError: Promise handler has been canceled due to a timeout
2022-03-05T07:00:59.554Z     at tryCancel (/home/myuser/node_modules/@apify/timeout/index.js:44:15)
2022-03-05T07:00:59.556Z     at /home/myuser/node_modules/browser-pool/dist/puppeteer/puppeteer-controller.js:48:41
2022-03-05T07:00:59.557Z     at runMicrotasks (<anonymous>)
2022-03-05T07:00:59.558Z     at processTicksAndRejections (node:internal/process/task_queues:96:5)
```
@B4nan B4nan merged commit fecfce8 into master Mar 14, 2022
@B4nan B4nan deleted the fix-timeout-hard-failure branch March 14, 2022 10:26
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

Successfully merging this pull request may close these issues.

None yet

1 participant