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

[MacOs] Error on task download (sometimes) #1440

Open
rfennell opened this issue Dec 13, 2022 · 2 comments
Open

[MacOs] Error on task download (sometimes) #1440

rfennell opened this issue Dec 13, 2022 · 2 comments

Comments

@rfennell
Copy link
Owner

Azure DevOps Extensions

WIKI PDF Generator

Platform

Azure DevOps Services

Azure DevOps Server (TFS) Version

All versions

Extension Version

No response

Describe the bug

On MacOs there is an intermittent error after downloading the exe

Starting download azuredevops-export-wiki-osx to /Users/runner/work/_temp
##[error]Forbidden
##[error]Forbidden
(node:1745) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, chmod '/Users/runner/work/_temp/azuredevops-export-wiki-osx'
Downloaded executable /Users/runner/work/_temp/azuredevops-export-wiki-osx
    at Object.chmodSync (fs.js:1027:3)
Set execute permission on executable /Users/runner/work/_temp/azuredevops-export-wiki-osx
    at /Users/runner/work/_tasks/WikiPdfExportTask_48d40d27-32e1-460e-8ea6-0dfb48abdd6f/2.6.2/ExportFunctions.js:135:20
    at Generator.next (<anonymous>)
    at fulfilled (/Users/runner/work/_tasks/WikiPdfExportTask_48d40d27-32e1-460e-8ea6-0dfb48abdd6f/2.6.2/ExportFunctions.js:5:58)
(node:1745) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:1745) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

This this the same as MaxMelcher/AzureDevOps.WikiPDFExport # 108

Repo Steps

  1. Run a pipeline that includes the task on a Mac
  2. On around 50% fail with the error

Note: never seen on other OS

Expected Behavior

Task should always run

Logging Information

No response

@rfennell
Copy link
Owner Author

WORKAROUND

I have seen this problem in my testing. It appears to be an issue with the MAC Agents being unable to download the PDF tool from GitHub, a retry usually fixes it.

The most reliable workaround is to place the azuredevops-export-wiki-osx MAC exe in your own repo and avoid the need to download it from GitHub each time.

FYI: I can't ship the EXE within the Azure DevOps task as it makes the package too big

@rfennell
Copy link
Owner Author

We think it's getting a HTTP 403, and not actually downloading it

On the ones that worked, 'Download done' is printed out, but the one that didn't got a 'Forbidden'

AzurePipelines/ExportFunctions.ts at 63bf38c4df02d85966db708864158f63635b1a12 · rfennell/AzurePipelines · GitHub

has a .catch() without a re-throw, so it'll continue on without actually stopping

Doesn't help at all explain why it's getting a forbidden at all, or why it'd be intermittent... which makes no real sense

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

No branches or pull requests

1 participant