Argument list too long when logs encounter large output
See original GitHub issueDescribe the bug
Multiple GitHub-provided actions are failing in their post-run steps due to an Argument list too long
error.
To Reproduce
- Initiate the following workflow provided below from a user of my action. This workflow will fetch data from an API and save it as a JSON file so subsequent steps can do something with it. The action is not saving it as an environment variable, just a json file through Nodes
fs.writeFile
function.
name: Refresh Feed
on:
workflow_dispatch:
jobs:
refresh-feed:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Fetch API Data 📦
uses: JamesIves/fetch-api-data-action@releases/v2
with:
endpoint: https://api.scryfall.com/catalog/card-names
configuration: '{ "method": "GET" }'
save-location: assets
save-name: test
set-output: false
- You will get the following runner-related error. The same will occur if
set-output
is true in thefetch-api-data
step as that makes the action save it as an environment variable:An error occurred trying to start process '/home/runner/runners/2.288.1/externals/node16/bin/node' with working directory '/home/runner/work/project/project'. Argument list too long
.
Having looked at this briefly I suspect this is occurring as there’s some degree of logging that occurs behind the scenes that are causing the argument list to overflow. If you toggle ACTIONS_STEP_DEBUG
to true in the secrets menu you see this. The data parsed is large but I’m not really sure why this would be a problem.
Expected behavior
I am not really sure. If this is indeed the runner causing this due to logging I would expect there to be some form of fail-safe to prevent it from crashing.
Runner Version and Platform
- ubuntu-latest
What’s not working?
An error occurred trying to start process '/home/runner/runners/2.288.1/externals/node16/bin/node' with working directory '/home/runner/work/project/project'. Argument list too long
.
Job Log Output
##[debug]Evaluating condition for step: 'Post Checkout 🛎️'
##[debug]Evaluating: always()
##[debug]Evaluating always:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Post Checkout 🛎️
##[debug]Loading inputs
##[debug]Evaluating: github.repository
##[debug]Evaluating Index:
##[debug]..Evaluating github:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'repository'
##[debug]=> 'JamesIves/reddit-viewer'
##[debug]Result: 'JamesIves/reddit-viewer'
##[debug]Evaluating: github.token
##[debug]Evaluating Index:
##[debug]..Evaluating github:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'token'
##[debug]=> '***'
##[debug]Result: '***'
##[debug]Loading env
Post job cleanup.
Error: An error occurred trying to start process '/home/runner/runners/[2](https://github.com/JamesIves/reddit-viewer/runs/5440253729?check_suite_focus=true#step:8:2).288.1/externals/node16/bin/node' with working directory '/home/runner/work/reddit-viewer/reddit-viewer'. Argument list too long
##[debug]System.ComponentModel.Win[3](https://github.com/JamesIves/reddit-viewer/runs/5440253729?check_suite_focus=true#step:8:3)2Exception (7): An error occurred trying to start process '/home/runner/runners/2.288.1/externals/node1[6](https://github.com/JamesIves/reddit-viewer/runs/5440253729?check_suite_focus=true#step:8:6)/bin/node' with working directory '/home/runner/work/reddit-viewer/reddit-viewer'. Argument list too long
##[debug] at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt[32](https://github.com/JamesIves/reddit-viewer/runs/5440253729?check_suite_focus=true#step:8:32) userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
##[debug] at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
##[debug] at System.Diagnostics.Process.Start()
##[debug] at GitHub.Runner.Sdk.ProcessInvoker.ExecuteAsync(String workingDirectory, String fileName, String arguments, IDictionary`2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, Channel`1 redirectStandardIn, Boolean inheritConsoleHandler, Boolean keepStandardInOpen, Boolean highPriorityProcess, CancellationToken cancellationToken)
##[debug] at GitHub.Runner.Common.ProcessInvokerWrapper.ExecuteAsync(String workingDirectory, String fileName, String arguments, IDictionary`2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, Channel`1 redirectStandardIn, Boolean inheritConsoleHandler, Boolean keepStandardInOpen, Boolean highPriorityProcess, CancellationToken cancellationToken)
##[debug] at GitHub.Runner.Worker.Handlers.DefaultStepHost.ExecuteAsync(String workingDirectory, String fileName, String arguments, IDictionary`2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, Boolean inheritConsoleHandler, CancellationToken cancellationToken)
##[debug] at GitHub.Runner.Worker.Handlers.NodeScriptActionHandler.RunAsync(ActionRunStage stage)
##[debug] at GitHub.Runner.Worker.ActionRunner.RunAsync()
##[debug] at GitHub.Runner.Worker.StepsRunner.RunStepAsync(IStep step, CancellationToken jobCancellationToken)
##[debug]Finishing: Post Checkout 🛎️
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:11
Top GitHub Comments
I am also getting the
Argument list too long
error when trying to work with a larger (~ 7k characters) terraform plan output between multiple steps in my workflow.In case it’s helpful to anyone else that runs into this, I ran into this error with post-run steps, and it was because I had an environment variable set in
$GITHUB_ENV
that was too large (in my case a diff for kubernetes changes). Removing that env variable fixed the issue for me.