Puppeteer browser hanged on newPage() on Web App Service (Linux with Node 14)

KristieChan-0030 1 Reputation point
2021-06-23T02:56:57.317+00:00

I have published a node.js to Web App Service (Linux with Node 14) that using puppeteer browser to download pdf.
Originally, I used await puppeteer.launch({ headless: true }); (Code is below) but encountered chromium problem.
Then I use await puppeteer.connect({ browserWSEndpoint: 'wss://chrome.browserless.io/' }).
It works in the beginning but hanged on browser.newPage() after idle and no new trace awhile.
I have tried to turn on the Always on option in Configuration but still no luck.

Are there any clues to solve this problem?
Thanks!

Code
108329-image.png

108422-image.png

Before
108411-image.png
After Idle
108412-image.png

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,953 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. brtrach-MSFT 17,736 Reputation points Microsoft Employee Moderator
    2021-06-25T04:03:18.97+00:00

    @KristieChan-0030 we are sorry to hear you're encountering this issue.

    Could you please check the diagnose and solve blade of your web app? From there, click "availability and performance issues" and then "http server errors"

    Can you share if there are any http errors and their status and sub status code?

    We look forward to your reply.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.