4
votes

we are using the VSTS task "Publish Artifact". Recently it started to randomly give an error:

Publishing build artifacts failed with an error: Unable to create directory. EEXIST: file already exists.

This happens when the task is about to create the directory where to publish.

Here are some of the logs

logs for Publish Artifact

1
Welcome to stack overflow! I removed the "Thanks" at the end. That may come over a bit awkward. It's because of the Q&A format used at stack overflow. For more information read this: meta.stackoverflow.com/a/288179/736079 - jessehouwing

1 Answers

1
votes

To troubleshooting the issue, you can check with below aspects:

  1. Check if the share path is accessible

    You can manually access to \\appbld\C$\WDX\PublishArtifacts\Build Trunk to check if you can access.

  2. Check if the write permission is allow

    Check the Write permission for the share path is allowed or not.

  3. Check if the private agent run as the account when login the agent machine (if the agent run as service)

    Services App -> select the vsts agent service for the private agent -> properties -> Log On Tab -> check if the account same as you login the agent machine.

    enter image description here