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

Deploy/Retrieve: [salesforce.salesforcedx-vscode-core]msg.socket.cork is not a function #5025

Closed
RenaudAM opened this issue Aug 10, 2023 · 22 comments

Comments

@RenaudAM
Copy link

Summary

Since few days, it is no more possible to deploy or retrieve from org in VS Code. I can see the following error in Developer Tools:
[salesforce.salesforcedx-vscode-core]msg.socket.cork is not a function

Steps To Reproduce:

  1. Try to Deploy/Retrieve a metadata

Expected result

Metadata deployed/retrieved

Actual result

Nothing happens
Following error in Developer Tools
[salesforce.salesforcedx-vscode-core]msg.socket.cork is not a function

Additional information

image

Salesforce Extension Version in VS Code:
v58.9.1

SFDX CLI Version:
@salesforce/cli/2.3.8 win32-x64 node-v18.15.0

OS and version:
Windows 10 Entreprise 21H2

@daphne-sfdc
Copy link
Contributor

Hi @RenaudAM,
This looks like a setup issue with Node. Can you try running "npm update" and retest?

@RenaudAM
Copy link
Author

Hi @daphne-sfdc
I already try to update, then uninstall and reinstall Node…but still the same issue. Also try from different location (to avoid proxy at the office, for example).
I can retry an update…if it doesn’t work I will check my setup. It started just after the update to the last version, this is why I open this case but maybe there is another change at the same time on my computer.

@RenaudAM
Copy link
Author

@daphne-sfdc
Another information, CLI is working fine, I can deploy using sf commands in a terminal. Only action launch by VS Code menu failed.

@Shelby997
Copy link

Shelby997 commented Aug 16, 2023 via email

@RenaudAM
Copy link
Author

@daphne-sfdc
I retry to update npm, uninstall, reinstall ... still the issue...

@Shelby997
I don't understand your message.

@RenaudAM
Copy link
Author

@daphne-sfdc
New information:
As I use the CLI installer to install Salesforce CLI, I don't need Node, so I completely remove Node from my computer ... and still have the same issue...
I'm very confuse, don't know from where it could come.

@peternhale
Copy link
Contributor

@RenaudAM are you still experiencing this issue?

@RenaudAM
Copy link
Author

Hello,

Yes, but it seems to be related to Visual Studio CORE.
I downgrade to 1.80.2 and it works.
I try the last update but still encounter the issue.

Regards
Renaud.

@peternhale
Copy link
Contributor

@RenaudAM thank you. Would you provide the steps you used to downgrade to 1.80.2? Just so I understand the steps.

@RenaudAM
Copy link
Author

By uninstalling VS code, downloading the 1.80.2 version and installing it.

@RenaudAM
Copy link
Author

RenaudAM commented Nov 2, 2023

Hello

Any update on this issue?
I try this morning to download the 1.84 but still the issue.

@mingxuanzhangsfdx
Copy link
Member

Hi @RenaudAM -

Could you try these steps to make a clean state of the extension and see -

  1. Open up a new Terminal window and type cd .vscode/extensions
  2. Delete all the previous versions of the Salesforce extensions by running rm -rf salesforce.salesforcedx-vscode* (or equivalent command in windows)
  3. Reinstall the Salesforce extensions.
  4. Clean your cache by deleting the .sfdx and .sf folders from your project, then running "Developer: Reload Window" from the command palette.
  5. Try to reauthorize your org.

@RenaudAM
Copy link
Author

RenaudAM commented Nov 7, 2023

Hi @mingxuanzhangsfdx

Still the same issue
image

@RenaudAM
Copy link
Author

RenaudAM commented Nov 7, 2023

More information:

I try to install everything on a clean computer ... it seems to works.
So I try to remove everything from mine (VSCode, Extensions, Salesforce CLI) and redo a fresh install... now the Salesforce plugin doesn't start. I should have something bad on my computer, but I don't know what.

@RenaudAM
Copy link
Author

RenaudAM commented Nov 7, 2023

New update:

I reinstall VSCode 1.80.2 (just that, without changing anything else) and works fine again.
I install the update to the last version (proposed when I launch VSCode), go back to my first issue (msg.socket.cork is not a function)
This is totally ridiculous... I don't know what to do ... and Apex Language Server need at least VSCode 1.82, so it doesn't work when I downgrade in 1.80 ... So I have to chose between being able to retrieve/deploy or ApexLS.

@mingxuanzhangsfdx
Copy link
Member

Hi @RenaudAM -

We just made changes to downgrade the dependency of ApexLS so it will be working in version ^1.67.0 of VS Code. It will effect in this week's release (Wednesday or Thursday). I hope this could be a temporary workaround for your situation.

@RenaudAM
Copy link
Author

RenaudAM commented Nov 7, 2023

Ah Thanks !!! This is a good news for Apex LS.

But I would like to be able to update VSCode when there is a new release...and I don't know what to do.
Do you know the dependencies that could cause an issue? When I try to reinstall, I remove VSCode and Salesforce CLI, delete the remaining folders in my home directory and in %LOCALAPPDATA%. Is there anything else to delete in order to do a complete cleanup?

@mingxuanzhangsfdx
Copy link
Member

mingxuanzhangsfdx commented Nov 7, 2023

Hi @RenaudAM ,

I think the above cleanup is enough based on previous issues. Could you also provide the output by going to Output tab and selecting Salesforce CLI from the dropdown?

output

@RenaudAM
Copy link
Author

RenaudAM commented Nov 7, 2023

Update:

I retry the cleanup but this time I keep an empty settings file ... and it works.
So I reactivate them one by one until it failed ... and the one causing the issue is
"http.proxySupport": "on"
I don't understand why but when I activate it if doesn't work and works fine when I remove this line.
When I try on another computer I use the same settings file, so with this setting on, and it works fine, so very strange.

But now, everything seems to work fine, with the latest version.

To answer you question, there was nothing in the output when it didn't work, just the
Starting SFDX: Retrieve Source from Org
Then, nothing and nothing in the console of the Developer Tools.

I will try to work with that until the end of the week and will close the issue if it works fine.

Thanks for the support.

@mingxuanzhangsfdx
Copy link
Member

Hi @RenaudAM ,

Thanks for the update! Glad you work this out!

@CristiCanizales
Copy link
Contributor

Hi @RenaudAM, I'm closing this based on your last comment. Feel free to reopen and reach out if you start facing it again. Thanks!

@debprotim
Copy link

@RenaudAM you are a rockstar, I have been suffering from this issue from last 3 months. It took me some time to reach to this case and your resolution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants