eastern-cyan•15mo ago
TargetClosedError: Target page, context or browser has been closed (I've tried a lot)
Hello,
I've tried a lot to resolve this issue, from changing memory, concurrency, to requests per minute - I can't seem to understand why this randomly happens. I can't tell if I'm missing an await anywhere. More importantly, I'm not sure how to access context with currently crawlee lib, ie: https://docs.apify.com/academy/node-js/how_to_fix_target-closed
Any guidance would be most helpful. My concern is we're already looking to offload our crawlers to the Apify platform (already testing), so we want to make this work first in our own environment.
Currently on
"crawlee": "3.9.2"
Code for reference attached.4 Replies
Hi! Please upgrade to crawlee 3.9.3 then add more logs to find out when exactly page closed, i.e. might be inside "while (!isEndReached)" loop.
eastern-cyanOP•15mo ago
ok thanks, I'll try this
I guess, it's better to upgrade to crawlee's latest (3.10) version.
AFAIK, it's some bug related to old versions. Always use / update to latest, if You can)
eastern-cyanOP•14mo ago
thanks