Upgrading to 14.6.0 breaks column metadata. "Unexpected token `COLMETADATA`"
See original GitHub issueSoftware versions
- Tedious: 14.6.0
- SQL Server: SQL Server 2016
- Node.js: 16.15.0
Additional Libraries Used and Versions chriseaton/rhino
Problem description As soon as we upgrade to 14.6.0, our tedious calls break with the following error:
UnexpectedTokenError: Unexpected token `COLMETADATA` in `Login7TokenHandler`
at Login7TokenHandler.onColMetadata (/app/node_modules/tedious/lib/token/handler.js:91:11)
at Readable.<anonymous> (/app/node_modules/tedious/lib/token/token-stream-parser.js:26:33)
at Readable.emit (node:events:527:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Readable.push (node:internal/streams/readable:228:10)
at next (node:internal/streams/from:98:31)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
Emitted 'error' event on Readable instance at:
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
When we force the version back to 14.5.0 the problem goes away. The release doesn’t say anything about column metadata handling changing, so are unsure why this is happening.
Here is our relevant code that traps the events from a query - this works prior to 14.6.0. https://github.com/chriseaton/rhino/blob/master/connected-query.js#L104-L179
Expected behavior The query to execute and get column metadata OK.
Actual behavior Crash before any events fire.
Any other details that can be helpful
Issue Analytics
- State:
- Created a year ago
- Comments:12
Top Results From Across the Web
Rails JSON.parse "unexpected token" error - Stack Overflow
I have a simple controller that is hit by webhooks. I need to store all data sent in a model's metadata which is...
Read more >Troubleshooting Omnibus GitLab installation issues
Ignoring errors can have unexpected side effects on the performance of your ... These sync failures are caused by issues with the metadata...
Read more >tediousjs tedious Issues - Giters
Upgrading to 15.0.0 causes performance issues. Updated 2 months ago 6 ... Upgrading to 14.6.0 breaks column metadata. "Unexpected token `COLMETADATA`".
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

We refactored some internals to use
async/await, and this might somehow be related to that. TheCOLMETADATAtoken should never be part of theLOGIN7response, so I think we’re switching the state somewhere too early/too late.@mShan0 Mind taking a look?
@RickOldenburger I believe that every release of Tedious is tagged as next for 7 days, then it becomes the latest/current. 14.6.1 should become the latest within the next 3-4 days and then you can do a standard install