Bitbucket self-hosted runner failing
Asked by ThankGod Busari:

When I try to launch my self-hosted runner using:

.\\start.ps1 -accountUuid '{}' -repositoryUuid '{}' -runnerUuid '{}' -OAuthClientId -OAuthClientSecret -workingDirectory '..\\temp' with my secret token and ID provided. I get these errors:

Exception in thread "main" java.nio.file.InvalidPathException: Illegal char \<"\> at index 0: "C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath  
at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)  
at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)  
at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)  
at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)  
at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:232)  
at java.base/java.nio.file.Path.of(Path.java:147)  
at com.atlassian.pipelines.runner.core.runtime.windows.WindowsRuntimeSetup.lambda$setup$0(WindowsRuntimeSetup.java:48)  
at io.reactivex.internal.operators.completable.CompletableFromRunnable.subscribeActual(CompletableFromRunnable.java:36)  
at io.reactivex.Completable.subscribe(Completable.java:2309)  
at io.reactivex.internal.operators.mixed.CompletableAndThenObservable.subscribeActual(CompletableAndThenObservable.java:45)  
at io.reactivex.Observable.subscribe(Observable.java:12284)  
at io.reactivex.internal.operators.observable.ObservableFlatMapCompletableCompletable.subscribeActual(ObservableFlatMapCompletableCompletable.java:49)  
at io.reactivex.Completable.subscribe(Completable.java:2309)  
at io.reactivex.Completable.blockingAwait(Completable.java:1226)  
at com.atlassian.pipelines.runner.core.ApplicationImpl.main(ApplicationImpl.java:55)  
\[2022-05-30 13:57:05,793\] Updating runner state to "OFFLINE".


Answers:
author: Patrik S
body: Hello [@ThankGod Busari](/t5/user/viewprofilepage/user-id/4951273) ,

Welcome to Atlassian Community!

I tried to simulate the error in my own instance but the runner started successfully. In this case, could you please make sure you are using the latest version of the Windows Runners?

To make sure you are using the latest runner version, you can either create a new runner, so you will be provided with the updated link, or download/unzip it using the link below :

```
# download the runner zip

Invoke-WebRequest -Uri https://product-downloads.atlassian.com/software/bitbucket/pipelines/atlassian-bitbucket-pipelines-runner-1.323.zip -OutFile .\atlassian-bitbucket-pipelines-runner.zip

# unzip the file
Expand-Archive .\atlassian-bitbucket-pipelines-runner.zip

cd .\atlassian-bitbucket-pipelines-runner\bin

```

Window runner version 1.323 is the latest version available by the time I write this message.

If you choose to download the above, you can use the same ./start.ps1 command you were using, but inside the newly downloaded runner folder, and check how it goes.

In case after downloading the latest version you are still facing the issue, could you please make sure your current environment meets all the prerequisites below to use Windows runners :

* A 64-Bit Windows 10+ or Windows Server 2019+ instance with at least 8GB of RAM as a host for the runner

* [Allow unsigned scripts to run in PowerShell](https://support.atlassian.com/bitbucket-cloud/docs/set-up-runners-for-windows/#Allow-unsigned-scripts-to-run-in-PowerShell)

* [Disable the Windows pagefile and swapfile](https://support.atlassian.com/bitbucket-cloud/docs/set-up-runners-for-windows/#Disable-the-Windows-pagefile-and-swapfile) (optional, recommended)

* The following applications are installed:

  * OpenJDK 11 (11.0.15 or newer)

  * Git

  * PowerShell 5.0+

More details about the prerequisites are outlined in the following documentation :

* <https://support.atlassian.com/bitbucket-cloud/docs/set-up-runners-for-windows/>

Hope that helps! Let me know if you run into any issues or have further questions.

Thank you, [@ThankGod Busari](/t5/user/viewprofilepage/user-id/4951273) .

Kind regards,

Patrik S

comments: author: ThankGod Busari
body: Thank you [@Patrik S](/t5/user/viewprofilepage/user-id/4603309) , the error was because of my system variables path. I had to remove the conflicting path. It's working now.


Tags: bitbucket-cloud

cloud