Bitbucket pipelines on Windows runners fail with the error message 'The string is missing the terminator' at C:<runners-path>

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

Summary

At times, the Windows pipeline runners build may encounter a failure with the error message:

Pipeline Output Error

1 2 3 4 5 6 At C:\Username\temp'\mno\xyz\tmp\wrapperScript13abc.ps1:5 char:282 + ... \bin\..\temp'\mno\xyz\tmp\ ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The string is missing the terminator: '. + CategoryInfo : ParserError: ( [], ParentContainsErrorRecordException + FullyQualifiedErrorId : TerminatorExpectedAtEndOfString

Cause

The error message 'The string is missing the terminator' indicates that the terminator of a string is not correctly specified in the configured or installed runners' path. In this case, an extra single quote was mistakenly added after 'temp' in the runners' path, resulting in temp' instead of temp.

Runners Script Path

1 C:\Username\temp'\mno\xyz\tmp\wrapperScript13abc.ps1

This suggests that the single quote should have been properly terminated at the end of the path string, leading to the error message. However, it seems that the single quote after 'temp' was added mistakenly while starting the runners. The 'start.ps1' command ends with the working directory path value '..\temp' enclosed in single quotes.

Runners start script command

1 \start.ps1 -accountUuid '{abc}' -repositoryUuid '{egg}' -runnerUuid '{hij}' -OAuthClientId leno -OAuthClientSecret pers -workingDirectory '..\temp'

If someone forgets to add the single quote at the start of the working directory path but leaves the single quote at the end of the path (i.e., '\temp'), this creates a 'temp'' folder with a trailing single quote.

Runners start script command

1 \start.ps1 -accountUuid '{abc}' -repositoryUuid '{egg}' -runnerUuid '{hij}' -OAuthClientId leno -OAuthClientSecret pers -workingDirectory abc\temp'

Solution

To resolve the issue, replace temp' with the correct string temp in the runners start script command and restart the runners which should fix the problem.

Runners start script command

1 \start.ps1 -accountUuid '{abc}' -repositoryUuid '{egg}' -runnerUuid '{hij}' -OAuthClientId leno -OAuthClientSecret pers -workingDirectory 'abc\temp'
Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.