CA
stormy-gold
Bug when using Apify.utils.requestAsBrowser: process seems to crash on timeout from the apify proxy
My client recently contacted me that their old apify actor does not work anymore. Upon changing the code to use the new node docker image and updating apify version a little bit everything seemed to resolve for me locally. But when on apify platform we started testing the actor with apify proxy turned on, from time to time we got the error attached in the screenshot. As I deduced, the issue seems to be coming from Apify.utils.requestAsBrowser -> http2-wrapper (source: https://github.com/szmarczak/http2-wrapper/issues/66). But I have got no idea on how to circumvent the error as we can not (?) simply use the inner libraries ๐
Relevant code snippet:
GitHub
Issues ยท szmarczak/http2-wrapper
Use HTTP/2 the same way like HTTP/1. Contribute to szmarczak/http2-wrapper development by creating an account on GitHub.

4 Replies
@Zyberg just advanced to level 3! Thanks for your contributions! ๐
http request might be blocked when you doing it from cloud or its just random timeout because of network. add
try-catch
along with few retriesstormy-goldOPโข3y ago
Well, we have a try catch around the http request. However, the actor still restarts. So, as per ideas from the linked github issue it seems that the whole process breaks.
Then you need to consider upgrade to recent SDK, otherwise fixing issue might require more efforts than SDK update.