Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnauthorizedAccessException when running on Linux #3

Open
jmezach opened this issue Sep 16, 2020 · 0 comments
Open

UnauthorizedAccessException when running on Linux #3

jmezach opened this issue Sep 16, 2020 · 0 comments

Comments

@jmezach
Copy link

jmezach commented Sep 16, 2020

I recently tried running this module on a hosted Linux agent and the good news is that it works, almost. I'm getting an UnauthorizedAccessException: Access to the path '/' is denied. The exception makes sense of course, but the question is why it is writing things to root. I had a look at the logs and this is what I'm seeing:

VERBOSE: received 390-byte response of content type application/json
VERBOSE: Received <redacted>
VERBOSE: Creating output folder: '/home/vsts/work/_temp/TestResults'
VERBOSE: GET https://dev.azure.com/<org>/<team-project>/_apis/test/Runs/1594766/attachments?api-version=5.0-preview.1 with 0-byte payload
VERBOSE: received 389-byte response of content type application/json
VERBOSE: Received <redacted>
VERBOSE: Downloading 'https://dev.azure.com/<org>/<team-project>/_apis/test/Runs/1594766/Attachments/1' to '/home/vsts/work/_temp/TestResults/_fv-az104_2020-09-16_09_45_15.trx'
VERBOSE: GET https://dev.azure.com/<org>/<team-project>/_apis/test/Runs/1594766/Attachments/1 with 0-byte payload
VERBOSE: received -byte response of content type application/octet-stream
VERBOSE: Downloading TRX: _fv-az104_2020-09-16_09_45_15.trx
VERBOSE: Configuring TRX folder: /home/vsts/work/_temp/TestResults/_fv-az104_2020-09-16_09_45_15
VERBOSE: Processing attachments
VERBOSE: fv-az104/coverage.cobertura.xml  => fv-az104
VERBOSE: The file 'coverage.cobertura.xml' will be stored at '/home/vsts/work/_temp/TestResults/_fv-az104_2020-09-16_09_45_15/In/fv-az104'
VERBOSE: Creating output location: '/home/vsts/work/_temp/TestResults/_fv-az104_2020-09-16_09_45_15/In/fv-az104'
VERBOSE: Downloading coverage.cobertura.xml
VERBOSE: Writing coverage.cobertura.xml to /
VERBOSE: Downloading 'https://dev.azure.com/<org>/<team-project>/_apis/test/Runs/1594766/Attachments/3' to '/'
VERBOSE: GET https://dev.azure.com/<org>/<team-project>/_apis/test/Runs/1594766/Attachments/3 with 0-byte payload
VERBOSE: received -byte response of content type application/octet-stream
VERBOSE: System.UnauthorizedAccessException: Access to the path '/' is denied.

Looking at the code it seems that this is where things started to go wrong. For some reason the targetLocations variable there doesn't have a value, causing the output folder to be /. Haven't managed to dig any deeper than that. Running the exact same thing works as expected on Windows, so it's probably a silly platform specific thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant