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

ERROR running force:mdapi:convert: Maximum call stack size exceeded #1699

Closed
tsofindavid opened this issue Sep 5, 2022 · 4 comments
Closed
Labels
bug Issue or pull request that identifies or fixes a bug logger-replacement

Comments

@tsofindavid
Copy link

tsofindavid commented Sep 5, 2022

Summary

I'm using sfdx to convert mdapi to source format.

Steps To Reproduce:

1.Clone test source data here https://github.com/tsofindavid/sfdx-issue/tree/main.
2.Run sfdx force:mdapi:convert --dev-debug -r ./path_to_sourceFolder

Expected result

Successfully result without error.

Actual result

ERROR running force:mdapi:convert: Maximum call stack size exceeded

Additional information

This problem not reproduce on OS Windows.

System Information

  • Linux(ubuntu) terminal.
  • SFDX Verssion: sfdx-cli/7.166.1 linux-x64 node-v16.15.0

image
image
image

@tsofindavid tsofindavid added the investigating We're actively investigating this issue label Sep 5, 2022
@github-actions
Copy link

github-actions bot commented Sep 5, 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.

@tsofindavid
Copy link
Author

I understood what the problem is. You have the SWITCH module to enable debug logs. And this module, if the command has --dev-debug, will set env DEBUG = "". In my case I am using sfdx-cli in child process and my server app has the same node-debug module and I am using the same env DEBUG="my-app" value. As a result, we only got my logs, because the DEBUG value has my key, but sfdx started sending logs like this { sfdx force:mdapi:convert } &> /dev/null. And that's okay. But now I have disabled all debug logs in my application and this is a very bad case.

@RodEsp RodEsp changed the title force:mdapi:convert ERROR running force:mdapi:convert: Maximum call stack size exceeded Sep 9, 2022
@shetzel shetzel added bug Issue or pull request that identifies or fixes a bug and removed investigating We're actively investigating this issue labels Oct 19, 2022
@git2gus
Copy link

git2gus bot commented Oct 19, 2022

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

@cristiand391
Copy link
Member

Hey, sorry for the late reply 👋🏼

I remember seeing this with another command, I haven't reproduced with force:mdapi:convert from the logs it's seems it's the same cause:

the base command class used in the sfdx commands tries to pass a huge array to node-bunyan which then crashes:

https://github.com/salesforcecli/command/blob/main/src/ux.ts#L317
https://github.com/trentm/node-bunyan/blob/master/lib/bunyan.js#L1036

Over the coming weeks there will be some improvements to the CLI which might fix this so I'll leave the issue open until I can test it.

See: https://developer.salesforce.com/blogs/2022/12/big-improvements-coming-to-the-salesforce-cli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue or pull request that identifies or fixes a bug logger-replacement
Projects
None yet
Development

No branches or pull requests

4 participants