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-1658878: Unhandled Rejection at Promise The "callback" argument must be of type function. Received undefined #907

Closed
ZeRego opened this issue Sep 10, 2024 · 3 comments · Fixed by #908
Labels
bug Something isn't working status-fixed_awaiting_release The issue has been fixed, its PR merged, and now awaiting the next release cycle of the connector. status-triage_done Initial triage done, will be further handled by the driver team

Comments

@ZeRego
Copy link
Contributor

ZeRego commented Sep 10, 2024

Please answer these questions before submitting your issue.
In order to accurately debug the issue this information is required. Thanks!

  1. What version of NodeJS driver are you using?

~1.10.0 in package.json
1.10.1 in package-lock.json

  1. What operating system and processor architecture are you using?

linux/amd64

  1. What version of NodeJS are you using?
    (node --version and npm --version)

v20.14.0
10.7.0

  1. What are the component versions in the environment (npm list)?

[email protected]

  1. Server version:* E.g. 1.90.1

n/a

  1. What did you do?

    If possible, provide a recipe for reproducing the error.
    A complete runnable program is good.

Issue happening to a user. Haven't been able to reproduce with our credentials.

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

  1. What did you expect to see?

    What should have happened and what happened instead?

No error.

  1. Can you set logging to DEBUG and collect the logs?

Will provide later

@ZeRego ZeRego added the bug Something isn't working label Sep 10, 2024
@github-actions github-actions bot changed the title Unhandled Rejection at Promise The "callback" argument must be of type function. Received undefined SNOW-1658878: Unhandled Rejection at Promise The "callback" argument must be of type function. Received undefined Sep 10, 2024
@sfc-gh-dszmolka
Copy link
Collaborator

sfc-gh-dszmolka commented Sep 11, 2024

hello and thank you for reporting this issue and also the PR proposal ! i see you also reported this issue in case 00843932 - which was absolutely the right thing to do if this issue is urgent to you.

To avoid duplicated efforts, please work with your support engineer assigned to the support case you raised. I'm now marking this ticket as closed.

@sfc-gh-dszmolka sfc-gh-dszmolka self-assigned this Sep 11, 2024
@sfc-gh-dszmolka sfc-gh-dszmolka added the status-triage_done Initial triage done, will be further handled by the driver team label Sep 11, 2024
@sfc-gh-dszmolka
Copy link
Collaborator

reopening to properly keep track with release cycle

@sfc-gh-dszmolka sfc-gh-dszmolka removed their assignment Sep 23, 2024
@sfc-gh-dszmolka sfc-gh-dszmolka added the status-fixed_awaiting_release The issue has been fixed, its PR merged, and now awaiting the next release cycle of the connector. label Sep 23, 2024
@sfc-gh-dszmolka
Copy link
Collaborator

released with Snowflake Node.js driver version 1.14.0 in September 2024 release cycle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working status-fixed_awaiting_release The issue has been fixed, its PR merged, and now awaiting the next release cycle of the connector. status-triage_done Initial triage done, will be further handled by the driver team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants