forcedotcom / forcedotcom/cli

Salesforce deployment using sf command in Github workflow fails with error message : The user aborted a request.

Open
#3,384 16 comments 0 reactions 0 assignees View on GitHub
investigating validated
Dominant language
No language data
Stars
571
Forks
80
Avg merge
2d 15h
Merged PRs (30d)
3

Description

Summary
**IMP** This is an intermittent issue
I have a Github Workflow that deploys a branch in Github to Salesforce and during deployment it fails with error message "The user aborted a request."

### Steps To Reproduce
I am using below steps this workflow:

- name: Install Salesforce CLI
run: |
mkdir -p ~/sf
wget https://developer.salesforce.com/media/salesforce-cli/sf/channels/stable/sf-linux-x64.tar.xz
tar xJf sf-linux-x64.tar.xz -C ~/sf --strip-components 1
echo "$HOME/sf/bin" >> $GITHUB_PATH
~/sf/bin/sf --version

- name: Authenticate to Salesforce DevelopDev Sandbox
run: |
echo "${{ secrets.SERVER_KEY }}" > server.key
sf org login jwt \
--username ${{ secrets.DEPLOYMENT_USERNAME }} \
--jwt-key-file server.key \
--client-id ${{ secrets.CONSUMER_KEY }} \
--instance-url ${{ vars.INSTANCE_URL }} \
--set-default \
--alias DevSandbox

- name: Deploy and run Apex tests (verbose, wait up to 5 hours for job to finish)
run: |
sf project deploy start \
--source-dir force-app \
--target-org DevSandbox \
--test-level RunLocalTests \
--ignore-conflicts \
--ignore-warnings \
--wait 300 \
--verbose

### Expected result
The deployment should initiate by deploying develop branch to salesforce sandbox.

### Actual result
Authentication is successful but it takes 22 minutes to authenticate against a sandbox and then the deployment never gets initiated in Salesforce and the deployment fails with error message "The user aborted a request."
This issue is intermittent and does not happen all the times.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.