-
Notifications
You must be signed in to change notification settings - Fork 133
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-1299307: Refused to set unsafe header on v1.9.0+ #817
Comments
hi and thank you for submitting this issue. We don't see this error on node.js, for which framework this driver is intended and against which we test. Given this is an error coming from |
Hi, |
having a minimal viable repro would be massively appreciated; especially if it really happens with 'just node' too. I was under the impression this comes from a browser situation especially now mentioning Electron, but if not, then it's possibly quite impactful. Thank you for the repro in advance ! 👍 |
Try this repo: https://github.com/cimd/snowflake-demo Just run:
|
thank you - will check it out now. In the meantime, maybe it could be a good idea to sanitize the code and remove any possible sensitive info like username, account, etc. |
Hummm... From the error, it seems that Electron's pre-load script wasn't loaded. Did you run |
as suggested in this comment, was using actually , a modified version,
as it doesn't allow to be run as root. |
I can see you've found Quasar's Electron configuration page. But it looks like you're still running as a root user. |
sadly , as mentioned in the above comment, no change in the error message even when running as a non-root user
so without a working repro, for an issue which happens outside of the framework for which we claim support, I'm not really sure how to proceed. Besides perhaps directly filing this I'll try to run this in a non-containerized environment to see if it makes a difference. |
Okay, running the repro on a 'fat' and Windows host allowed me to see the issue (amongst other, more serious issues like CORS ..) It looks like related to Electron and a quick search in axios bugs pointed me to this (closed, but still unfixed) axios bug where the commenter describes the exact situation you're in. As mentioned initially, not much we can do from snowflake-sdk, especially considering
A possible solution for you particularly, if this Hope this helps. |
marking this issue as closed for now per the above |
Please answer these questions before submitting your issue.
In order to accurately debug the issue this information is required. Thanks!
What version of NodeJS driver are you using?
18.20.0
What operating system and processor architecture are you using?
Windows 11 intel x64
What version of NodeJS are you using?
(
node --version
andnpm --version
)node 18.20.0
npm 10.5.0
What are the component versions in the environment (
npm list
)?5.Server version:* E.g. 1.90.1
This error exists for any versions including and above v1.9.0
Connecting to snowflake using 'EXTERNALBROWSER'.
Connected successfully. But starting from v1.9.0, when Axios was bumped to v1.6.0, there is an error when trying to set the user-agent header.
Can you set logging to DEBUG and collect the logs?
https://community.snowflake.com/s/article/How-to-generate-log-file-on-Snowflake-connectors
e.g
Add this to get standard output.
The text was updated successfully, but these errors were encountered: