page.goto()上的云函数超时
问题描述:
我在云功能中使用伪造者运行测试.
如果我在本地计算机上运行测试,一切都很好.如果我在云功能仿真器中运行测试也可以.但是,当我将功能部署到云中时,所有测试都停留在page.goto('https://...')
并且功能因超时而失败,在我的情况下为3分钟.
I run tests with puppeteer in cloud functions.
If I run test on local machine all is fine. If I run tests in cloud functions emulator it's fine as well. But when I deploy my function to the cloud all tests stuck onpage.goto('https://...')
and function fails by timeout, which in my case is 3 minutes.
答
问题出在木偶戏中.我从1.13.0降级到1.11.0,现在一切正常.请参见此处
The problem was in puppeteer. I downgraded from the version 1.13.0 to 1.11.0 and now everything works fine. See the discussion here