stereobooster / react-snap

👻 Zero-configuration framework-agnostic static prerendering for SPAs
MIT License
5.04k stars 389 forks source link

TimeoutError: Navigation Timeout Exceeded: 30000ms exceeded #541

Open Lazy-C0der opened 2 years ago

Lazy-C0der commented 2 years ago

client@0.1.0 postbuild D:\OfficiaL\blog\client react-snap

?? error at / TimeoutError: Navigation Timeout Exceeded: 30000ms exceeded at D:\OfficiaL\blog\client\node_modules\puppeteer\lib\LifecycleWatcher.js:142:21 -- ASYNC -- at Frame. (D:\OfficiaL\blog\client\node_modules\puppeteer\lib\helper.js:111:15) at Page.goto (D:\OfficiaL\blog\client\node_modules\puppeteer\lib\Page.js:674:49) at Page. (D:\OfficiaL\blog\client\node_modules\puppeteer\lib\helper.js:112:23) at fetchPage (D:\OfficiaL\blog\client\node_modules\react-snap\src\puppeteer_utils.js:232:22) at processTicksAndRejections (internal/process/task_queues.js:95:5)

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! client@0.1.0 postbuild: react-snap npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the client@0.1.0 postbuild script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Admin\AppData\Roaming\npm-cache_logs\2021-08-21T21_02_16_602Z-debug.log

this one is updated version still not working

vishishttiwari commented 2 years ago

Exactly the same problem. Any solution?

sushmavoleti commented 2 years ago

Same problem. Ay solution? I'm using react-snap 1.23.0

igorilyichyov commented 2 years ago

Same problem. react-snap 1.23.0

joshephan commented 2 years ago

Same problem on react-snap 1.23.0.

I'd checked before thread, this problem is related to firebase and puppeteer.

My case downgrade react-snap 1.10.0 works well.

dominiczy commented 2 years ago

I was able to fix this by setting Puppeteer options to "waitUntil": "networkidle2"

harrymelka commented 2 years ago
Screenshot 2022-03-09 at 18 03 15

Go to LifecycleWatcher.js inside node modules, _createTimeoutPromise functions line 137 and just add

return new Promise(() => {});

With that you are removing the timeout.

it should work, it's going to take more time to do it but it's working.

NateBaldwinDesign commented 1 year ago

Same issue, none of the above methods worked for me.

stistoyanov commented 10 months ago

Just add puppeteer.timeout with a greater value wich works for you and also skipThirdPartyRequests in reactSnap:

"scripts": { ... "postbuild": "react-snap" }, "reactSnap": { "skipThirdPartyRequests": true, "puppeteer": { "timeout": 90000 }, "puppeteerArgs": ["--no-sandbox", "--disable-setuid-sandbox"] },

diohsu-mrliving commented 10 months ago
Screenshot 2022-03-09 at 18 03 15

Go to LifecycleWatcher.js inside node modules, _createTimeoutPromise functions line 137 and just add

return new Promise(() => {});

With that you are removing the timeout.

it should work, it's going to take more time to do it but it's working.

It works to me. thanks!

loganknecht commented 6 months ago

I am experiencing this issue as well, and the above solutions did not work.

smuchara commented 2 months ago

for future refrences hope y'all found a solution but on my end degraded to version @1.10.0

npm install react-snap@1.10.0 --save-dev

this what worked for me