salesforcedx-vscode icon indicating copy to clipboard operation
salesforcedx-vscode copied to clipboard

Error deploying or retrieving source: The file or directory that you tried to deploy or retrieve isn't in a package directory that's specified in your sfdx-project.json

Open ChuckJonas opened this issue 1 year ago • 3 comments

Summary

I setup a project, pulled metadata down using the "Org Explorer". When I attempt to retrieve, deploy, etc any individual file, I get this error.

Steps To Reproduce:

  1. create new project
  2. Pull down an Apex class using org explorer (or manifest)
  3. Open class
  4. Right click -> Retrieve Source from org

Expected result

The command should execute successfully.

Actual result

Error deploying or retrieving source: The file or directory that you tried to deploy or retrieve isn't in a package directory that's specified in your sfdx-project.json

Additional information

I'm guessing it has something to do with the paths of the machine (it's a virtual desktop with network drives), but the error message doesn't provide details as to what paths it's receiving.

Commands against manifest still seem to work.

Salesforce Extension Version in VS Code: 59.17.0

SFDX CLI Version: 2.28.6

OS and version: Windows 10 Enterprise

VS Code version: 1.86.2

ChuckJonas avatar Feb 16 '24 00:02 ChuckJonas

Definitely has to do with the VM drive... I modified the extension to actually log the path when this error occurs and I get something like this:

c:\SnapVolumesTemp\MountPoints\{6338b562-0000-0000-0000-100000000000}\{097ae86a-2c82-4ec6-924e-ed3da382c010}\SVROOT\Users\cjonas\Documents\project\force-app\main\default\objects\Account\fields\Branch_Fax_Number__c.field-meta.xml

when it should be expecting this:

c:\users\cjonas\Documents\project\force-app\main\default\objects\Account\fields\Branch_Fax_Number__c.field-meta.xml

I don't understand why these commands are getting this "raw" path, as other vscode commands have no problem getting the mapped path.

ChuckJonas avatar Feb 16 '24 01:02 ChuckJonas

@ChuckJonas Thank you for bringing this to our attention. AFAIK I do not believe VM mapped drives are not supported. I will however log a bug and discuss with the team.

peternhale avatar Feb 19 '24 13:02 peternhale

This issue has been linked to a new work item: W-15071711

git2gus[bot] avatar Feb 19 '24 13:02 git2gus[bot]

Hi @ChuckJonas , are you still seeing the issue with the latest version? We fixed the same error due to a mapped folder (symbolic link) back in March.

mingxuanzhangsfdx avatar May 20 '24 18:05 mingxuanzhangsfdx

@ChuckJonas , this issue should have been fixed. Please give this a try and reopen if you still see this with our latest version. Thank you for reporting this issue!

diyer avatar May 21 '24 18:05 diyer