SNOW-1659189: SDK throws error while connecting to Snowflake: Unhandled Rejection at Promise The "callback" argument must be of type function. Received undefined #909
Labels
bug
Something isn't working
Customer reported issue here: #907
What version of NodeJS driver are you using?
~1.10.0 in package.json
1.10.1 in package-lock.json
What operating system and processor architecture are you using?
Linux/amd64
What version of NodeJS are you using?
(node --version and npm --version)
v20.14.0
10.7.0
What are the component versions in the environment (npm list)?
[email protected]
Server version:* E.g. 1.90.1
n/a
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
Issue happening to a user. Hasn't been reproduced across team
You can inspect how we are using the client in our repo: https://github.com/lightdash/lightdash/blob/main/packages/warehouses/src/warehouseClients/SnowflakeWarehouseClient.ts
We get the error:
Unhandled Rejection at Promise The "callback" argument must be of type function. Received undefined at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at /usr/app/node_modules/snowflake-sdk/lib/http/base.js:47:19 at Object.callback (/usr/app/node_modules/snowflake-sdk/lib/services/sf.js:639:43) at Timeout.requestCallback (/usr/app/node_modules/snowflake-sdk/lib/services/sf.js:1148:23) at Object.callback (/usr/app/node_modules/snowflake-sdk/lib/connection/connection.js:177:26) at setInterval (node:timers:209:3) I looked into your code and looks like you are not passing the callback as an argument for self.heartbeat https://github.com/snowflakedb/snowflake-connector-nodejs/blame/master/lib/connection/connection.js#L179
Looks like this bug was introduced in this PR: #502
What did you expect to see?
What should have happened and what happened instead?
No error.
Customer is working on producing logs for this error
The text was updated successfully, but these errors were encountered: