-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
src\node_buffer.cc:173: Assertion `arg->IsNumber()' failed. #23668
Comments
Could you provide a sample code that reproduces that? |
Better bet is see updns code. @beoz module.exports.updnsMiddleware = (app, handlers) => {
app.on('error', error => {
console.log(error)
})
app.on('listening', server => {
console.log('DNS service has started')
})
app.on('message', (domain, send, proxy) => {
let osuDomains = [
'android.bugly.qq.com'
]
console.log(domain)
if(osuDomains.indexOf(domain.toString()) > -1){
handlers.getIp(null, (osuIp, mirrorIp) => {
console.log('sending' + osuIp)
send(osuIp)
})
} else {
proxy('1.1.1.1') // Other traffics
}
})
}
let app=updns.createServer(53)
updnsMiddleware(app) |
Yeah, a repro without using Buffer.alloc(1).copy(Buffer.alloc(1), 'err') |
@bzoz Thanks for your comment! However, I think that shouldn't Native error, but a syntax error. :) |
Thanks @addaleax !! |
2555cb4 introduced a crash when a non-number value was passed to `ParseArrayIndex()`. We do not always have JS typechecking for that in place, though. This returns back to the previous behavior of coercing values to integers, which is certainly questionable. Refs: nodejs#22129 Fixes: nodejs#23668
It's unclear to me if this has been fixed or not. Should this remain open? |
It's not fixed. Please do not close it, I'm working on it. EDIT: On second though, Rafael's comment below seems to indicate that he is working on it. |
There's also #23840. |
2555cb4 introduced a crash when a non-number value was passed to `ParseArrayIndex()`. We do not always have JS typechecking for that in place, though. This returns back to the previous behavior of coercing values to integers, which is certainly questionable. Refs: nodejs#22129 Fixes: nodejs#23668
2555cb4 introduced a crash when a non-number value was passed to `ParseArrayIndex()`. We do not always have JS typechecking for that in place, though. This returns back to the previous behavior of coercing values to integers, which is certainly questionable. Refs: #22129 Fixes: #23668 PR-URL: #25154 Reviewed-By: James M Snell <[email protected]>
2555cb4 introduced a crash when a non-number value was passed to `ParseArrayIndex()`. We do not always have JS typechecking for that in place, though. This returns back to the previous behavior of coercing values to integers, which is certainly questionable. Refs: nodejs#22129 Fixes: nodejs#23668 PR-URL: nodejs#25154 Reviewed-By: James M Snell <[email protected]>
Version: v11.0.0-nightly20181007061e09891c
Platform:
Subsystem:
I tried to use updns npm module, but this error happens.
But It isn't module bugs, because It works correctly on Node v8.
Also It's native error, so I don't have any idea other than bugs.
If It isn't bug, tell me how to fix it. Thanks!
The text was updated successfully, but these errors were encountered: