"Unexpected argument(s): flavor" Error in CircleCI When Using Pipeline Parameters

I’m encountering an issue with a simple pipeline configuration in CircleCI. I’m trying to pass a parameter called flavor to my job, but I keep receiving the error: “Unexpected argument(s): flavor.”

Here’s the relevant part of my config.yml:

version: 2.1

parameters:
  flavor:
    type: string
    default: "defaultRelease"

executors:
  android-executor:
    docker:
      - image: cimg/android:2024.08
    working_directory: ~/code

jobs:
  build:
    executor: android-executor
    steps:
      - checkout
      - run:
          name: Show Parameter
          command: echo "<< pipeline.parameters.flavor >>"

workflows:
  build_deploy:
    jobs:
      - build:
          filters:
            branches:
              ignore: /.*/
            tags:
              only: /.*/

Despite following the documentation, I keep running into this error. I have tried several variations, including adding quotes, changing the syntax for parameter usage, and isolating the issue by simplifying the config, but the problem persists.

Additionally, I’m making a curl request to trigger the pipeline:

curl -X POST https://circleci.com/api/v2/project/bitbucket/test-poc-deploy/sample_app/pipeline \
     -H "Circle-Token: [YOUR_CIRCLECI_TOKEN]" \
     -H "Content-Type: application/json" \
     -d '{
           "tag": "v1.0",
           "parameters": {
             "flavor": "clientRelease"
           }
         }'

Could this be related to a specific configuration or a version issue with CircleCI? Has anyone else encountered this and found a solution?

Any insights or guidance would be greatly appreciated!

Thank you!

Can you try switching << pipeline.parameters.flavor >> to << parameters.flavor >>

Maybe it will not work for you but i believe you should define your parameter in your workflows with flavor: <<pipeline.parameters.flavor >> and then call it in your echo with <<parameters.flavor>>

The first one will get the parameter you define at circleCI level and pass it to the local parameter you call in your echo :slight_smile: