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:

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:
Locate the specific line mentioned in the pipeline error message (e.g., "line 22" as per the above screenshot).
In the provided sample pipeline, find the line with an indentation issue, usually starting with "script:".
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.
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 raise a support ticket or a community support ticket for further assistance.
Was this helpful?