azure-pipelines-tasks: CacheV2 task fails with: "API resource location ... is not registered on ..."

Question, Bug, or Feature?
Type: Question

Enter Task Name: CacheV2

Environment

  • Azure DevOps Server 2020 (Product version 18.170.30525.1)
  • Self hosted agents on Windows in version 2.170.1 (7-zip and GNU Tar in path)

Issue Description

The CacheV2 task fails with the following error: “API resource location … is not registered on …”

  1. The first question is: Is this task even supported on on-premise “Azure DevOps Server”? One documentation says yes (Azure DevOps Server 2020 is listed below the title), the other documentation is clearly for Azure DevOps Services only and does not appear when Azure DevOps Server 2020 is selected.

  2. Second question: how to get rid of the “API resource location … is not registered on …” error?

Task logs

2020-11-20T07:39:50.2443422Z ##[debug]Evaluating condition for step: ‘cache npm install’ 2020-11-20T07:39:50.2445465Z ##[debug]Evaluating: SucceededNode() 2020-11-20T07:39:50.2445988Z ##[debug]Evaluating SucceededNode: 2020-11-20T07:39:50.2447024Z ##[debug]=> True 2020-11-20T07:39:50.2447508Z ##[debug]Result: True 2020-11-20T07:39:50.2448050Z ##[section]Starting: cache npm install 2020-11-20T07:39:50.3262696Z ============================================================================== 2020-11-20T07:39:50.3263184Z Task : Cache 2020-11-20T07:39:50.3263380Z Description : Cache files between runs 2020-11-20T07:39:50.3263575Z Version : 2.0.1 2020-11-20T07:39:50.3263761Z Author : Microsoft Corporation 2020-11-20T07:39:50.3263991Z Help : https://aka.ms/pipeline-caching-docs 2020-11-20T07:39:50.3264274Z ============================================================================== 2020-11-20T07:39:50.7343271Z Resolving key: 2020-11-20T07:39:51.1031779Z - npm install [string] 2020-11-20T07:39:51.9715331Z - **/./Sources/Tra/Mistra.Tra.Web.React/package-l… [file pattern; matches: 1] 2020-11-20T07:39:51.9715952Z - s\Sources\Tra\Mistra.Tra.Web.React\package-lock.json --> 25FB5553554AFBD8626565C687511D6AE2E956176AF4FB84ECD440525CC46221 2020-11-20T07:39:52.5960314Z - **/./Sources/Tra/Mistra.Tra.Web.React/package-l… [file pattern; matches: 1] 2020-11-20T07:39:52.5961111Z - s\Sources\Tra\Mistra.Tra.Web.React\package-lock.json --> 25FB5553554AFBD8626565C687511D6AE2E956176AF4FB84ECD440525CC46221 2020-11-20T07:39:53.1679120Z - **/./Sources/Tra/Mistra.Tra.Web.React/kendo-ui-… [file pattern; matches: 1] 2020-11-20T07:39:53.1679980Z - s\Sources\Tra\Mistra.Tra.Web.React\kendo-ui-license.txt --> 63967BE06005DCD18CE75C7A10ADB0BEFC99E9BFC74D0A50B27E7007A4B3552A 2020-11-20T07:39:53.1766401Z Resolved to: npm install|EurlvEGXBdkIVJfmTxiIRaan9cXiCt1aIMvY2hvqfGA=|EurlvEGXBdkIVJfmTxiIRaan9cXiCt1aIMvY2hvqfGA=|X1RkN2nwbIW+kY/F/Sza84d7/eIjAxlrEr6Xj+UuJa8= 2020-11-20T07:39:53.1768293Z ##[debug]Processed: ##vso[task.settaskvariable variable=RESTORE_STEP_RAN;issecret=False;]true 2020-11-20T07:39:53.1856797Z ##[debug]Processed: ##vso[task.settaskvariable variable=RESTORE_STEP_RESOLVED_FINGERPRINT;issecret=False;]npm install|EurlvEGXBdkIVJfmTxiIRaan9cXiCt1aIMvY2hvqfGA=|EurlvEGXBdkIVJfmTxiIRaan9cXiCt1aIMvY2hvqfGA=|X1RkN2nwbIW+kY/F/Sza84d7/eIjAxlrEr6Xj+UuJa8= 2020-11-20T07:39:53.4869875Z ##[debug]Dedup parallelism: 192 2020-11-20T07:39:53.6664408Z Information, Getting a pipeline cache artifact with the following fingerprint: npm install|EurlvEGXBdkIVJfmTxiIRaan9cXiCt1aIMvY2hvqfGA=|EurlvEGXBdkIVJfmTxiIRaan9cXiCt1aIMvY2hvqfGA=|X1RkN2nwbIW+kY/F/Sza84d7/eIjAxlrEr6Xj+UuJa8=. 2020-11-20T07:39:53.7402148Z ##[error]API resource location a7c78d38-31a8-417e-ba6b-7e58b352f304 is not registered on https://<mydomain>/tfs/<myproject>/. 2020-11-20T07:39:53.7412129Z ##[debug]Processed: ##vso[task.logissue type=error;]API resource location a7c78d38-31a8-417e-ba6b-7e58b352f304 is not registered on https://<mydomain>/tfs/<myproject>/. 2020-11-20T07:39:53.7420023Z ##[debug]Processed: ##vso[task.complete result=Failed;] 2020-11-20T07:39:53.7424173Z ##[debug] at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.CreateRequestMessageAsync(HttpMethod method, IEnumerable1 additionalHeaders, Guid locationId, Object routeValues, ApiResourceVersion version, HttpContent content, IEnumerable1 queryParameters, Object userState, CancellationToken cancellationToken, String mediaType) at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.SendAsync[T](HttpMethod method, IEnumerable1 additionalHeaders, Guid locationId, Object routeValues, ApiResourceVersion version, HttpContent content, IEnumerable1 queryParameters, Object userState, CancellationToken cancellationToken) at Microsoft.VisualStudio.Services.PipelineCache.WebApi.PipelineCacheClient.GetPipelineCacheArtifactAsync(Fingerprint[] fingerprints, CancellationToken cancellationToken) at Microsoft.VisualStudio.Services.PipelineCache.WebApi.PipelineCacheClient.<>c__DisplayClass9_0.<<GetPipelineCacheArtifactAsync>b__1>d.MoveNext() — End of stack trace from previous location where exception was thrown — at Microsoft.VisualStudio.Services.BlobStore.Common.Telemetry.BlobStoreClientTelemetry.MeasureActionAsync[TResult](BlobStoreTelemetryRecord record, Func1 actionAsync) at Microsoft.VisualStudio.Services.Content.Common.ExceptionExtensions.ReThrow(Exception ex) at Microsoft.VisualStudio.Services.BlobStore.Common.Telemetry.BlobStoreClientTelemetry.MeasureActionAsync[TResult](BlobStoreTelemetryRecord record, Func1 actionAsync) at Microsoft.VisualStudio.Services.PipelineCache.WebApi.PipelineCacheClient.GetPipelineCacheArtifactAsync(Fingerprint[] fingerprints, CancellationToken cancellationToken, PipelineCacheTelemetryRecord cacheRecordOptional) at Agent.Plugins.PipelineCache.PipelineCacheServer.DownloadAsync(AgentTaskPluginExecutionContext context, Fingerprint[] fingerprints, String path, String cacheHitVariable, CancellationToken cancellationToken) at Agent.Plugins.PipelineCache.RestorePipelineCacheV0.ProcessCommandInternalAsync(AgentTaskPluginExecutionContext context, Fingerprint fingerprint, Func`1 restoreKeysGenerator, String path, CancellationToken token) at Agent.Plugins.PipelineCache.PipelineCacheTaskPluginBase.RunAsync(AgentTaskPluginExecutionContext context, CancellationToken token) at Agent.PluginHost.Program.Main(String[] args) 2020-11-20T07:39:53.7543577Z ##[section]Finishing: cache npm install

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 10
  • Comments: 19 (3 by maintainers)

