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

PATH not updated, original length 1286 > 1024 #1500

Closed
AllanOricil opened this issue May 7, 2022 · 11 comments
Closed

PATH not updated, original length 1286 > 1024 #1500

AllanOricil opened this issue May 7, 2022 · 11 comments
Labels
investigating We're actively investigating this issue more information required Issue requires more information or a response from the customer

Comments

@AllanOricil
Copy link

AllanOricil commented May 7, 2022

Summary

I tried to install sfdx using the .exe and this error happened. I had to manually add the env prop to my path.

image

@AllanOricil AllanOricil added the investigating We're actively investigating this issue label May 7, 2022
@github-actions
Copy link

github-actions bot commented May 7, 2022

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.

@iowillhoit
Copy link
Contributor

Hey @AllanOricil, have you faced this issue before? It sounds to me that your PATH variable has grown over time and now is running up against this 1024 character check. Could you please review the paths/variables that are set on your PATH and remove any that are no longer needed? If you are able to shorten the set PATH, I don't think this will be an issue any longer. Let me know if that works! Thanks

@iowillhoit iowillhoit added the more information required Issue requires more information or a response from the customer label May 9, 2022
@AllanOricil
Copy link
Author

I actually added the sfdx binnary path into path without deleting any other entry. And this is why I thought this error message was weird. I don't think windows is limiting this update.

@iowillhoit
Copy link
Contributor

I did a little bit more digging on this. It is a limitation of the NSIS installation system itself. Oclif is doing a check for $PATH length to make sure that NSIS fails gracefully and doesn't get into a bad state.

It does look like NSIS has a special build that will allow for longer $PATH length but this is not likely something that we will invest dev time in at the moment. If we receive several more reports of this being a blocker, we can open an issue on oclif.

If this is a persistent problem for you, I would encourage you to audit your current $PATH and see if there is anything that is no longer being used. Thank you for creating this issue @AllanOricil, have a good one!

@matcaampos
Copy link

Hi everyone, I'm passing for this error and my vs code not recognize my sfdx, how to resolve this error? Which path i gave to audit?

@aspnerd
Copy link

aspnerd commented Dec 15, 2023

I'm having this same issue and it's a blocker for us

@AllanOricil
Copy link
Author

You have to edit the PATH env variable on your OS and remove some characters from it because it has a size limit. Just ask chatgpt "how to edit the PATH env variable on TYPE_OS_NAME ?"

@OmarGonD
Copy link

OmarGonD commented Jan 6, 2024

This is a problem, will make delete other variables, difficulting devlopers adoption.

@AllanOricil
Copy link
Author

The installer could show a link where the User can learn how to fix the issue

@AllanOricil AllanOricil mentioned this issue Mar 22, 2024
@KrzysztofB666
Copy link

This is still an ongoing issue, 3 years later - nothing fixed...

@AllanOricil
Copy link
Author

AllanOricil commented Dec 30, 2024

This issue could be mitigate but won't ever be fixed because there is no way to change the length of PATH

https://superuser.com/questions/387619/overcoming-the-1024-character-limit-with-setx

This issue is old and I don't think microsoft would ever change it

https://answers.microsoft.com/en-us/windows/forum/all/how-to-make-the-path-enviornment-variable-longer/fa1a19ad-4e66-446f-ad97-cc35fdcb8641

Because it is an issue that very few people will face, and that can be fixed easily by the end user, by manually editing their PATH, it is not worthy spending engineering time automating a fix that won't ever really fix the root cause.

The quickest, and cheapest, solution was making this github page indexed in Google so that these very few people could find it. You're welcome 😊

I usually open github issues with the error message so that it can help other people 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigating We're actively investigating this issue more information required Issue requires more information or a response from the customer
Projects
None yet
Development

No branches or pull requests

6 participants