lucamug/elm-starter

Netlify get TimeoutError if the page has animations

lucamug opened this issue · 0 comments

If the page subscribed to animationFrame, Netlify goes in timeout.

The workaround is not to generate static pages specifing urls = []:

conf : Starter.ConfMain.Conf
conf =
    { urls = []
    , assetsToCache = []
    }

I tried adding args: ['--headless'] as suggested in some post:

const browser = await puppeteer.launch( conf.headless ? { headless: true, args: ['--headless'] } : { headless: false } );

This solve the issue in my local machine but not on Netlify. Need more investigation.

This is the complete error:

5:19:57 PM: [1] TimeoutError: Navigation timeout of 30000 ms exceeded
5:19:57 PM: [1]     at /opt/build/repo/node_modules/puppeteer/lib/LifecycleWatcher.js:100:111
5:19:57 PM: [1]   -- ASYNC --
5:19:57 PM: [1]     at Frame.<anonymous> (/opt/build/repo/node_modules/puppeteer/lib/helper.js:116:19)
5:19:57 PM: [1]     at Page.goto (/opt/build/repo/node_modules/puppeteer/lib/Page.js:553:53)
5:19:57 PM: [1]     at Page.<anonymous> (/opt/build/repo/node_modules/puppeteer/lib/helper.js:117:27)
5:19:57 PM: [1]     at processUrl (/opt/build/repo/src-elm-starter/starter.js:303:16)
5:19:57 PM: [1]     at processTicksAndRejections (internal/process/task_queues.js:97:5)
5:19:57 PM: [1]     at async Promise.all (index 0)
5:19:57 PM: [1]     at async /opt/build/repo/src-elm-starter/starter.js:290:28
5:19:57 PM: [1]     at async generateStaticPages (/opt/build/repo/src-elm-starter/starter.js:286:9)
5:20:37 PM: Canceling deploy
5:20:38 PM: [0] internal/bootstrap/switches/does_own_process_state.js:128
5:20:38 PM: [0]   cachedCwd = rawMethods.cwd();
5:20:38 PM: [0]                          ^
5:20:38 PM: [0]
5:20:38 PM: [0] Error: ENOENT: no such file or directory, uv_cwd
5:20:38 PM: [0]     at process.wrappedCwd [as cwd] (internal/bootstrap/switches/does_own_process_state.js:128:26)
5:20:38 PM: [0]     at Object.resolve (path.js:978:47)
5:20:38 PM: [0]     at FSWatcher.handleEvent (/opt/build/repo/node_modules/chokidar/lib/nodefs-handler.js:59:17)
5:20:38 PM: [0]     at FSWatcher.emit (events.js:315:20)
5:20:38 PM: [0]     at FSEvent.FSWatcher._handle.onchange (internal/fs/watchers.js:135:12) {
5:20:38 PM: [0]   errno: -2,
5:20:38 PM: [0]   code: 'ENOENT',
5:20:38 PM: [0]   syscall: 'uv_cwd'
5:20:38 PM: [0] }