Most upvoted comments

The documentation still hasn’t been updated: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/cache?view=azure-devops. Still says the Cache task is available in DevOps Server 2020. Why is my organization paying for a DevOps Server license when some of the promised features don’t actually work? Talk about misleading.

@carl-tanner Can you make sure the docs get updated?

On june 2021, still present in documentation and the same issue still happening on Dev18.M170.6 on-premise version. 😞

I don’t understand why this should not work for OnPremise installation except of a business strategy forcing users into the managed service. But for complex environments this is not an option at all because of 3rd party dependencies. Caching must be provided for OnPremise installations as well.

This issue is still valid. There must be some sort of caching for on-premise DevOps too.

It’s 2022 by now and your doc is still misleading or should I say just factually wrong…

grafik

Does it maybe help to report this issue with your feedback feature there? grafik

Because that page clearly does not help… after all…


Does anyone have any workaround on how to still make this feature work? E.g. by using V1 of this cache task or so? Or would this be a bad idea? (If so, why?)

Documentation still wrong apparently. Yay for wasting people’s time due to misleading docs!

Why is this issue closed??

I’m updating the documentation so that it says it is limited to Azure DevOps services. Pipeline cache is built upon the same infrastructure that pipeline artifacts uses and is not available in the server product.

It is not supported on-premises. @fadnavistanmay can you update the incorrect docs?