I'm getting Error: Navigation Timeout Exceeded: 30000ms exceeded when running react-snap locally. It renders all the top-level pages as expected, and then when it hits the first detail-view URL it throws the error.
It wasn't doing this before and I haven't changed any code in the component, although the page itself is new, as new items have been added to the CMS and are now being pulled from the API. I have tried removing the offending item and running build again, but the same error happens when it gets to the first detail-view URL again (even though it's a different item).
Error log pasted below:
info it worked if it ends with ok
verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'build' ]
info using [email protected]
info using [email protected]
verbose run-script [ 'prebuild', 'build', 'postbuild' ]
info lifecycle [email protected]~prebuild: [email protected]
info lifecycle [email protected]~build: [email protected]
verbose lifecycle [email protected]~build: unsafe-perm in lifecycle true
verbose lifecycle [email protected]~build: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/dono023/Desktop/react-projects/magician-prod/node_modules/.bin:/Users/dono023/torch/install/bin:/Applications/anaconda2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/go/bin:/Users/you/torch/install/bin
verbose lifecycle [email protected]~build: CWD: /Users/dono023/Desktop/react-projects/magician-prod
silly lifecycle [email protected]~build: Args: [ '-c', 'react-scripts build' ]
silly lifecycle [email protected]~build: Returned: code: 0 signal: null
info lifecycle [email protected]~postbuild: [email protected]
verbose lifecycle [email protected]~postbuild: unsafe-perm in lifecycle true
verbose lifecycle [email protected]~postbuild: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/dono023/Desktop/react-projects/magician-prod/node_modules/.bin:/Users/dono023/torch/install/bin:/Applications/anaconda2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/go/bin:/Users/you/torch/install/bin
verbose lifecycle [email protected]~postbuild: CWD: /Users/dono023/Desktop/react-projects/magician-prod
silly lifecycle [email protected]~postbuild: Args: [ '-c', 'react-snap' ]
silly lifecycle [email protected]~postbuild: Returned: code: 1 signal: null
info lifecycle [email protected]~postbuild: Failed to exec postbuild script
verbose stack Error: [email protected] postbuild: `react-snap`
verbose stack Exit status 1
verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
verbose stack at emitTwo (events.js:126:13)
verbose stack at EventEmitter.emit (events.js:214:7)
verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
verbose stack at emitTwo (events.js:126:13)
verbose stack at ChildProcess.emit (events.js:214:7)
verbose stack at maybeClose (internal/child_process.js:925:16)
verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
verbose pkgid [email protected]
verbose cwd /Users/dono023/Desktop/react-projects/magician-prod
verbose Darwin 16.7.0
verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
verbose node v8.9.3
verbose npm v5.6.0
error code ELIFECYCLE
What version of react-snap do you use? If it is 1.11 can you try 1.10?
Rolling back to 1.10.0 seems to be solving this
In 1.11.0 I updated to the latest Puppeteer 1.0. I suspect they broke something
Having the same issue here, but with no effect when rolled back to 1.10.0. Any ideas?
@gopchi do you have some third-party resources? Can you try to create reproducible example? DId you tried rm -rf node_modules && yarn install?
@stereobooster doing what you said worked, but now in the postbuild process there is an error saying Unhandled Promise rejection... for some routes. Despite that it builds the routes and they work.
@gopchi can you copy/paste error message. It can happen that those notifications are from your application, not from react-snap
@stereobooster There it is:
ERROR: The process with PID 13328 (child process of PID 12024) could not be terminated.
Reason: The operation attempted is not supported.
(node:20400) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Command failed: taskkill /pid 12024 /T /F
(node:20400) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
It happens on different route every time I try to build. Sometimes they are all ok except the last one. Other times 4 of the routes get this error.
Using node v8.9.4
@gopchi this sounds like an issue in puppeteer and not the same as described in this ticket. You can try create reproducible demo and open ticket here or in puppeteer issue tracker. If you open ticket here I will try to investigate and eventually will open ticket in puppeteer issue tracker.
@stereobooster Okay, thanks I will open a new issue on this error.
Closed in favour of https://github.com/stereobooster/react-snap/issues/240
Most helpful comment
What version of
react-snapdo you use? If it is1.11can you try1.10?