EMFILE error when trying to push source changes
Summary
When trying to deploy a project (possibly due to it being large), I get an EMFILE error. The deployment however completes successfully in the org.
Steps To Reproduce:
Repository to reproduce: Can't reproduce in dreamhouse-lwc, but any large project should do (mine pushes 8797 components)
- Create a scratch org.
- Run
sfdx force:source:push -f
Expected result
Deployment to have finished with no errors in the cli's output and a list of the deployment changes to be printed out.
Actual result
nicolaskadis$ sfdx force:source:push -f
*** Pushing v49.0 metadata with SOAP API v54.0 connection ***
DEPLOY PROGRESS | ████████████████████████████████████████ | 8797/8797 Components
Error: spawn /usr/bin/security EMFILE
at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:478:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -24,
code: 'EMFILE',
syscall: 'spawn /usr/bin/security',
path: '/usr/bin/security',
spawnargs: [ 'find-generic-password', '-a', 'local', '-s', 'sfdx', '-g' ]
}
Error: spawn /usr/bin/security EMFILE
at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:478:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -24,
code: 'EMFILE',
syscall: 'spawn /usr/bin/security',
path: '/usr/bin/security',
spawnargs: [ 'find-generic-password', '-a', 'local', '-s', 'sfdx', '-g' ]
}
Error: spawn /usr/bin/security EMFILE
at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:478:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -24,
code: 'EMFILE',
syscall: 'spawn /usr/bin/security',
path: '/usr/bin/security',
spawnargs: [ 'find-generic-password', '-a', 'local', '-s', 'sfdx', '-g' ]
}
Error: spawn /usr/bin/security EMFILE
at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:478:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -24,
code: 'EMFILE',
syscall: 'spawn /usr/bin/security',
path: '/usr/bin/security',
spawnargs: [ 'find-generic-password', '-a', 'local', '-s', 'sfdx', '-g' ]
}
Error: spawn /usr/bin/security EMFILE
at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:478:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -24,
code: 'EMFILE',
syscall: 'spawn /usr/bin/security',
path: '/usr/bin/security',
spawnargs: [ 'find-generic-password', '-a', 'local', '-s', 'sfdx', '-g' ]
}
ERROR running force:source:push: There are multiple errors that were thrown by the method. Please refer to the "errors" property to see more
Updating source tracking... done
System Information
nicolaskadis$ sfdx version --verbose --json
{
"cliVersion": "sfdx-cli/7.152.0",
"architecture": "darwin-x64",
"nodeVersion": "node-v16.15.0",
"pluginVersions": [
"@oclif/plugin-autocomplete 0.3.0 (core)",
"@oclif/plugin-commands 1.3.0 (core)",
"@oclif/plugin-not-found 1.2.6 (core)",
"@oclif/plugin-plugins 1.10.11 (core)",
"@oclif/plugin-update 1.5.0 (core)",
"@oclif/plugin-which 1.0.4 (core)",
"@salesforce/lwc-dev-server 2.11.0",
"@salesforce/sfdx-plugin-lwc-test 0.1.7 (core)",
"@salesforce/sfdx-scanner 2.13.4",
"alias 2.0.0 (core)",
"apex 0.12.0 (core)",
"auth 2.0.2 (core)",
"community 1.1.4 (core)",
"config 1.4.6 (core)",
"custom-metadata 1.1.0 (core)",
"data 2.0.0 (core)",
"generator 2.0.1 (core)",
"info 2.0.0 (core)",
"limits 2.0.0 (core)",
"org 1.13.1 (core)",
"salesforce-alm 54.4.0 (core)",
"schema 2.1.0 (core)",
"sfdx-cli 7.152.0 (core)",
"signups 1.1.1 (core)",
"source 1.9.9 (core)",
"telemetry 2.0.0 (core)",
"templates 54.7.0 (core)",
"trust 1.1.0 (core)",
"user 2.0.0 (core)"
],
"osVersion": "Darwin 21.4.0"
}
Additional information
Workaround: Use sfdx force:source:legacy:push -f or downgrade cli to version 7.149.1
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.