Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Maximum call stack size exceeded on sf project generate manifest #3197

Open
gavignon opened this issue Jan 28, 2025 · 11 comments
Open

Maximum call stack size exceeded on sf project generate manifest #3197

gavignon opened this issue Jan 28, 2025 · 11 comments
Labels
bug Issue or pull request that identifies or fixes a bug more information required Issue requires more information or a response from the customer validated Version information for this issue has been validated

Comments

@gavignon
Copy link

Summary

Cannot generate a full manifest file on a huge org while it's working on smaller orgs.

Steps To Reproduce

Run this command on a huge org: sf project generate manifest --output-dir manifest --name=allMetadata --from-org {ORG}

Expected result

Manifest generated

Actual result

{
  "name": "RangeError",
  "message": "Maximum call stack size exceeded",
  "exitCode": 1,
  "context": "ManifestGenerate",
  "stack": "RangeError: Maximum call stack size exceeded\n    at SfCommandError.from (file://~/.npm-global/lib/node_modules/@salesforce/cli/node_modules/@salesforce/sf-plugins-core/lib/SfCommandError.js:39:16)\n    at ManifestGenerate.catch (file://~/.npm-global/lib/node_modules/@salesforce/cli/node_modules/@salesforce/sf-plugins-core/lib/sfCommand.js:316:47)\n    at ManifestGenerate._run (~/.npm-global/lib/node_modules/@salesforce/cli/node_modules/@salesforce/sf-plugins-core/node_modules/@oclif/core/lib/command.js:316:29)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async Config.runCommand (~/.npm-global/lib/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/config/config.js:435:25)\n    at async run (~/.npm-global/lib/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/main.js:96:16)\n    at async file://~/.npm-global/lib/node_modules/@salesforce/cli/bin/run.js:15:1",
  "cause": "RangeError: Maximum call stack size exceeded\n    at sendIt (~/.npm-global/lib/node_modules/@salesforce/cli/node_modules/@salesforce/source-deploy-retrieve/lib/src/resolve/connectionResolver.js:132:35)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async ConnectionResolver.sendBatchedRequests (~/.npm-global/lib/node_modules/@salesforce/cli/node_modules/@salesforce/source-deploy-retrieve/lib/src/resolve/connectionResolver.js:156:17)\n    at async ConnectionResolver.resolve (~/.npm-global/lib/node_modules/@salesforce/cli/node_modules/@salesforce/source-deploy-retrieve/lib/src/resolve/connectionResolver.js:70:39)\n    at async ComponentSet.fromConnection (~/.npm-global/lib/node_modules/@salesforce/cli/node_modules/@salesforce/source-deploy-retrieve/lib/src/collections/componentSet.js:215:26)\n    at async ComponentSetBuilder.build (~/.npm-global/lib/node_modules/@salesforce/cli/node_modules/@salesforce/source-deploy-retrieve/lib/src/collections/componentSetBuilder.js:147:37)\n    at async ManifestGenerate.run (file://~/.npm-global/lib/node_modules/@salesforce/cli/node_modules/@salesforce/plugin-deploy-retrieve/lib/commands/project/generate/manifest.js:103:30)\n    at async ManifestGenerate._run (~/.npm-global/lib/node_modules/@salesforce/cli/node_modules/@salesforce/sf-plugins-core/node_modules/@oclif/core/lib/command.js:312:22)\n    at async Config.runCommand (~/.npm-global/lib/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/config/config.js:435:25)\n    at async run (~/.npm-global/lib/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/main.js:96:16)",
  "warnings": [],
  "code": "1",
  "status": 1,
  "commandName": "ManifestGenerate"
}

System Information

{
  "architecture": "darwin-x64",
  "cliVersion": "@salesforce/cli/2.73.9",
  "nodeVersion": "node-v20.12.2",
  "osVersion": "Darwin 24.2.0",
  "rootPath": "~/.npm-global/lib/node_modules/@salesforce/cli",
  "shell": "zsh",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.2.17 (core)",
    "@oclif/plugin-commands 4.1.16 (core)",
    "@oclif/plugin-help 6.2.21 (core)",
    "@oclif/plugin-not-found 3.2.35 (core)",
    "@oclif/plugin-plugins 5.4.25 (core)",
    "@oclif/plugin-search 1.2.18 (core)",
    "@oclif/plugin-update 4.6.23 (core)",
    "@oclif/plugin-version 2.2.20 (core)",
    "@oclif/plugin-warn-if-update-available 3.1.30 (core)",
    "@oclif/plugin-which 3.2.25 (core)",
    "@salesforce/cli 2.73.9 (core)",
    "apex 3.6.8 (core)",
    "api 1.3.3 (core)",
    "auth 3.6.87 (core)",
    "community 3.2.10 (user) published 262 days ago (Sat May 11 2024) (latest is 3.3.8)",
    "data 4.0.1 (core)",
    "deploy-retrieve 3.17.7 (core)",
    "dev 2.1.8 (user) published 370 days ago (Wed Jan 24 2024) (latest is 2.5.1)",
    "info 3.4.32 (core)",
    "limits 3.3.44 (core)",
    "marketplace 1.3.7 (core)",
    "org 5.2.23 (core)",
    "packaging 2.9.12 (core)",
    "schema 3.3.46 (core)",
    "settings 2.4.10 (core)",
    "#s 2.0.21 (user) published 349 days ago (Tue Feb 13 2024) (latest is 2.6.10)",
    "sobject 1.4.49 (core)",
    "telemetry 3.6.29 (core)",
    "templates 56.3.35 (core)",
    "trust 3.7.55 (core)",
    "user 3.6.6 (core)",
    "@salesforce/sfdx-scanner 4.7.0 (user) published 90 days ago (Tue Oct 29 2024) (latest is 4.8.0)",
    "sfdmu 4.33.17 (user) published 271 days ago (Thu May 02 2024) (latest is 4.38.0)"
  ]
}
@gavignon gavignon added the investigating We're actively investigating this issue label Jan 28, 2025
Copy link

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.

