-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assertion Error when serving static files with Express #244
Comments
This seems to be a bug. May I ask you to reproduce the issue with server running with |
Thank you for reporting this. |
Not sure how much information is needed but I just grabbed as much as I could. |
+1 if keep refreshing the browser. I am using koa. |
@motss thank you for that gist. May I ask you to grab all information from the start? It should be enough to run it in Thank you! |
@erictsangx yeah, I think it is definitely caused by this somehow... |
@motss nevermind, I know what's causing this. |
Should be fixed now, please run |
Unfortunately, I am using v3.2.0, but the problem still occurs: debug('hit maximum remove id=%d', this.list[0].id);
this.list.shift().remove();
-> this.parent.removeChild(this);
-> var index = utils.binarySearch(this.children.list, child, compareChildren); It is still caused by returning |
@erictsangx what about |
|
@erictsangx may I ask you to run it with |
@erictsangx It's fixed for my case. Thanks a lot! |
@indutny I am using a for loop generating ...
res.end(html);
if (res.push) {
for (let key of pushMapping.keys()) {
let stream = res.push(key, {
request: {
accept: '*/*'
},
response: {
'content-type': 'application/javascript'
}
});
stream.end(pushMapping.get(key));
}
}
... |
@erictsangx May I know how to push files while user is requesting |
@motss A example from the documentation: spdy.createServer(options, function(req, res) {
var stream = res.push('/main.js', {
request: {
accept: '*/*'
},
response: {
'content-type': 'application/javascript'
}
});
stream.on('error', function() {
});
stream.end('alert("hello from push stream!");'); //main.js content (You can use fs to read js files)
res.end('<script src="/main.js"></script>'); //index.html content
}).listen(3000); |
Have same issue. spdy:priority add node=195 parent=0 weight=256 exclusive=1 +36ms { AssertionError: false == true Happens when I press f5 several times quickly ( I use push ). |
Seems that the later issue is also described at: Let's follow up there. |
Just use the below package. "spdy": "https://github.com/deveshmehta7/node-spdy#assertionError", |
Have same problem, server crash periodically when reload page... GET /static/css/app.a1b9783855251f1ac0b945889157e0e8.css 304 2.073 ms - - throw new errors.AssertionError({
|
Can it serve static files coupled with Express 4?
I encountered Assertion Error when refreshing the page. However no such issue when using Node's own HTTPS.
require('https')
=> serving static files without any issues.require('spdy')
=> AssertionError.The text was updated successfully, but these errors were encountered: