-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Buffer.writeInt32LE() does throws value of out range error #29041
Comments
The |
@mscdex If I call writeInt32LE() even without noAssert I still see the same error: D:\gTools\node\node-v12.8.0-win-x86>node.exe
Welcome to Node.js v12.8.0.
Type ".help" for more information.
> var data = new Buffer(70);
undefined
> (node:3472) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
data.writeUInt32LE(33639248);
4
> data.writeUInt16LE(10, 4);
6
> data.writeUInt16LE(10, 6);
8
> data.writeUInt16LE(0, 8);
10
> data.writeUInt16LE(0, 10);
12
> data.writeUInt32LE(1325687893, 12);
16
> data.writeInt32LE(2728251391, 16);
Thrown:
RangeError [ERR_OUT_OF_RANGE]: The value of "value" is out of range. It must be >= -2147483648 and <= 2147483647. Received 2728251391
at checkInt (internal/buffer.js:58:11)
at writeU_Int32LE (internal/buffer.js:678:3)
at Buffer.writeInt32LE (internal/buffer.js:847:10)
at repl:1:6
at Script.runInThisContext (vm.js:126:20)
at REPLServer.defaultEval (repl.js:384:29)
at bound (domain.js:420:14)
at REPLServer.runBound [as eval] (domain.js:433:12)
at REPLServer.onLine (repl.js:700:10)
at REPLServer.emit (events.js:208:15) |
@imaynotbereal Option |
Correct, because the default value for |
node/lib/internal/validators.js Line 81 in fc4e413
|
I am using protractor for testing AngularJS based web application. I recently upgraded node from v6.9.2 to V12.8.0 and I am experiencing issue while calling protractor's ElementFinder.sendKeys().
I managed to create below snippet to reproduce the issue:
However when the same code is executed on Node 6.9.2, it works fine.
The same issue is found on node V10.15.3 and on
Linux machine: Linux dory 4.1.12-124.28.1.el7uek.x86_64 #2 SMP Mon Jun 3 14:09:53 PDT 2019 x86_64 x86_64 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: