You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But I found the same problem here addyosmani/critical#240 and then I updated grunt-critical from 0.3.0 to 1.1.0 , which uses penthouse with Chrome headless, instead of PhantomJS.
But never mind is it grunt-critical 0.3.0 or 1.1.0, very rarely and randomly I am getting the following error:
1st error:
Unhandled rejection Error: socket hang up
at createHangUpError (_http_client.js:330:15)
at TLSSocket.socketOnEnd (_http_client.js:423:23)
at emitNone (events.js:120:20)
at TLSSocket.emit (events.js:218:7)
at endReadableNT (_stream_readable.js:1054:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
The worst thing is this error appears randomly, say on 9 of 10 times it's ok, and 1 of 10 it could fail. All run options and parameters are similar, so I even don't have any idea...
2nd error:
Running "critical:debug" (critical) task
Unhandled rejection Error: Wrong status code 502 for https://example.com/some-css.css
at Request.request [as _callback] (/node_modules/critical/lib/file-helper.js:146:31)
at Request.self.callback (/node_modules/request/request.js:188:22)
at emitTwo (events.js:135:13)
at Request.emit (events.js:224:7)
at Request. (/node_modules/request/request.js:1171:10)
at emitOne (events.js:125:13)
at Request.emit (events.js:221:7)
at IncomingMessage. (/node_modules/request/request.js:1091:12)
at Object.onceWrapper (events.js:322:30)
at emitNone (events.js:120:20)
at IncomingMessage.emit (events.js:218:7)
at endReadableNT (_stream_readable.js:1054:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
So, question: is there any way to handle these Unhandled errors?
Thank you.
The text was updated successfully, but these errors were encountered:
@shervud: sorry for the late response. This error seems like a problem with the server and not with critical itself. Can you verify that this error doesn't occur without critical?
Hello, everyone.
For example I have url "https://www.cleanandclear.com.vn".
Node version is 9.0.0
npm version 3.8.6
grunt 0.4.5
My config is:
grunt.config('critical', {
debug: {
options: {
base: './',
timeout: 60000,
penthouse: { "strict": false, "renderWaitTime": 5000, "blockJSRequests": false, "pageLoadSkipTimeout": 20000 },
width: 1920,
height: 1920,
pathPrefix: ""
},
src: "https://www.cleanandclear.com.vn/",
dest: "my-critical.css"
}
});
I used grunt-critical 0.3.0 and always got the following error:
But I found the same problem here addyosmani/critical#240 and then I updated grunt-critical from 0.3.0 to 1.1.0 , which uses penthouse with Chrome headless, instead of PhantomJS.
But never mind is it grunt-critical 0.3.0 or 1.1.0, very rarely and randomly I am getting the following error:
1st error:
The worst thing is this error appears randomly, say on 9 of 10 times it's ok, and 1 of 10 it could fail. All run options and parameters are similar, so I even don't have any idea...
2nd error:
So, question: is there any way to handle these Unhandled errors?
Thank you.
The text was updated successfully, but these errors were encountered: