CLI Troubleshooting

Updated 7 months ago by Copado Solutions

When working with the CLI, there are some errors you may occasionally encounter. In this article, we will identify the most common errors and help you easily resolve them.

No flags found!

This is a very common error and can be returned when executing different commands. A command flag is the value that goes after the - sign. If the CLI cannot find the value you have specified, or if no value is given, this error will be displayed. If you are looking for information about the command, use -h.


[COPADO\usrname@a-4ptr6q8misipn CGCLI_DX]$ sfdx copado:auth:display
ERROR running copado:auth:display:  SfdxError: Copado user is not set. Please execute: copado:auth:set to setup Copado CLI

This error can be displayed when executing the sfdx copado:auth:display command. What this error is telling you is that no username has been configured yet to work with the Copado CLI. Use sfdx copado:auth:set -u [userdev@mycompany.com] to set up the username you want to use to work with the CLI.


No args specified

This error can be displayed when working with the sfdx copado:config:set command. An argument is a key-value pair, and you always have to define one, e.g. sfdx copado:config:set externalid=[Jira_External_Id__c]. In this example, the argument is externalid=[Jira_External_Id__c]. If you don’t specify any arguments, you will receive this error message.


COPADO\usrname@a-4ptr6q8misipn CGCLI_DX]$ sfdx copado:work:display
ERROR running copado:work:display:  Copado user story is not set. Please execute: copado:work:set to setup Copado User Story

The command sfdx copado:work:display is used to display information about the user story you are working with through the CLI. You will receive this error if you are trying to execute this command but have not set up a user story yet.


[COPADO\usrname@a-4ptr6q8misipn CGCLI_DX]$ sfdx copado:work:display -s US-0019429
ERROR running copado:work:display:  No results US-0019429

This error will be displayed if you are using the command sfdx copado:work:display -s [user story name] to look for a particular user story and that user story is not found.


COPADO\\usrname@a-4ptr6q8misipn CGCLI_DX]$ sfdx copado:work:list -l myListview
No listview with name myListview

This error will be displayed if the list view you have specified in the command cannot be found.


COPADO\\usrname@a-4ptr6q8misipn CGCLI_DX]$ sfdx copado:work:display
ERROR running copado:work:open:  Copado user story is not set. Please execute: copado:work:set to setup Copado User Story.

You will receive this error if you are using the command sfdx copado:work:open but you have not set up a user story to work with yet.


COPADO\\usrname@a-4ptr6q8misipn CGCLI_DX]$ sfdx copado:work:display
ERROR running copado:work:push:  Copado user story is not set. Please execute: copado:work:set to setup Copado User Story

This error is displayed if you use the push command but you have not set up a user story yet.


[COPADO\\usrname@a-4ptr6q8misipn CGCLI_DX]$ sfdx copado:work:push
You have commits unpushed, Do you want Copado CLI push pending commits? (y/n) : y
To github.com:carlosabella/CGCLI_DX.gi
! [rejected]        feature/US-0019430 -> feature/US-0019430 (fetch first)
error: failed to push some refs to 'git@github.com:carlosabella/CGCLI_DX.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

You can get this message when executing a push command if the branch has not been updated. What you have locally and what you have in remote is not the same. To solve this issue, do a pull first and then execute the push command again.

Check both the feature branch and the environment branch as the error might be in the environment branch, and you may need to do the changes in that branch and not in the feature branch.


How did we do?