Skip to content
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

SNOW-1659189: SDK throws error while connecting to Snowflake: Unhandled Rejection at Promise The "callback" argument must be of type function. Received undefined #909

Closed
sfc-gh-thanchard opened this issue Sep 10, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@sfc-gh-thanchard
Copy link

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

@sfc-gh-thanchard sfc-gh-thanchard added the bug Something isn't working label Sep 10, 2024
@github-actions github-actions bot changed the title SDK throws error while connecting to Snowflake: Unhandled Rejection at Promise The "callback" argument must be of type function. Received undefined SNOW-1659189: SDK throws error while connecting to Snowflake: Unhandled Rejection at Promise The "callback" argument must be of type function. Received undefined Sep 10, 2024
@sfc-gh-thanchard sfc-gh-thanchard closed this as not planned Won't fix, can't repro, duplicate, stale Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant