sfdx-hardis
sfdx-hardis copied to clipboard
Running into maximum call stack size exceeded error
Greetings!
I have been used SFDX-Hardis for some time to run the Legacy API checking and I love this feature :) However, when I ran this today, and a week ago, I kept running into an issue "Running into maximum call stack size exceeded"
I believe this was caused by the sheer amount of API calls in the SF orgs. Any suggestions on how to get around this?
Thanks, Guan
Hi @guan-tay , thanks for your support and for reporting the issue :)
Please can you :
-
run the same command with --debug argument and share the log here ?
-
Also running with --dev-debug would provide a huge log but be eventually helpful :)
thanks @nvuillam for the suggestion! However, i was using the one click button to run the command, so not sure how to add the -debug argument in the part where it calling org API to get the CSV Content of each evenlogfile record
In the terminal, type on the up arrow of your keyboard, it will bring back previously run command
Then add --debug at the end, then type enter and you're good to go :)
not sure if this help, here are the results i received from the --dev-debug
let me know if you need other details :) thanks!
Thanks for the details ! There is a default limit to 999, but it's probably too much
Please can you try to run the command with --limit 200
?
( and if it does not work, try --limit 100
or event --limit 50
, but anyway it will require an update to make the command able to process all the logs undepending their number )
thanks for the suggestion @nvuillam !
I did another try and run using limit 50,
I still run into the same error. Maybe it was because the retrieved content was too big?
That's really strange... we'll try to have a look :/
Hi @nvuillam I am also getting the same error message and tried --limit 10. Any suggestion on how this can be fixed?
@guan-tay @talibraza do one of you have some Typescript expertise ?
I can't reproduce the issue, but it has to be reproduced to be debugged
Info to do that -> https://github.com/hardisgroupcom/sfdx-hardis#contributing
Then put a breakpoint in legacyapi.ts -> https://github.com/hardisgroupcom/sfdx-hardis/blob/main/src/commands/hardis/org/diagnose/legacyapi.ts
Then run NODE__OPTIONS=--inspect-brk sfdx hardis:org:diagnose:legacyapi
And see from where is this max call stack