Bitbucket Cloud Pipeline Error about Found Character That Cannot Start Any Token

Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.

Summary

When trying to trigger a pipeline in Bitbucket Cloud, the pipeline build failed with the following error message:

(Auto-migrated image: description temporarily unavailable)

Cause

This error typically occurs due to the presence of tab indentation in your bitbucket-pipelines.yml.

Solution

This can be verified and corrected by following these steps:

  1. Locate the specific line mentioned in the pipeline error message (e.g., "line 22" as per the above screenshot).

    (Auto-migrated image: description temporarily unavailable)
  2. In the provided sample pipeline, find the line with an indentation issue, usually starting with "script:".

  3. Place your cursor at the beginning of the indented line.

Next, carefully remove the unwanted tab indentation:

  • Press the "Delete" or "Backspace" key until the line is aligned with the previous line, removing the tab indentation.

    (Auto-migrated image: description temporarily unavailable)

    (Auto-migrated image: description temporarily unavailable)

    (Auto-migrated image: description temporarily unavailable)

    (Auto-migrated image: description temporarily unavailable)
  • Repeat this process for any additional levels of indentation until the warning messages are completely resolved.

After performing these steps, the pipeline should run without any indentation-related errors. This correction ensures that the pipeline configuration follows the correct syntax and alignment, allowing it to execute successfully.

If you are encountering issues following this documentation - please raisesupport ticket or a community support ticket for further assistance.

Updated on April 24, 2025

Still need help?

The Atlassian Community is here for you.