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-964826: Callback failed with TypeError: Cannot read properties of undefined (reading 'slice') #694

Closed
sfc-gh-selee opened this issue Nov 8, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@sfc-gh-selee
Copy link

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.9.0

  2. What operating system and processor architecture are you using?
    OS X x86_64

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

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

dependencies:
snowflake-sdk 1.9.0
└── axios 0.26.1

5.Server version:* E.g. 1.90.1
You may get the server version by running a query:

SELECT CURRENT_VERSION();
  1. What did you do?

Upgraded from 1.7.0

The query failing is SHOW LISTINGS IN DATA EXCHANGE ...

  1. What did you expect to see?

No error

What should have happened and what happened instead?

axios is giving back a response containing an array instead of string, and this conversion to rows fails

https://github.com/snowflakedb/snowflake-connector-nodejs/blame/645faebbfaad3a85da35943e613103d7a01cac99/lib/connection/result/chunk.js#L134

  1. Can you set logging to DEBUG and collect the logs?
{"level":"TRACE","message":"[7:05:35.469 PM]: CALL GET with timeout 90000: https://<REDACTED>/results/01b03299-0000-9dff-0001-5503005631ae_0/main/data_1?x-amz-server-side-encryption-customer-algorithm=AES256&response-content-encoding=gzip&x-amz-security-token=<REDACTED>"}
{"level":"DEBUG","message":"[7:05:35.471 PM]: OCSP validation disabled for <REDACTED>"}
{"level":"TRACE","message":"[7:05:35.641 PM]: Response headers are: {\"x-amz-id-2\":\"REDACTED\",\"x-amz-request-id\":\"REDACTED\",\"date\":\"Wed, 08 Nov 2023 19:05:36 GMT\",\"last-modified\":\"Wed, 08 Nov 2023 19:05:36 GMT\",\"etag\":\"\\\"27306363006e325727bd9996900c0860\\\"\",\"x-amz-server-side-encryption-customer-algorithm\":\"AES256\",\"x-amz-server-side-encryption-customer-key-md5\":\"REDACTED\",\"accept-ranges\":\"bytes\",\"content-type\":\"application/octet-stream\",\"s"}
{"level":"ERROR","message":"[7:05:35.642 PM]: Callback failed with TypeError: Cannot read properties of undefined (reading 'slice')"}
  1. What is your Snowflake account identifier, if any? (Optional)
@sfc-gh-selee sfc-gh-selee added the bug Something isn't working label Nov 8, 2023
@github-actions github-actions bot changed the title Callback failed with TypeError: Cannot read properties of undefined (reading 'slice') SNOW-964826: Callback failed with TypeError: Cannot read properties of undefined (reading 'slice') Nov 8, 2023
@sfc-gh-selee
Copy link
Author

This issue might be because of axios version mismatch

@sfc-gh-selee
Copy link
Author

Confirmed this is fixed by upgrading axios

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