Skip to main content
All CollectionsKnowledge BaseGeneral issues
Workflow runs on Bitrise but fails locally
Workflow runs on Bitrise but fails locally
Updated over 5 months ago

Issue:

My Workflow works on Bitrise, but running the same Workflow with Bitrise CLI on my local machine fails.

Neither NewVersionCode nor NewVersionName are provided, however one of them is required.

Possible solutions:

Most probably an Environment Variable is missing.

Some Bitrise Env Vars are only available when running on Bitrise virtual machines, such as:

$BITRISE_BUILD_NUMBER
$BITRISE_BUILD_SLUG
$BITRISE_GIT_MESSAGE

These Env Vars are not defined when running workflow locally via Bitrise CLI. Make sure your Steps don't contain these Env Vars as inputs.

If you want to keep using these Env Vars on Bitrise and make the Workflow work locally too, we recommend using a template expression that assigns different values to the Step input in the two environments:

- script:
  title: Template example
  inputs:
  - content: |-
    ##{{if .IsCI}}
    echo "CI mode"
    ##{{else}}
    echo "not CI mode"
    ##{{end}}
    opts:
      is_template: true
Did this answer your question?