Closed zfrench closed 2 weeks ago
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.
I'm created a field set on a custom object and was able to retrieve it:
➜ dreamhouse-lwc git:(main) ✗ sf -v
@salesforce/cli/2.44.8 darwin-x64 node-v20.10.0
Could you run the command with the --dev-debug
flag and share the debug logs? could something with your project or maybe git-bash.
@cristiand391 Below is the partial output of the debug logs. I had to remove the file name directory and file references. I am actually seeing a new error now and the file fieldset is generated but produces the error message below.
Error (1): Metadata API request failed: Could not find HEAD.
dev-debug output: [11:26:29.630] (sf:core:config): Created 'sf:core:config' child logger instance [11:26:29.630] (sf): Setup child 'sf:core:config' logger instance [11:26:31.227] (sf:variants): Created 'sf:variants' child logger instance [11:26:31.228] (sf): Setup child 'sf:variants' logger instance [11:26:31.229] (sf:SfProjectJson): Created 'sf:SfProjectJson' child logger instance [11:26:31.229] (sf): Setup child 'sf:SfProjectJson' logger instance [11:26:31.229] DEBUG (sf:SfProjectJson): Reading config file: C:\Users\USER_ID\VSCode\project\sfdx-project.json [11:26:32.040] (sf:variants): Created 'sf:variants' child logger instance [11:26:32.040] (sf): Setup child 'sf:variants' logger instance [11:26:32.470] (sf:Config): Created 'sf:Config' child logger instance [11:26:32.471] (sf): Setup child 'sf:Config' logger instance [11:26:32.472] (sf:Config): Created 'sf:Config' child logger instance [11:26:32.472] (sf): Setup child 'sf:Config' logger instance [11:26:32.472] DEBUG (sf:Config): Reading config file: C:\Users\USER_ID.sf\config.json because hasRead is false [11:26:32.476] DEBUG (sf:Config): Reading config file: C:\Users\USER_ID\VSCode\project.sf\config.json because hasRead is false [11:26:32.531] (sf:OrgAccessor): Created 'sf:OrgAccessor' child logger instance [11:26:32.531] (sf): Setup child 'sf:OrgAccessor' logger instance [11:26:32.543] (sf:SandboxAccessor): Created 'sf:SandboxAccessor' child logger instance [11:26:32.543] (sf): Setup child 'sf:SandboxAccessor' logger instance [11:26:32.545] (sf:Org): Created 'sf:Org' child logger instance [11:26:32.545] (sf): Setup child 'sf:Org' logger instance [11:26:32.556] (sf:AuthInfoConfig): Created 'sf:AuthInfoConfig' child logger instance [11:26:32.557] (sf): Setup child 'sf:AuthInfoConfig' logger instance [11:26:32.557] (sf:keyChain): Created 'sf:keyChain' child logger instance [11:26:32.557] (sf): Setup child 'sf:keyChain' logger instance [11:26:32.557] DEBUG (sf:keyChain): platform: win32 [11:26:32.561] (sf:crypto): Created 'sf:crypto' child logger instance [11:26:32.561] (sf): Setup child 'sf:crypto' logger instance [11:26:32.561] DEBUG (sf:crypto): Using v1 crypto [11:26:32.561] (sf:Lifecycle): Created 'sf:Lifecycle' child logger instance [11:26:32.561] (sf): Setup child 'sf:Lifecycle' logger instance [11:26:32.561] DEBUG (sf:Lifecycle): A lifecycle event with the name telemetry does not exist. An event must be registered before it can be emitted. [11:26:32.562] DEBUG (sf:AuthInfoConfig): Reading config file: C:\Users\USER_ID.sfdx\sandbox_username.json because hasRead is false [11:26:32.565] (sf:AuthInfo): Created 'sf:AuthInfo' child logger instance [11:26:32.565] (sf): Setup child 'sf:AuthInfo' logger instance [11:26:32.579] INFO (sf:AuthInfo): Returning fields for a connection using OAuth config. [11:26:32.580] (sf:connection): Created 'sf:connection' child logger instance [11:26:32.580] (sf): Setup child 'sf:connection' logger instance [11:26:32.585] DEBUG (sf:connection): API version cache last checked on 6/3/2024, 9:17:52 AM (now is 6/3/2024, 11:26:32 AM) [11:26:32.585] DEBUG (sf:connection): Using cached API version: 61.0 [11:26:32.585] DEBUG (sf:connection): Connection created with apiVersion 61.0 [11:26:32.586] (sf:Org): Created 'sf:Org' child logger instance [11:26:32.586] (sf): Setup child 'sf:Org' logger instance [11:26:32.596] (sf:AuthInfoConfig): Created 'sf:AuthInfoConfig' child logger instance [11:26:32.596] (sf): Setup child 'sf:AuthInfoConfig' logger instance [11:26:32.596] (sf:keyChain): Created 'sf:keyChain' child logger instance [11:26:32.596] (sf): Setup child 'sf:keyChain' logger instance [11:26:32.596] DEBUG (sf:keyChain): platform: win32 [11:26:32.597] DEBUG (sf:AuthInfoConfig): Reading config file: C:\Users\USER_ID.sfdx\sandbox_username.json because hasRead is false [11:26:32.599] (sf:AuthInfo): Created 'sf:AuthInfo' child logger instance [11:26:32.599] (sf): Setup child 'sf:AuthInfo' logger instance [11:26:32.610] INFO (sf:AuthInfo): Returning fields for a connection using OAuth config. [11:26:32.610] (sf:connection): Created 'sf:connection' child logger instance [11:26:32.610] (sf): Setup child 'sf:connection' logger instance [11:26:32.610] DEBUG (sf:connection): API version cache last checked on 6/3/2024, 9:17:52 AM (now is 6/3/2024, 11:26:32 AM) [11:26:32.610] DEBUG (sf:connection): Using cached API version: 61.0 [11:26:32.610] DEBUG (sf:connection): Connection created with apiVersion 61.0 [11:26:32.614] DEBUG (sf:Lifecycle): lifecycle events with the name prerun have now been registered. When this event is emitted all 2 listeners will fire. [11:26:32.614] DEBUG (sf:Lifecycle): lifecycle events with the name init have now been registered. When this event is emitted all 2 listeners will fire. [11:26:32.614] DEBUG (sf:Lifecycle): 3 lifecycle events with the name init have now been registered. When this event is emitted all 3 listeners will fire. [11:26:32.614] DEBUG (sf:Lifecycle): 4 lifecycle events with the name init have now been registered. When this event is emitted all 4 listeners will fire. [11:26:32.614] DEBUG (sf:Lifecycle): 3 lifecycle events with the name prerun have now been registered. When this event is emitted all 3 listeners will fire. [11:26:32.614] DEBUG (sf:Lifecycle): 4 lifecycle events with the name prerun have now been registered. When this event is emitted all 4 listeners will fire. [11:26:32.614] DEBUG (sf:Lifecycle): lifecycle events with the name postrun have now been registered. When this event is emitted all 2 listeners will fire. [11:26:32.614] DEBUG (sf:Lifecycle): 5 lifecycle events with the name init have now been registered. When this event is emitted all 5 listeners will fire. [11:26:32.623] (sf:Org): Created 'sf:Org' child logger instance [11:26:32.623] (sf): Setup child 'sf:Org' logger instance [11:26:32.634] (sf:AuthInfoConfig): Created 'sf:AuthInfoConfig' child logger instance [11:26:32.634] (sf): Setup child 'sf:AuthInfoConfig' logger instance [11:26:32.646] (sf:keyChain): Created 'sf:keyChain' child logger instance [11:26:32.646] (sf): Setup child 'sf:keyChain' logger instance [11:26:32.646] DEBUG (sf:keyChain): platform: win32 [11:26:32.646] DEBUG (sf:AuthInfoConfig): Reading config file: C:\Users\USER_ID.sfdx\sandbox_username.json because hasRead is false [11:26:32.648] (sf:AuthInfo): Created 'sf:AuthInfo' child logger instance [11:26:32.648] (sf): Setup child 'sf:AuthInfo' logger instance [11:26:32.660] INFO (sf:AuthInfo): Returning fields for a connection using OAuth config. [11:26:32.661] (sf:connection): Created 'sf:connection' child logger instance [11:26:32.661] (sf): Setup child 'sf:connection' logger instance [11:26:32.661] DEBUG (sf:connection): API version cache last checked on 6/3/2024, 9:17:52 AM (now is 6/3/2024, 11:26:32 AM) [11:26:32.661] DEBUG (sf:connection): Using cached API version: 61.0 [11:26:32.661] DEBUG (sf:connection): Connection created with apiVersion 61.0 [11:26:32.661] (sf:Org): Created 'sf:Org' child logger instance [11:26:32.661] (sf): Setup child 'sf:Org' logger instance [11:26:32.672] (sf:AuthInfoConfig): Created 'sf:AuthInfoConfig' child logger instance [11:26:32.672] (sf): Setup child 'sf:AuthInfoConfig' logger instance [11:26:32.672] (sf:keyChain): Created 'sf:keyChain' child logger instance [11:26:32.672] (sf): Setup child 'sf:keyChain' logger instance [11:26:32.672] DEBUG (sf:keyChain): platform: win32 [11:26:32.672] DEBUG (sf:AuthInfoConfig): Reading config file: C:\Users\USER_ID.sfdx\sandbox_username.json because hasRead is false [11:26:32.674] (sf:AuthInfo): Created 'sf:AuthInfo' child logger instance [11:26:32.674] (sf): Setup child 'sf:AuthInfo' logger instance [11:26:32.686] INFO (sf:AuthInfo): Returning fields for a connection using OAuth config. [11:26:32.686] (sf:connection): Created 'sf:connection' child logger instance [11:26:32.686] (sf): Setup child 'sf:connection' logger instance [11:26:32.686] DEBUG (sf:connection): API version cache last checked on 6/3/2024, 9:17:52 AM (now is 6/3/2024, 11:26:32 AM) [11:26:32.686] DEBUG (sf:connection): Using cached API version: 61.0 [11:26:32.686] DEBUG (sf:connection): Connection created with apiVersion 61.0 [11:26:32.688] DEBUG (sf:connection): request method: "GET" url: "https://CUSTOM_DOMAIN.sandbox.my.salesforce.com/services/data/v61.0/tooling/sobjects/SourceMember/describe" headers: { "content-type": "application/json", "user-agent": "sfdx toolbelt:" } [11:26:33.264] (sf:SourceTracking): Created 'sf:SourceTracking' child logger instance [11:26:33.264] (sf): Setup child 'sf:SourceTracking' logger instance [11:26:33.264] (sf:variants): Created 'sf:variants' child logger instance [11:26:33.264] (sf): Setup child 'sf:variants' logger instance [11:26:33.266] DEBUG (sf:SourceTracking): subscribing to predeploy/retrieve events [11:26:33.266] DEBUG (sf:SourceTracking): subscribing to postdeploy/retrieve events [11:26:33.267] (sf:SfProjectJson): Created 'sf:SfProjectJson' child logger instance [11:26:33.267] (sf): Setup child 'sf:SfProjectJson' logger instance [11:26:33.267] DEBUG (sf:SfProjectJson): Reading config file: C:\Users\USER_ID.sfdx\sfdx-project.json because hasRead is false [11:26:33.281] (sf:componentSetBuilder): Created 'sf:componentSetBuilder' child logger instance [11:26:33.281] (sf): Setup child 'sf:componentSetBuilder' logger instance [11:26:33.281] (sf:variants): Created 'sf:variants' child logger instance [11:26:33.281] (sf): Setup child 'sf:variants' logger instance [11:26:33.283] DEBUG (sf:componentSetBuilder): Building ComponentSet from metadata: FieldSet:CustomObject__c.CustomObject_Fields [11:26:33.283] (sf:ComponentSet): Created 'sf:ComponentSet' child logger instance [11:26:33.283] (sf): Setup child 'sf:ComponentSet' logger instance [11:26:33.283] (sf:ComponentSet): Created 'sf:ComponentSet' child logger instance [11:26:33.283] (sf): Setup child 'sf:ComponentSet' logger instance [11:26:33.283] DEBUG (sf:componentSetBuilder): Searching for matching metadata in directories: C:\Users\USER_ID\VSCode\PROJECT_DIRECTORY [11:26:33.283] (sf:ComponentSet): Created 'sf:ComponentSet' child logger instance [11:26:33.283] (sf): Setup child 'sf:ComponentSet' logger instance [11:26:45.286] DEBUG (sf:componentSetBuilder): Matching metadata files (1): [11:26:45.286] DEBUG (sf:componentSetBuilder): C:\Users\USER_ID\VSCode\project\sfdx-source\project_name\main\default\objects\CustomObject__c\fieldSets\CustomObject_Fields.fieldSet-meta.xml [11:26:45.286] DEBUG (sf:componentSetBuilder): ComponentSet apiVersion = undefined [11:26:45.286] DEBUG (sf:componentSetBuilder): ComponentSet sourceApiVersion = 60.0 [11:26:45.287] (sf:variants): Created 'sf:variants' child logger instance [11:26:45.287] (sf): Setup child 'sf:variants' logger instance [11:26:45.289] (sf:variants): Created 'sf:variants' child logger instance [11:26:45.289] (sf): Setup child 'sf:variants' logger instance [11:26:45.290] (sf:ComponentSet): Created 'sf:ComponentSet' child logger instance [11:26:45.290] (sf): Setup child 'sf:ComponentSet' logger instance [11:26:45.291] (sf:MetadataApiRetrieve): Created 'sf:MetadataApiRetrieve' child logger instance [11:26:45.291] (sf): Setup child 'sf:MetadataApiRetrieve' logger instance [11:26:45.291] (sf:AuthInfoConfig): Created 'sf:AuthInfoConfig' child logger instance [11:26:45.291] (sf): Setup child 'sf:AuthInfoConfig' logger instance [11:26:45.291] (sf:keyChain): Created 'sf:keyChain' child logger instance [11:26:45.291] (sf): Setup child 'sf:keyChain' logger instance [11:26:45.291] DEBUG (sf:keyChain): platform: win32 [11:26:45.291] DEBUG (sf:AuthInfoConfig): Reading config file: C:\Users\USER_ID.sfdx\sandbox_username.json because hasRead is false [11:26:45.296] (sf:AuthInfo): Created 'sf:AuthInfo' child logger instance [11:26:45.296] (sf): Setup child 'sf:AuthInfo' logger instance [11:26:45.309] INFO (sf:AuthInfo): Returning fields for a connection using OAuth config. [11:26:45.310] (sf:connection): Created 'sf:connection' child logger instance [11:26:45.310] (sf): Setup child 'sf:connection' logger instance [11:26:45.310] DEBUG (sf:connection): API version cache last checked on 6/3/2024, 9:17:52 AM (now is 6/3/2024, 11:26:45 AM) [11:26:45.310] DEBUG (sf:connection): Using cached API version: 61.0 [11:26:45.310] DEBUG (sf:connection): Connection created with apiVersion 61.0 [11:26:45.311] DEBUG (sf:SourceTracking): received scopedPreRetrieve event [11:26:45.311] DEBUG (sf:SourceTracking): ensureRemoteTracking: remote tracking does not exist yet; getting instance [11:26:45.311] DEBUG (sf:connection): request method: "GET" url: "https://CUSTOM_DOMAIN.sandbox.my.salesforce.com/services/data/v61.0/tooling/sobjects/SourceMember/describe" headers: { "content-type": "application/json", "user-agent": "sfdx toolbelt:" } [11:26:45.316] (sf:ShadowRepo): Created 'sf:ShadowRepo' child logger instance [11:26:45.316] (sf): Setup child 'sf:ShadowRepo' logger instance [11:26:45.317] (sf:ShadowRepo): start: getStatus (noCache = false) [11:26:52.828] (sf:ShadowRepo): done: getStatus (noCache = false) [11:26:52.829] (sf:ShadowRepo): start: getStatus (noCache = false) [11:26:52.829] (sf:ShadowRepo): done: getStatus (noCache = false) [11:26:52.833] DEBUG (sf:SourceTracking): ensureRemoteTracking: remote tracking already exists [11:26:52.834] DEBUG (RemoteSourceTrackingService): Query: SELECT MemberType, MemberName, IsNameObsolete, RevisionCounter FROM SourceMember WHERE RevisionCounter > 90865 [11:26:52.835] DEBUG (sf:connection): request method: "GET" url: "https://CUSTOM_DOMAIN.sandbox.my.salesforce.com/services/data/v61.0/tooling/query?q=SELECT%20MemberType%2C%20MemberName%2C%20IsNameObsolete%2C%20RevisionCounter%20FROM%20SourceMember%20WHERE%20RevisionCounter%20%3E%2090865" headers: { "content-type": "application/json", "user-agent": "sfdx toolbelt:" } Retrieving v60.0 metadata from sandbox_username using the v61.0 SOAP API [11:26:53.119] DEBUG (RemoteSourceTrackingService): Found 3019 elements not synced with org [11:26:53.119] DEBUG (sf:SourceTracking):
Error (1): Metadata API request failed: Could not find HEAD.
it says it's an API error but I'm pretty sure it's coming from the source-tracking library: https://github.com/search?q=repo%3Aisomorphic-git%2Fisomorphic-git+%2FCould+not+find+HEAD%2F&type=issues
did you cut out some part at the end of the logs? there's no errors in what you shared.
Since you can't repro the original error (Cannot read properties of null (reading 'split')
) and now get a source-tracking one, could you retry this using a new scratch org with the same project? if that works then maybe your source tracking info in the previous org got messed up.
This issue has not received a response in 7 days. It will auto-close in 7 days unless a response is posted.
Summary
I am trying to retrieve a field set from an org using the following command:
sf project retrieve start -m "FieldSet:OBJECT.FIELD_SET_NAME
and an error is being returned "Error (10): Metadata API request failed: Cannot read properties of null (reading 'split')". I have used this command before and confirm the api name of object and field are correct.Steps To Reproduce
sf project retrieve start -m "FieldSet:OBJECT.FIELD_SET_NAME"
Expected result
The fieldset should be retrieved from the Salesforce environment it was attempting to be retrieved from.
Actual result
Fieldset is not retrieved and an error message is produced.
Error (10): Metadata API request failed: Cannot read properties of null (reading 'split')
System Information
Shell: GNU Bash, version 5.2.15(1)-release (x86_64-pc-msys)
sf version --verbose --json
Additional information