Closed ecraig12345 closed 2 years ago
YarnInstaller intermittently fails with ##[error]Unexpected token < in JSON at position 0
YarnInstaller
##[error]Unexpected token < in JSON at position 0
Example build with failure
The failure is not at all consistent, but it seems to disappear for weeks at a time and then come back (but still only intermittently).
The task either succeeds, or fails with a meaningful error.
Task configuration (found in this template file):
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3 displayName: 'Use Yarn 1.19.x' inputs: versionSpec: 1.19.x checkLatest: true includePrerelease: false
Overall pipeline yaml
Pipeline in ADO
Unfortunately, the failure is infrequent/random enough that we'd have to leave System.Debug enabled for a few hours or days, which is probably not feasible.
System.Debug
My guess is that the culprit is these lines, and that the server at https://publicblobs.geeklearning.io/yarn/tarballsV2.json is occasionally returning an HTML error page which obviously can't be parsed as JSON. https://github.com/geeklearningio/gl-vsts-tasks-yarn/blob/35fe5acf94d51c414c3395bd633805e65093e711/Tasks/YarnInstaller/yarnToolInstallerTask.ts#L13-L18
https://publicblobs.geeklearning.io/yarn/tarballsV2.json
VSTS or TFS:
Agent:
OS:
Yarn version: 1.19.x
Node version: 12.18.4
see #103
Are you reporting a bug or a feature request ?
Description
YarnInstaller
intermittently fails with##[error]Unexpected token < in JSON at position 0
Example build with failure
The failure is not at all consistent, but it seems to disappear for weeks at a time and then come back (but still only intermittently).
Expected behavior
The task either succeeds, or fails with a meaningful error.
Reproduction
Task configuration (found in this template file):
Overall pipeline yaml
Pipeline in ADO
Unfortunately, the failure is infrequent/random enough that we'd have to leave
System.Debug
enabled for a few hours or days, which is probably not feasible.My guess is that the culprit is these lines, and that the server at
https://publicblobs.geeklearning.io/yarn/tarballsV2.json
is occasionally returning an HTML error page which obviously can't be parsed as JSON. https://github.com/geeklearningio/gl-vsts-tasks-yarn/blob/35fe5acf94d51c414c3395bd633805e65093e711/Tasks/YarnInstaller/yarnToolInstallerTask.ts#L13-L18System information
VSTS or TFS:
Agent:
OS:
Yarn version: 1.19.x
Node version: 12.18.4