Step was cancelled

I don’t know if this solves your issue, but in case it helps others…

I was having intermittent problems that I was blaming on “Step was cancelled” messages. It turns out that’s a product of timing…

My behat test would fail because it couldn’t find anything serving on the correct port, so when I looked back at the step to start the local server, I saw “Step was cancelled”. But that’s because the build was already over, and once a build ends all background processes are stopped. In reality behat was failing because the step to run it started before my background process was ready to receive requests.

My solution was to use Dockerize to wait for the server to be ready before moving on the the next step.

This might not be the solution you need, but it may be for others brought here by Google, as I was. Props to @FelicianoTech for helping me get my solution.

2 Likes