peterbe/minimalcss

Getting TimeoutError: Navigation timeout of 30000 ms exceeded

nubranch opened this issue · 6 comments

Hi,

I'm getting this error for one page on a website. Other pages seem ok, so not sure what is specific about this page that is causing the error.

The page in questions is:
https://nubranch.ca/web-design-aurora/

I thought maybe it was the Google Maps embed, but other pages like Contact page seems ok. I tried increasing the timeout value, it still timesout. Setting timeout to 0 resulted with the process not finishing at all!

I was going to try testing with the minimalcss.app but the app seems down right now?

thanks
Hani

Could just be because of the JS error.
Screen Shot 2021-04-21 at 12 18 13 PM

But that error resolves almost instantly when running on the command line. I don't know why it takes 30 seconds to timeout when you use the demo site.

I kinda figured it out. The option that causes a Timeout is if you don't set withoutjavascript=false in the options. The minimalcss-server doesn't do that.
So that means that the minimalcss-server, by default, will try to load the page twice. Once with JavaScript disabled and then once with it enabled.

I'm not sure where to begin but I think how the minimalcss-server and minimalcss is implemented is bad. The default options should be shared and only the overrides specifically to minimalcss-server should override.

I think the sickness might be inside minimalcss in that if you don't supply the key to the option you get a different default.

Would you be willing and able to help me clean this stuff up?

There's 3 ways to start minimalcss:

  1. the CLI: ./bin/minimalcss.js
  2. the minimalcss-server
  3. programmatically in Node

(technically, the minimalcss-server is just the same as programmatically calling it in Node)

These should be sharing the same sane defaults. Not specifying an option should mean it picks the default option.

peterbe/minimalcss-server#51 solves this problem.
I still think there's something stinky about how default options are shared between the server and the CLI.

Hi Peter. That was fast! So the problem was minimalcss-server not defaulting to "withoutjavascript" being false and it had to be specified explicitly?

I'm assuming the fix in the new version assumes "withoutjavascript" is false, unless stated otherwise?

cheers and thanks for the quick fix!

Yep. Working on a new deployment now.
Mind you, the minimalcss-server is just meant to be a sample application of the minimalcss Node package.