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
Start a new project, add mssql as dependency and query a (big enough) table; like so: SELECT * from .
const pool = await sql.connect(sqlConfig)
const query = `SELECT * from ${process.env.MSSQL_TABLE}`
const result = await pool.query(query)
console.log(result.recordset.length)
If the table has enough content (in my case only about a 1000 rows) I always encounter the following problem. The problem does not occur when using node.
error: Partially Length-prefixed Bytes unmatched lengths : expected 30, but got 352 bytes
at [...]/node_modules/tedious/lib/value-parser.js:659:17
at readPLPStream ([...]/node_modules/tedious/lib/value-parser.js:750:23)
at [...]/node_modules/tedious/lib/token/row-token-parser.js:12:348
654 | parser.position += chunkLength;
655 | currentLength += chunkLength;
656 | }
657 | if (expectedLength !== UNKNOWN_PLP_LEN) {
658 | if (currentLength !== Number(expectedLength)) {
659 | throw new Error('Partially Length-prefixed Bytes unmatched lengths : expected ' + expectedLength + ', but got ' + currentLength + ' bytes');
^
error: Partially Length-prefixed Bytes unmatched lengths : expected 836, but got 161 bytes
at [...]/node_modules/tedious/lib/value-parser.js:659:17
at readPLPStream ([...]/node_modules/tedious/lib/value-parser.js:750:23)
at [...]/node_modules/tedious/lib/token/row-token-parser.js:12:348
What is the expected behavior?
No error should occur.
What do you see instead?
An error message: error: Partially Length-prefixed Bytes unmatched lengths : expected 836, but got 161 bytes
Additional information
Node version: v22.9.0
The text was updated successfully, but these errors were encountered:
I also ran into this. There is no way to determine if this error happens so it makes it pretty much impossible to use MS SQL with bun. :/
Considering that this is a problem with reading streams over the net, could this also be related to #14249?
I also ran into this. The most annoying part is that once this error happens it crashes server instance. Looks like I have made quite of a mistake by swapping out underlying runtime without evaluating its compatibility with MS SQL. 🙈
What version of Bun is running?
1.1.29+6d43b3662
What platform is your computer?
Darwin 24.0.0 arm64 arm
What steps can reproduce the bug?
Start a new project, add mssql as dependency and query a (big enough) table; like so: SELECT * from .
If the table has enough content (in my case only about a 1000 rows) I always encounter the following problem. The problem does not occur when using node.
error: Partially Length-prefixed Bytes unmatched lengths : expected 30, but got 352 bytes
at [...]/node_modules/tedious/lib/value-parser.js:659:17
at readPLPStream ([...]/node_modules/tedious/lib/value-parser.js:750:23)
at [...]/node_modules/tedious/lib/token/row-token-parser.js:12:348
654 | parser.position += chunkLength;
655 | currentLength += chunkLength;
656 | }
657 | if (expectedLength !== UNKNOWN_PLP_LEN) {
658 | if (currentLength !== Number(expectedLength)) {
659 | throw new Error('Partially Length-prefixed Bytes unmatched lengths : expected ' + expectedLength + ', but got ' + currentLength + ' bytes');
^
error: Partially Length-prefixed Bytes unmatched lengths : expected 836, but got 161 bytes
at [...]/node_modules/tedious/lib/value-parser.js:659:17
at readPLPStream ([...]/node_modules/tedious/lib/value-parser.js:750:23)
at [...]/node_modules/tedious/lib/token/row-token-parser.js:12:348
What is the expected behavior?
No error should occur.
What do you see instead?
An error message: error: Partially Length-prefixed Bytes unmatched lengths : expected 836, but got 161 bytes
Additional information
Node version: v22.9.0
The text was updated successfully, but these errors were encountered: