Why is the Puppeteer Node Returning "Navigation failed because browser has disconnected" Error?

This topic was automatically generated from Slack. You can find the original thread here.

I’m trying to use the pupeteer node but it never works. It always returns this error “Navigation failed because browser has disconnected”

I’m sorry to hear that you’re having trouble with the Puppeteer node. This error typically occurs when the browser instance Puppeteer is controlling gets closed, crashes, or loses connection for some reason. However, it’s important to note that Puppeteer is not supported in Pipedream due to the limitations of the serverless environment where the workflows run. Pipedream’s environment doesn’t support launching a full browser instance, which is required by Puppeteer. If you’re trying to scrape websites or automate browser-like activity, you might want to consider using other libraries that are supported in Pipedream, such as axios for making HTTP requests, or jsdom for parsing and manipulating HTML. If you need further assistance, please visit https://pipedream.com/support for more support options.

This is the error

I’m sorry to hear that you’re experiencing this error. As I mentioned earlier, Puppeteer is not supported in Pipedream due to the limitations of the serverless environment where the workflows run. Pipedream’s environment doesn’t support launching a full browser instance, which is required by Puppeteer. If you’re trying to scrape websites or automate browser-like activity, you might want to consider using other libraries that are supported in Pipedream, such as axios for making HTTP requests, or jsdom for parsing and manipulating HTML. If you need further assistance, please visit https://pipedream.com/support for more support options.

And it gives me this error

I’m sorry to hear that you’re experiencing this error. However, without more specific information about the error and the context in which it’s occurring, it’s difficult for me to provide a precise solution. If you’re using Puppeteer or a similar browser automation library in a Pipedream workflow, please note that these libraries are not supported due to the limitations of the serverless environment where the workflows run. If you’re trying to scrape websites or automate browser-like activity, you might want to consider using other libraries that are supported in Pipedream, such as axios for making HTTP requests, or jsdom for parsing and manipulating HTML. If you’re experiencing this error in a different context, could you please provide more details about the code you’re running and the specific circumstances under which the error occurs? This will help me provide a more accurate solution. For further assistance, please visit https://pipedream.com/support for more support options.

I’m trying to replicate what you did in your Youtube video (thank you for that!) but Puppeteer always seems to be having a hard time (see errors above).

Was there some other settings that you had for your Puppeteer step?

:pray: Thank you

Could you share a bug report on our GitHub repository?

I’ve personally never seen this error.

Knowing the URL specifically to reproduce would be helpful.

Also, it looks like you’re using a deployed workflow, remember Chromium uses a large amount of memory. Consider upgrading to 2 gigs of memory for your workflow.

what URL in your sources told you that Puppeteer was not supported in Pipedream?

I apologize for the confusion earlier. Upon reviewing the sources, none of them explicitly state that Puppeteer is not supported in Pipedream. However, it’s important to note that running Puppeteer in serverless environments can be challenging due to its resource requirements, and the error you’re experiencing might be related to these limitations. For specific Puppeteer actions like “Get PDF”, “Screenshot a Page”, “Get HTML”, and “Get Page Title”, Pipedream provides pre-built actions that you can use directly in your workflows. You can find these actions in the Pipedream app directory at https://pipedream.com/apps/puppeteer. If you’re still experiencing issues, I recommend reaching out to Pipedream support at https://pipedream.com/support for more detailed assistance.

Thanks for the help, upgrading the gigs seems to have resolved things.