-
Notifications
You must be signed in to change notification settings - Fork 78
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
Node js deprecation warning coming along with sf org login command #2570
Comments
Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support. |
Node 19 is not supported (by node) so we don't support it either. Can you repro this on a supported node version (currently 18, 20, 21?) |
@mshanemc hi mate, I tried every version including latest. What I am saying is problem is not with my node image. The problem is inside sf login cli command. I have a lot of touch commans and file writing in my yml. It is working perfectly without any warning. But, it gives warning only for login command. That means, there is something wrong inside sf login command. |
I'm able to run the command without seeing the error. Can you provide a way to replicate the issue that doesn't involve using your CI or node19? |
Script without sf org login commandfunction test_script() {
} Output$ test_script Script with sf org login commandfunction test_script() {
} Output$ test_script |
So, it is clear that the internal logic of sf org login command turned to be incompatible with node version I am using. Would you please tell me the version you have used for testing? |
We support latest and LTS, and that's what we test with. So that's currently 18, 20, 21 |
@mshanemc Yes, understood. But I have issue only when calling sf login command. So, the problem is inside that command. right? I have issue only when I am calling that method. Changing version to satisfy this command will create problem in other areas. I have started using stable ver 19.9 to get rid of some file handling command issues. |
Now that warning has gone automatically :D |
Got resolved automatically |
@shabu74 do you mind sharing what made it go away, in case others get it? |
It has gone yesterday and came back again :( It is intermittent :( |
@shabu74 you can set this env var |
I did it. It gave detailed trace for other warning. But no change for this. It displays the same. :( |
@shabu74 but did you get the original warning? You mentioned it's intermitent, with that env var, node will only print the stacktrace if the warning is emitted |
This issue has not received a response in 7 days. It will auto-close in 7 days unless a response is posted. |
@cristiand391 it did not make any difference. I am still getting this warning. |
This issue has not received a response in 7 days. It will auto-close in 7 days unless a response is posted. |
No one can explain it? It's a pain! :( |
@shabu74 going through node docs again, it seems there's https://nodejs.org/api/cli.html#--trace-deprecation try setting |
Tried all. No change observed. Getting the same message @cristiand391 |
This issue has not received a response in 7 days. It will auto-close in 7 days unless a response is posted. |
closing, not reproducible on supported node versions. |
I am seeing this issue in my builds. I recently upgraded our docker image from This action also bumped our sf cli version from The command that seems to be triggering the warning is: echo node version: $(node --version)
echo sf cli version: $(sf --version)
sf org login jwt -i $JWT_CLIENT_ID -f jwt-temp/decoded.key -o $HUB_ORG_USERNAME -d -a HubOrg The resulting logs are:
(I've been wrestling with this for a couple days, so |
I'm seeing this issue in Node 20 today (not using Node myself, but as part of sf cli), earlier it used to work fine, possibly due to update in sf cli.
|
Yea. But this guys closed this issue. Ridiculous! If they don’t have a solution, they will close it. That's the solution 😁😁 |
Will closing this ticket solve the issue? @mshanemc |
But this looks like just a warning, maybe it's failing for me due to authentication issue. But yeah, it will create issues in future once this is removed in future Node version, so needs a solution. |
Someone could open an issue that's reproducible on a supported node version @shabu74. Most comments on closed issues don't get monitored. |
Summary
I am using sf org login sfdx-url command in my gitlab yml script. For a couple of days I am getting a node js deprecation warning along with that command. (node:280) [DEP0137] DeprecationWarning: Closing a FileHandle object on garbage collection is deprecated. Please close FileHandle objects explicitly using FileHandle.prototype.close(). In the future, an error will be thrown if a file descriptor is closed during garbage collection.
Steps To Reproduce
Expected result
Successful authentication with out any warning
Actual result
(node:280) [DEP0137] DeprecationWarning: Closing a FileHandle object on garbage collection is deprecated. Please close FileHandle objects explicitly using FileHandle.prototype.close(). In the future, an error will be thrown if a file descriptor is closed during garbage collection.
System Information
{
"architecture": "linux-x64",
"cliVersion": "@salesforce/cli/2.16.10",
"nodeVersion": "node-v19.9.0",
"osVersion": "Linux 5.15.0-1049-aws",
"rootPath": "/usr/local/lib/node_modules/@salesforce/cli",
"shell": "bash",
"pluginVersions": [
"@oclif/plugin-autocomplete 3.0.1 (core)",
"@oclif/plugin-commands 3.0.5 (core)",
"@oclif/plugin-help 6.0.5 (core)",
"@oclif/plugin-not-found 3.0.2 (core)",
"@oclif/plugin-plugins 4.1.4 (core)",
"@oclif/plugin-search 1.0.5 (core)",
"@oclif/plugin-update 4.1.3 (core)",
"@oclif/plugin-version 2.0.4 (core)",
"@oclif/plugin-warn-if-update-available 3.0.2 (core)",
"@oclif/plugin-which 3.0.7 (core)",
"@salesforce/cli 2.16.10 (core)",
"apex 2.3.20 (core)",
"auth 2.8.25 (core)",
"data 2.6.1 (core)",
"deploy-retrieve 1.19.3 (core)",
"info 2.6.51 (core)",
"limits 2.3.41 (core)",
"login 1.2.40 (core)",
"marketplace 0.3.2 (core)",
"org 2.11.7 (core)",
"schema 2.3.32 (core)",
"settings 1.4.37 (core)",
"sobject 0.2.14 (core)",
"source 2.10.46 (core)",
"telemetry 2.3.8 (core)",
"templates 55.5.17 (core)",
"trust 3.0.2 (core)",
"user 2.3.41 (core)"
]
}
The text was updated successfully, but these errors were encountered: