SAP / node-hdb

SAP HANA Database Client for Node
Apache License 2.0
317 stars 97 forks source link

Missing `cb` parameter in `Connection.js` #228

Closed swaldmann closed 6 months ago

swaldmann commented 6 months ago

Hi colleagues,

Some of our CAP stakeholders are moving to from @sap/hana-client to hdb for their HDI deployments (via the @sap/hdi-deploy package).

They are currently getting this error with hdb:

TypeError: cb is not a function
    at Connection.enqueue (/home/vcap/app/node_modules/hdb/lib/protocol/Connection.js:404:12)
    at Connection.execute (/home/vcap/app/node_modules/hdb/lib/protocol/Connection.js:599:8)
    at Statement._execute (/home/vcap/app/node_modules/hdb/lib/protocol/Statement.js:148:20)
    at Statement.exec (/home/vcap/app/node_modules/hdb/lib/protocol/Statement.js:46:39)
    at Timeout._onTimeout (/home/vcap/app/node_modules/@sap/hdi-deploy/lib/make.js:114:45)
    at listOnTimeout (node:internal/timers:569:17)
    at process.processTimers (node:internal/timers:512:7)

It seems that in https://github.com/SAP/node-hdb/blob/76ca7f352a6ae639f64f032e0e65ba3ec72d3518/lib/protocol/Connection.js#L599 the cb parameter isn't passed correctly. Therefore it's undefined in https://github.com/SAP/node-hdb/blob/76ca7f352a6ae639f64f032e0e65ba3ec72d3518/lib/protocol/Connection.js#L404 Can you have a look?

Best regards, Steffen

oklemenz2 commented 6 months ago

We validated it with a patched version of hdb and it works, when cb is passed as second argument. Can you please provide a fix asap?

IanMcCurdy commented 6 months ago

A fix has been provided and version 0.19.8 will be released shortly. Thanks!