@github-actions github-actions bot added the validated Version information for this issue has been validated label Jan 28, 2025
@cristiand391
Copy link
Member

We've recently added some new options to improve manifest generation from an org:
https://github.com/forcedotcom/cli/tree/main/releasenotes/#27221-jan-15-2025

suggestions:

  1. run sf project generate manifest --output-dir manifest --name=allMetadata --from-org {ORG} with the --dev-debug flag and see if it's hanging on a specific type
  2. try excluding it via the new --excluded-metadata

@cristiand391 cristiand391 added more information required Issue requires more information or a response from the customer and removed investigating We're actively investigating this issue labels Jan 29, 2025
@gavignon
Copy link
Author

gavignon commented Jan 31, 2025

Thanks @cristiand391

But I'm not sure on how using the dev debug to identify the metadata to exclude as the last step seems to be different on each execution.

Do I need to exclude all the metadata types that cannot be used in the DEBUG statements ?

Here is the output:

[10:52:12.835] DEBUG (sf:oclif:ConnectionResolver): Awaiting listMetadata requests
[10:52:12.973] DEBUG (sf:oclif:ConnectionResolver): [AccessControlPolicy] INVALID_TYPE: Cannot use: AccessControlPolicy in this version
[10:52:13.191] DEBUG (sf:oclif:ConnectionResolver): [AIUsecaseDefinition] INVALID_TYPE: Cannot use: AIUsecaseDefinition in this organization
[10:52:13.199] DEBUG (sf:oclif:ConnectionResolver): [AccountingModelConfig] INVALID_TYPE: Cannot use: AccountingModelConfig in this organization
[10:52:13.204] DEBUG (sf:oclif:ConnectionResolver): [ActionableEventTypeDef] INVALID_TYPE: Cannot use: ActionableEventTypeDef in this organization
[10:52:13.212] DEBUG (sf:oclif:ConnectionResolver): [AccountingFieldMapping] INVALID_TYPE: Cannot use: AccountingFieldMapping in this organization
[10:52:13.213] DEBUG (sf:oclif:ConnectionResolver): [AccountRelationshipShareRule] INVALID_TYPE: Cannot use: AccountRelationshipShareRule in this organization
[10:52:13.215] DEBUG (sf:oclif:ConnectionResolver): [AdvAcctForecastDimSource] INVALID_TYPE: Cannot use: AdvAcctForecastDimSource in this organization
[10:52:13.218] DEBUG (sf:oclif:ConnectionResolver): [AssessmentConfiguration] INVALID_TYPE: Cannot use: AssessmentConfiguration in this organization
[10:52:13.219] DEBUG (sf:oclif:ConnectionResolver): [AcctMgrTargetSettings] INVALID_TYPE: Cannot use: AcctMgrTargetSettings in this organization
[10:52:13.220] DEBUG (sf:oclif:ConnectionResolver): [AssessmentQuestion] INVALID_TYPE: Cannot use: AssessmentQuestion in this organization
[10:52:13.222] DEBUG (sf:oclif:ConnectionResolver): [ApplicationRecordTypeConfig] INVALID_TYPE: Cannot use: ApplicationRecordTypeConfig in this organization
[10:52:13.224] DEBUG (sf:oclif:ConnectionResolver): [AssistantContextItem] INVALID_TYPE: Cannot use: AssistantContextItem in this organization
[10:52:13.225] DEBUG (sf:oclif:ConnectionResolver): [AccountForecastSettings] INVALID_TYPE: Cannot use: AccountForecastSettings in this organization
[10:52:13.227] DEBUG (sf:oclif:ConnectionResolver): [BldgEnrgyIntensityCnfg] INVALID_TYPE: Cannot use: BldgEnrgyIntensityCnfg in this organization
[10:52:13.228] DEBUG (sf:oclif:ConnectionResolver): [BatchCalcJobDefinition] INVALID_TYPE: Cannot use: BatchCalcJobDefinition in this organization
[10:52:13.230] DEBUG (sf:oclif:ConnectionResolver): [AssistantRecommendationType] INVALID_TYPE: Unknown type:AssistantRecommendationType
[10:52:13.231] DEBUG (sf:oclif:ConnectionResolver): [ActionableEventOrchDef] INVALID_TYPE: Cannot use: ActionableEventOrchDef in this organization
[10:52:13.234] DEBUG (sf:oclif:ConnectionResolver): [AssistantSkillQuickAction] INVALID_TYPE: Cannot use: AssistantSkillQuickAction in this organization
[10:52:13.234] DEBUG (sf:oclif:ConnectionResolver): [ActionableListDefinition] INVALID_TYPE: Cannot use: ActionableListDefinition in this organization
[10:52:13.235] DEBUG (sf:oclif:ConnectionResolver): [AdvAccountForecastSet] INVALID_TYPE: Cannot use: AdvAccountForecastSet in this organization
[10:52:13.236] DEBUG (sf:oclif:ConnectionResolver): [ActnblListKeyPrfmIndDef] INVALID_TYPE: Cannot use: ActnblListKeyPrfmIndDef in this organization
[10:52:13.236] DEBUG (sf:oclif:ConnectionResolver): [AIScoringModelDefinition] INVALID_TYPE: Cannot use: AIScoringModelDefinition in this organization
[10:52:13.237] DEBUG (sf:oclif:ConnectionResolver): [AIAssistantTemplate] INVALID_TYPE: Unknown type:AIAssistantTemplate
[10:52:13.237] DEBUG (sf:oclif:ConnectionResolver): [AssessmentQuestionSet] INVALID_TYPE: Cannot use: AssessmentQuestionSet in this organization
[10:52:13.240] DEBUG (sf:oclif:ConnectionResolver): [AffinityScoreDefinition] INVALID_TYPE: Cannot use: AffinityScoreDefinition in this organization
[10:52:13.254] DEBUG (sf:oclif:ConnectionResolver): [AdvAcctForecastPeriodGroup] INVALID_TYPE: Cannot use: AdvAcctForecastPeriodGroup in this organization
[10:52:13.266] DEBUG (sf:oclif:ConnectionResolver): [AssistantDefinition] INVALID_TYPE: Cannot use: AssistantDefinition in this organization
[10:52:13.270] DEBUG (sf:oclif:ConnectionResolver): [AssistantSkillSobjectAction] INVALID_TYPE: Cannot use: AssistantSkillSobjectAction in this organization
[10:52:13.273] DEBUG (sf:oclif:ConnectionResolver): [BenefitAction] INVALID_TYPE: Cannot use: BenefitAction in this organization
[10:52:13.286] DEBUG (sf:oclif:ConnectionResolver): [AssistantVersion] INVALID_TYPE: Cannot use: AssistantVersion in this organization
[10:52:13.287] DEBUG (sf:oclif:ConnectionResolver): [CareSystemFieldMapping] INVALID_TYPE: Cannot use: CareSystemFieldMapping in this organization
[10:52:13.299] DEBUG (sf:oclif:ConnectionResolver): [CallCtrAgentFavTrfrDest] INVALID_TYPE: Cannot use: CallCtrAgentFavTrfrDest in this organization
[10:52:13.300] DEBUG (sf:oclif:ConnectionResolver): [CareRequestConfiguration] INVALID_TYPE: Cannot use: CareRequestConfiguration in this organization
[10:52:13.301] DEBUG (sf:oclif:ConnectionResolver): [CareProviderAfflRoleConfig] INVALID_TYPE: Cannot use: CareProviderAfflRoleConfig in this organization
[10:52:13.301] DEBUG (sf:oclif:ConnectionResolver): [CareBenefitVerifySettings] INVALID_TYPE: Cannot use: CareBenefitVerifySettings in this organization
[10:52:13.304] DEBUG (sf:oclif:ConnectionResolver): [BusinessProcessFeedbackConfiguration] INVALID_TYPE: Unknown type:BusinessProcessFeedbackConfiguration
[10:52:13.305] DEBUG (sf:oclif:ConnectionResolver): [ContextDefinition] INVALID_TYPE: Cannot use: ContextDefinition in this organization
[10:52:13.317] DEBUG (sf:oclif:ConnectionResolver): [ClauseCatgConfiguration] INVALID_TYPE: Cannot use: ClauseCatgConfiguration in this organization
[10:52:13.329] DEBUG (sf:oclif:ConnectionResolver): [CareLimitType] INVALID_TYPE: Cannot use: CareLimitType in this organization
[10:52:13.330] DEBUG (sf:oclif:ConnectionResolver): [CampaignInfluenceModel] INVALID_TYPE: Cannot use: CampaignInfluenceModel in this organization
[10:52:13.330] DEBUG (sf:oclif:ConnectionResolver): [CommandAction] INVALID_TYPE: Cannot use: CommandAction in this organization
[10:52:13.331] DEBUG (sf:oclif:ConnectionResolver): [CaseSubjectParticle] INVALID_TYPE: Cannot use: CaseSubjectParticle in this organization
[10:52:13.331] DEBUG (sf:oclif:ConnectionResolver): [CareProviderSearchConfig] INVALID_TYPE: Cannot use: CareProviderSearchConfig in this organization
[10:52:13.332] DEBUG (sf:oclif:ConnectionResolver): [BusinessProcessGroup] INVALID_TYPE: Cannot use: BusinessProcessGroup in this organization
[10:52:13.335] DEBUG (sf:oclif:ConnectionResolver): [ConversationVendorFieldDef] INVALID_TYPE: Unknown type:ConversationVendorFieldDef
[10:52:13.336] DEBUG (sf:oclif:ConnectionResolver): [CustomDataType] INVALID_TYPE: Cannot use: CustomDataType in this organization
[10:52:13.350] DEBUG (sf:oclif:ConnectionResolver): [ContractType] INVALID_TYPE: Cannot use: ContractType in this organization
[10:52:13.399] DEBUG (sf:oclif:ConnectionResolver): [DataPipeline] INVALID_TYPE: Cannot use: DataPipeline in this organization
[10:52:13.431] DEBUG (sf:oclif:ConnectionResolver): [CustomExperience] INVALID_TYPE: Unknown type:CustomExperience
[10:52:13.443] DEBUG (sf:oclif:ConnectionResolver): [ContextUseCaseMapping] INVALID_TYPE: Cannot use: ContextUseCaseMapping in this organization
[10:52:13.467] DEBUG (sf:oclif:ConnectionResolver): [DisclosureDefinition] INVALID_TYPE: Cannot use: DisclosureDefinition in this organization
[10:52:13.488] DEBUG (sf:oclif:ConnectionResolver): [DisclosureType] INVALID_TYPE: Cannot use: DisclosureType in this organization
[10:52:13.494] DEBUG (sf:oclif:ConnectionResolver): [DisclosureDefinitionVersion] INVALID_TYPE: Cannot use: DisclosureDefinitionVersion in this organization
[10:52:13.538] DEBUG (sf:oclif:ConnectionResolver): [EmployeeDataSyncProfile] INVALID_TYPE: Cannot use: EmployeeDataSyncProfile in this organization
[10:52:13.539] DEBUG (sf:oclif:ConnectionResolver): [EnablementProgramDefinition] INVALID_TYPE: Cannot use: EnablementProgramDefinition in this organization
[10:52:13.540] DEBUG (sf:oclif:ConnectionResolver): [DocumentCategoryDocumentType] INVALID_TYPE: Cannot use: DocumentCategoryDocumentType in this organization
[10:52:13.541] DEBUG (sf:oclif:ConnectionResolver): [DocumentCategory] INVALID_TYPE: Cannot use: DocumentCategory in this organization
[10:52:13.541] DEBUG (sf:oclif:ConnectionResolver): [DocumentType] INVALID_TYPE: Cannot use: DocumentType in this organization
[10:52:13.542] DEBUG (sf:oclif:ConnectionResolver): [DocumentGenerationSetting] INVALID_TYPE: Cannot use: DocumentGenerationSetting in this organization
[10:52:13.543] DEBUG (sf:oclif:ConnectionResolver): [DynamicTrigger] INVALID_TYPE: Unknown type:DynamicTrigger
[10:52:13.546] DEBUG (sf:oclif:ConnectionResolver): [EnablementMeasureDefinition] INVALID_TYPE: Cannot use: EnablementMeasureDefinition in this organization
[10:52:13.581] DEBUG (sf:oclif:ConnectionResolver): [EventSubscription] INVALID_TYPE: Cannot use: EventSubscription in this version
[10:52:13.584] DEBUG (sf:oclif:ConnectionResolver): [ESignatureConfig] INVALID_TYPE: Cannot use: ESignatureConfig in this organization
[10:52:13.585] DEBUG (sf:oclif:ConnectionResolver): [EventType] INVALID_TYPE: Cannot use: EventType in this organization
[10:52:13.586] DEBUG (sf:oclif:ConnectionResolver): [EnblProgramTaskSubCategory] INVALID_TYPE: Cannot use: EnblProgramTaskSubCategory in this organization
[10:52:13.587] DEBUG (sf:oclif:ConnectionResolver): [EntityImplements] INVALID_TYPE: Unknown type:EntityImplements
[10:52:13.587] DEBUG (sf:oclif:ConnectionResolver): [EventDelivery] INVALID_TYPE: Cannot use: EventDelivery in this version
[10:52:13.588] DEBUG (sf:oclif:ConnectionResolver): [ESignatureEnvelopeConfig] INVALID_TYPE: Cannot use: ESignatureEnvelopeConfig in this organization
[10:52:13.589] DEBUG (sf:oclif:ConnectionResolver): [DocumentTemplate] INVALID_TYPE: Cannot use: DocumentTemplate in this organization
[10:52:13.589] DEBUG (sf:oclif:ConnectionResolver): [EmbeddedServiceFieldService] INVALID_TYPE: Cannot use: EmbeddedServiceFieldService in this version
[10:52:13.647] DEBUG (sf:oclif:ConnectionResolver): [ExternalDocStorageConfig] INVALID_TYPE: Cannot use: ExternalDocStorageConfig in this organization
[10:52:13.660] DEBUG (sf:oclif:ConnectionResolver): [ExtlClntAppNotificationSettings] INVALID_TYPE: Cannot use: ExtlClntAppNotificationSettings in this organization
[10:52:13.663] DEBUG (sf:oclif:ConnectionResolver): [FieldServiceMobileExtension] INVALID_TYPE: Cannot use: FieldServiceMobileExtension in this organization
[10:52:13.664] DEBUG (sf:oclif:ConnectionResolver): [ExtlClntAppSamlConfigurablePolicies] INVALID_TYPE: Unknown type:ExtlClntAppSamlConfigurablePolicies
[10:52:13.665] DEBUG (sf:oclif:ConnectionResolver): [ExtlClntAppMobileSettings] INVALID_TYPE: Cannot use: ExtlClntAppMobileSettings in this organization
[10:52:13.695] DEBUG (sf:oclif:ConnectionResolver): [ExtlClntAppMobileConfigurablePolicies] INVALID_TYPE: Cannot use: ExtlClntAppMobileConfigurablePolicies in this organization
[10:52:13.776] DEBUG (sf:oclif:ConnectionResolver): [FunctionReference] INVALID_TYPE: Cannot use: FunctionReference in this organization
[10:52:13.779] DEBUG (sf:oclif:ConnectionResolver): [FuelType] INVALID_TYPE: Cannot use: FuelType in this organization
[10:52:13.780] DEBUG (sf:oclif:ConnectionResolver): [FundraisingConfig] INVALID_TYPE: Cannot use: FundraisingConfig in this organization
[10:52:13.781] DEBUG (sf:oclif:ConnectionResolver): [Form] INVALID_TYPE: Unknown type:Form
[10:52:13.782] DEBUG (sf:oclif:ConnectionResolver): [FuelTypeSustnUom] INVALID_TYPE: Cannot use: FuelTypeSustnUom in this organization
[10:52:13.804] DEBUG (sf:oclif:ConnectionResolver): [InboundCertificate] INVALID_TYPE: Cannot use: InboundCertificate in this organization
[10:52:13.818] DEBUG (sf:oclif:ConnectionResolver): [GlobalPicklist] INVALID_TYPE: Cannot use: GlobalPicklist in this version
[10:52:13.819] DEBUG (sf:oclif:ConnectionResolver): [IndustriesManufacturingSettings] INVALID_TYPE: Unknown type:IndustriesManufacturingSettings
[10:52:13.823] DEBUG (sf:oclif:ConnectionResolver): [InsightType] INVALID_TYPE: Unknown type:InsightType
[10:52:13.823] DEBUG (sf:oclif:ConnectionResolver): [IntegrationHubSettings] INVALID_TYPE: Cannot use: IntegrationHubSettings in this organization
[10:52:13.824] DEBUG (sf:oclif:ConnectionResolver): [Icon] INVALID_TYPE: Cannot use: Icon in this organization
[10:52:13.828] DEBUG (sf:oclif:ConnectionResolver): [IdentityVerificationProcDef] INVALID_TYPE: Cannot use: IdentityVerificationProcDef in this organization
[10:52:13.887] DEBUG (sf:oclif:ConnectionResolver): [LocationUse] INVALID_TYPE: Cannot use: LocationUse in this organization
[10:52:13.888] DEBUG (sf:oclif:ConnectionResolver): [LoyaltyProgramSetup] INVALID_TYPE: Cannot use: LoyaltyProgramSetup in this organization
[10:52:13.888] DEBUG (sf:oclif:ConnectionResolver): [LearningItemType] INVALID_TYPE: Cannot use: LearningItemType in this organization
[10:52:13.891] DEBUG (sf:oclif:ConnectionResolver): [LicenseDefinition] INVALID_TYPE: Cannot use: LicenseDefinition in this organization
[10:52:13.891] DEBUG (sf:oclif:ConnectionResolver): [IntegrationHubSettingsType] INVALID_TYPE: Cannot use: IntegrationHubSettingsType in this organization
[10:52:13.897] DEBUG (sf:oclif:ConnectionResolver): [LearningAchievementConfig] INVALID_TYPE: Cannot use: LearningAchievementConfig in this organization
[10:52:13.959] DEBUG (sf:oclif:ConnectionResolver): [MarketingResourceType] INVALID_TYPE: Unknown type:MarketingResourceType
[10:52:13.962] DEBUG (sf:oclif:ConnectionResolver): [MarketingAppExtension] INVALID_TYPE: Cannot use: MarketingAppExtension in this organization
[10:52:14.077] DEBUG (sf:oclif:ConnectionResolver): [MfgProgramTemplate] INVALID_TYPE: Cannot use: MfgProgramTemplate in this organization
[10:52:14.082] DEBUG (sf:oclif:ConnectionResolver): [MobileSecurityPolicy] INVALID_TYPE: Cannot use: MobileSecurityPolicy in this organization
[10:52:14.087] DEBUG (sf:oclif:ConnectionResolver): [MobileSecurityPolicySet] INVALID_TYPE: Cannot use: MobileSecurityPolicySet in this organization
[10:52:14.240] DEBUG (sf:oclif:ConnectionResolver): [ObjectHierarchyRelationship] INVALID_TYPE: Cannot use: ObjectHierarchyRelationship in this organization
[10:52:14.248] DEBUG (sf:oclif:ConnectionResolver): [MobSecurityCertPinConfig] INVALID_TYPE: Cannot use: MobSecurityCertPinConfig in this organization
[10:52:14.251] DEBUG (sf:oclif:ConnectionResolver): [OmniDataTransform] INVALID_TYPE: Cannot use: OmniDataTransform in this organization
[10:52:14.252] DEBUG (sf:oclif:ConnectionResolver): [OmniInteractionAccessConfig] INVALID_TYPE: Cannot use: OmniInteractionAccessConfig in this organization
[10:52:14.253] DEBUG (sf:oclif:ConnectionResolver): [OmniExtTrackingDef] INVALID_TYPE: Cannot use: OmniExtTrackingDef in this organization
[10:52:14.254] DEBUG (sf:oclif:ConnectionResolver): [OcrSampleDocument] INVALID_TYPE: Cannot use: OcrSampleDocument in this organization
[10:52:14.257] DEBUG (sf:oclif:ConnectionResolver): [OmniIntegrationProcedure] INVALID_TYPE: Cannot use: OmniIntegrationProcedure in this organization
[10:52:14.260] DEBUG (sf:oclif:ConnectionResolver): [OmniTrackingGroup] INVALID_TYPE: Cannot use: OmniTrackingGroup in this organization
[10:52:14.261] DEBUG (sf:oclif:ConnectionResolver): [OmniScript] INVALID_TYPE: Cannot use: OmniScript in this organization
[10:52:14.262] DEBUG (sf:oclif:ConnectionResolver): [OmniInteractionConfig] INVALID_TYPE: Cannot use: OmniInteractionConfig in this organization
[10:52:14.268] DEBUG (sf:oclif:ConnectionResolver): [OmniUiCard] INVALID_TYPE: Cannot use: OmniUiCard in this organization
[10:52:14.268] DEBUG (sf:oclif:ConnectionResolver): [OcrTemplate] INVALID_TYPE: Cannot use: OcrTemplate in this organization
[10:52:14.272] DEBUG (sf:oclif:ConnectionResolver): [Orchestration] INVALID_TYPE: Cannot use: Orchestration in this organization
[10:52:14.282] DEBUG (sf:oclif:ConnectionResolver): [OrchestrationContext] INVALID_TYPE: Cannot use: OrchestrationContext in this organization
[10:52:14.283] DEBUG (sf:oclif:ConnectionResolver): [ParticipantRole] INVALID_TYPE: Cannot use: ParticipantRole in this organization
[10:52:14.291] DEBUG (sf:oclif:ConnectionResolver): [PermissionSetLicenseDefinition] INVALID_TYPE: Cannot use: PermissionSetLicenseDefinition in this organization
[10:52:14.374] DEBUG (sf:oclif:ConnectionResolver): [MobileSecurityAssignment] INVALID_TYPE: Cannot use: MobileSecurityAssignment in this organization
[10:52:14.447] DEBUG (sf:oclif:ConnectionResolver): [Portal] INVALID_TYPE: Cannot use: Portal in this organization
[10:52:14.457] DEBUG (sf:oclif:ConnectionResolver): [ProductAttributeSet] INVALID_TYPE: Cannot use: ProductAttributeSet in this organization
[10:52:14.458] DEBUG (sf:oclif:ConnectionResolver): [#Recipe] INVALID_TYPE: Cannot use: #Recipe in this organization
[10:52:14.459] DEBUG (sf:oclif:ConnectionResolver): [#ActionParameters] INVALID_TYPE: Cannot use: #ActionParameters in this organization
[10:52:14.460] DEBUG (sf:oclif:ConnectionResolver): [ProductAttrDisplayConfig] INVALID_TYPE: Cannot use: ProductAttrDisplayConfig in this organization
[10:52:14.461] DEBUG (sf:oclif:ConnectionResolver): [ProductSpecificationTypeDefinition] INVALID_TYPE: Unknown type:ProductSpecificationTypeDefinition
[10:52:14.462] DEBUG (sf:oclif:ConnectionResolver): [RegisteredExternalService] INVALID_TYPE: Cannot use: RegisteredExternalService in this organization
[10:52:14.463] DEBUG (sf:oclif:ConnectionResolver): [SearchCriteriaConfiguration] INVALID_TYPE: Cannot use: SearchCriteriaConfiguration in this organization
[10:52:14.463] DEBUG (sf:oclif:ConnectionResolver): [SchedulingObjective] INVALID_TYPE: Cannot use: SchedulingObjective in this organization
[10:52:14.464] DEBUG (sf:oclif:ConnectionResolver): [SalesAgreementSettings] INVALID_TYPE: Cannot use: SalesAgreementSettings in this organization
[10:52:14.465] DEBUG (sf:oclif:ConnectionResolver): [ProductSpecificationType] INVALID_TYPE: Cannot use: ProductSpecificationType in this organization
[10:52:14.466] DEBUG (sf:oclif:ConnectionResolver): [ProductSpecificationRecType] INVALID_TYPE: Cannot use: ProductSpecificationRecType in this organization
[10:52:14.466] DEBUG (sf:oclif:ConnectionResolver): [RetrievalSummaryDefinition] INVALID_TYPE: Cannot use: RetrievalSummaryDefinition in this organization
[10:52:14.468] DEBUG (sf:oclif:ConnectionResolver): [RelatedRecordAssocCriteria] INVALID_TYPE: Cannot use: RelatedRecordAssocCriteria in this organization
[10:52:14.478] DEBUG (sf:oclif:ConnectionResolver): [SearchableObjDataSyncInfo] INVALID_TYPE: Cannot use: SearchableObjDataSyncInfo in this organization
[10:52:14.479] DEBUG (sf:oclif:ConnectionResolver): [RecordAggregationDefinition] INVALID_TYPE: Cannot use: RecordAggregationDefinition in this organization
[10:52:14.482] DEBUG (sf:oclif:ConnectionResolver): [ScoreCategory] INVALID_TYPE: Cannot use: ScoreCategory in this organization
[10:52:14.482] DEBUG (sf:oclif:ConnectionResolver): [RelationshipGraphDefinition] INVALID_TYPE: Cannot use: RelationshipGraphDefinition in this organization
[10:52:14.483] DEBUG (sf:oclif:ConnectionResolver): [ReferencedDashboard] INVALID_TYPE: Cannot use: ReferencedDashboard in this organization
[10:52:14.487] DEBUG (sf:oclif:ConnectionResolver): [SustainabilityUom] INVALID_TYPE: Cannot use: SustainabilityUom in this organization
[10:52:14.488] DEBUG (sf:oclif:ConnectionResolver): [SustnUomConversion] INVALID_TYPE: Cannot use: SustnUomConversion in this organization
[10:52:14.490] DEBUG (sf:oclif:ConnectionResolver): [SvcCatalogItemDef] INVALID_TYPE: Cannot use: SvcCatalogItemDef in this organization
[10:52:14.490] DEBUG (sf:oclif:ConnectionResolver): [Territory2Rule] INVALID_TYPE: Cannot use: Territory2Rule in this organization
[10:52:14.491] DEBUG (sf:oclif:ConnectionResolver): [TimeSheetTemplate] INVALID_TYPE: Cannot use: TimeSheetTemplate in this organization
[10:52:14.492] DEBUG (sf:oclif:ConnectionResolver): [Territory2] INVALID_TYPE: Cannot use: Territory2 in this organization
[10:52:14.493] DEBUG (sf:oclif:ConnectionResolver): [SvcCatalogFilterCriteria] INVALID_TYPE: Cannot use: SvcCatalogFilterCriteria in this organization
[10:52:14.495] DEBUG (sf:oclif:ConnectionResolver): [Territory] INVALID_TYPE: Cannot use: Territory in this organization
[10:52:14.496] DEBUG (sf:oclif:ConnectionResolver): [SvcCatalogFilterCondition] INVALID_TYPE: Unknown type:SvcCatalogFilterCondition
[10:52:14.496] DEBUG (sf:oclif:ConnectionResolver): [StageDefinition] INVALID_TYPE: Cannot use: StageDefinition in this organization
[10:52:14.497] DEBUG (sf:oclif:ConnectionResolver): [SvcCatalogFulfillmentFlow] INVALID_TYPE: Cannot use: SvcCatalogFulfillmentFlow in this organization
[10:52:14.498] DEBUG (sf:oclif:ConnectionResolver): [Territory2Type] INVALID_TYPE: Cannot use: Territory2Type in this organization
[10:52:14.506] DEBUG (sf:oclif:ConnectionResolver): [SvcCatalogCategory] INVALID_TYPE: Cannot use: SvcCatalogCategory in this organization
[10:52:14.507] DEBUG (sf:oclif:ConnectionResolver): [SvcCatalogItemDefFiltrCrit] INVALID_TYPE: Unknown type:SvcCatalogItemDefFiltrCrit
[10:52:14.508] DEBUG (sf:oclif:ConnectionResolver): [Territory2Model] INVALID_TYPE: Cannot use: Territory2Model in this organization
[10:52:14.510] DEBUG (sf:oclif:ConnectionResolver): [SchedulingRule] INVALID_TYPE: Cannot use: SchedulingRule in this organization
[10:52:14.537] DEBUG (sf:oclif:ConnectionResolver): [ExtlClntAppPushSettings] INVALID_TYPE: Cannot use: ExtlClntAppPushSettings in this organization
[10:52:14.538] DEBUG (sf:oclif:ConnectionResolver): [UserAuthCertificate] INVALID_TYPE: Cannot use: UserAuthCertificate in this organization
[10:52:14.539] DEBUG (sf:oclif:ConnectionResolver): [UIObjectRelationConfig] INVALID_TYPE: Cannot use: UIObjectRelationConfig in this organization
[10:52:14.539] DEBUG (sf:oclif:ConnectionResolver): [VisualizationPlugin] INVALID_TYPE: Cannot use: VisualizationPlugin in this organization
[10:52:14.540] DEBUG (sf:oclif:ConnectionResolver): [VehicleAssetEmssnSrcCnfg] INVALID_TYPE: Cannot use: VehicleAssetEmssnSrcCnfg in this organization
[10:52:14.540] DEBUG (sf:oclif:ConnectionResolver): [UiPlugin] INVALID_TYPE: Cannot use: UiPlugin in this organization
[10:52:14.541] DEBUG (sf:oclif:ConnectionResolver): [UserProfileSearchScope] INVALID_TYPE: Unknown type:UserProfileSearchScope
[10:52:14.541] DEBUG (sf:oclif:ConnectionResolver): [XOrgHub] INVALID_TYPE: Unknown type:XOrgHub
[10:52:14.542] DEBUG (sf:oclif:ConnectionResolver): [VirtualVisitConfig] INVALID_TYPE: Cannot use: VirtualVisitConfig in this organization
[10:52:14.543] DEBUG (sf:oclif:ConnectionResolver): [WebStoreTemplate] INVALID_TYPE: Cannot use: WebStoreTemplate in this organization
[10:52:14.544] DEBUG (sf:oclif:ConnectionResolver): [ServiceProcess] INVALID_TYPE: Cannot use: ServiceProcess in this organization
[10:52:14.545] DEBUG (sf:oclif:ConnectionResolver): [WebStoreBundle] INVALID_TYPE: Cannot use: WebStoreBundle in this organization
[10:52:14.547] DEBUG (sf:oclif:ConnectionResolver): [UserAccessPolicy] INVALID_TYPE: Cannot use: UserAccessPolicy in this organization
[10:52:14.553] DEBUG (sf:oclif:ConnectionResolver): [StnryAssetEnvSrcCnfg] INVALID_TYPE: Cannot use: StnryAssetEnvSrcCnfg in this organization
[10:52:14.607] DEBUG (sf:oclif:ConnectionResolver): [AnalyticsWorkspace] INVALID_TYPE: Unknown type:AnalyticsWorkspace
[10:52:14.609] DEBUG (sf:oclif:ConnectionResolver): [ExtlClntAppPushConfigurablePolicies] INVALID_TYPE: Cannot use: ExtlClntAppPushConfigurablePolicies in this organization
[10:52:14.611] DEBUG (sf:oclif:ConnectionResolver): [AnalyticsVizViewDef] INVALID_TYPE: Unknown type:AnalyticsVizViewDef
[10:52:14.612] DEBUG (sf:oclif:ConnectionResolver): [AiEvaluationTestSet] INVALID_TYPE: Unknown type:AiEvaluationTestSet
[10:52:14.614] DEBUG (sf:oclif:ConnectionResolver): [AiEvaluationDefinition] INVALID_TYPE: Unknown type:AiEvaluationDefinition
[10:52:14.652] DEBUG (sf:oclif:ConnectionResolver): [AnalyticsVisualization] INVALID_TYPE: Unknown type:AnalyticsVisualization
Error (1): Maximum call stack size exceeded

*** Internal Diagnostic ***

SfCommandError [RangeError]: Maximum call stack size exceeded
    at SfCommandError.from (file:///~/.npm-global/lib/node_modules/@salesforce/cli/node_modules/@salesforce/sf-plugins-core/lib/SfCommandError.js:39:16)
    at ManifestGenerate.catch (file:///~/.npm-global/lib/node_modules/@salesforce/cli/node_modules/@salesforce/sf-plugins-core/lib/sfCommand.js:316:47)
    at ManifestGenerate._run (/~/.npm-global/lib/node_modules/@salesforce/cli/node_modules/@salesforce/sf-plugins-core/node_modules/@oclif/core/lib/command.js:316:29)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Config.runCommand (/~/.npm-global/lib/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/config/config.js:435:25)
    at async run (/~/.npm-global/lib/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/main.js:96:16)
    at async file:///~/.npm-global/lib/node_modules/@salesforce/cli/bin/run.js:15:1 {
  actions: undefined,
  exitCode: 1,
  context: 'ManifestGenerate',
  data: undefined,
  cause: RangeError: Maximum call stack size exceeded
      at sendIt (/~/.npm-global/lib/node_modules/@salesforce/cli/node_modules/@salesforce/source-deploy-retrieve/lib/src/resolve/connectionResolver.js:132:35)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async ConnectionResolver.sendBatchedRequests (/~/.npm-global/lib/node_modules/@salesforce/cli/node_modules/@salesforce/source-deploy-retrieve/lib/src/resolve/connectionResolver.js:156:17)
      at async ConnectionResolver.resolve (/~/.npm-global/lib/node_modules/@salesforce/cli/node_modules/@salesforce/source-deploy-retrieve/lib/src/resolve/connectionResolver.js:70:39)
      at async ComponentSet.fromConnection (/~/.npm-global/lib/node_modules/@salesforce/cli/node_modules/@salesforce/source-deploy-retrieve/lib/src/collections/componentSet.js:215:26)
      at async ComponentSetBuilder.build (/~/.npm-global/lib/node_modules/@salesforce/cli/node_modules/@salesforce/source-deploy-retrieve/lib/src/collections/componentSetBuilder.js:147:37)
      at async ManifestGenerate.run (file:///~/.npm-global/lib/node_modules/@salesforce/cli/node_modules/@salesforce/plugin-deploy-retrieve/lib/commands/project/generate/manifest.js:103:30)
      at async ManifestGenerate._run (/~/.npm-global/lib/node_modules/@salesforce/cli/node_modules/@salesforce/sf-plugins-core/node_modules/@oclif/core/lib/command.js:312:22)
      at async Config.runCommand (/~/.npm-global/lib/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/config/config.js:435:25)
      at async run (/~/.npm-global/lib/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/main.js:96:16),
  status: 1,
  commandName: 'ManifestGenerate',
  warnings: [],
  result: undefined,
  skipOclifErrorHandling: true,
  oclif: { exit: 1 }
}
******

@jakubmplatek
Copy link

Hi @gavignon ,
I've also hit this issue (have a case open with Support at the moment).
As a temporary workaround, I managed to get it to succeed by excluding metadata types in folders, as those are often the biggest lift when describing metadata in a large enterprise org.
Parameter I used: --excluded-metadata Dashboard,DashboardFolder,Document,DocumentFolder,Report,ReportFolder
Hope this helps

@cristiand391
Copy link
Member

hey @gavignon, sorry for the late reply.

I was expecting the logs to show at which type it got stuck on the recursive call but it doesn't.
Does @jakubmplatek's work for you? We've had multiple customers experience issues with types in folders.

@FCAADMIN
Copy link

Hi Team,

we are also facing same issue, which is impacting our retrieval activities. Could we get any update on this ?

Thanks,
Siva

@JaydeepGo
Copy link

Hi @gavignon

You can use Environment Variable SF_LIST_METADATA_BATCH_SIZE=10 to get around this error. This Environment Variable SF_LIST_METADATA_BATCH_SIZE allows you to set the number of concurrent requests to fetch the data.
You can try to configure the value based on your org size.

export SF_LIST_METADATA_BATCH_SIZE=5    // to set the value temporary.
echo $SF_LIST_METADATA_BATCH_SIZE     // to verify value is set properly

Article Info.
https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_project_commands_unified.htm#cli_reference_project_generate_manifest_unified

If the even lower values doesn’t work. You can try changing your node stack size to higher number.
export NODE_OPTIONS="--stack-size=100000"

@jakubmplatek
Copy link

FYI, we did test it with SF_LIST_METADATA_BATCH_SIZE=5 as part of troubleshooting our Support Case and it did not solve the issue.

@JaydeepGo
Copy link

@jakubmplatek Not sure about the test. Just curious if you run the command in same terminal session and verified if the value is being set properly. What about SF_LIST_METADATA_BATCH_SIZE=1 ?

If that doesn’t work you can try to increase the increase the node stack size to get around this isssue.

As there is support case already there, i will let them check further.

@iowillhoit
Copy link
Contributor

Hello all, like Cristian mentioned here they should also try excluding metadata that they know that they do not use in their orgs to reduce the number of API calls.
They can also include only the metadata they care about. See the release notes for more details

An example of exclude:
sf project generate manifest --from-org my-org --excluded-metadata StandardValueSet

Also, if they are using 2.77.6 or higher, we have added the ability of combining flags to make narrowing the desired metadata easier. Try using:
--metadata with --source-dir
--excluded-metadata with --source-dir

@iowillhoit iowillhoit added the bug Issue or pull request that identifies or fixes a bug label Feb 20, 2025
Copy link

git2gus bot commented Feb 20, 2025

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Issue or pull request that identifies or fixes a bug more information required Issue requires more information or a response from the customer validated Version information for this issue has been validated
Projects
None yet
Development

No branches or pull requests

6 participants