Skip to content

ALOpsAppSource@1 fails with exception: ReadAsStringAsync cannot access disposed object #989

Description

@DanielGoehler

Describe the bug
With the new version publish to AppSource works again, but checking the submission status does not seem stable. Sometimes the task fails with the following error:

Exception calling "ReadAsStringAsync" with "0" argument(s): "Cannot access a disposed object.
Object name: 'System.Net.Http.HttpConnectionResponseContent'."

The default autopromote values are in place:

autopromote_checksecondsdelay: 30
autopromote_maxtries: 120

I would expect the task to retry the status check when this kind of transient error occurs.

the used yaml
please provide the yaml that you used. It helps you put the yaml like this:

steps:
- task: ALOpsAppSource@1
  displayName: 'ALOps AppSource'
  inputs:
    azure_tenant_id: '$(TenantID)'
    azure_app_client_id: '$(AppSourceClientId)'
    azure_app_client_secret: '$(AppSourceClientSecret)'
    apply_offering_version_filter: true
    autopromote: true
    offering_name_filter_array: '***'
    pwsh: true

the output
Also the complete output is necessary for us to see what is going on. Also use backtics:

[..]
2026-06-22T11:29:28.3094123Z ##[command]Invoke-RestMethod -Method Get -Uri "https://api.partner.microsoft.com/v1.0/ingestion/products/51d5cfd2-3e74-4a3f-ad3f-07bcd5d03b9e/submissions/1152921505701276408/workflowdetails"
2026-06-22T11:29:29.8420862Z *** Using cached OAuth token for [https://api.partner.microsoft.com]
2026-06-22T11:29:29.8453470Z ##[command]Invoke-RestMethod -Method Get -Uri "https://api.partner.microsoft.com/v1.0/ingestion/products/51d5cfd2-3e74-4a3f-ad3f-07bcd5d03b9e/submissions/1152921505701276408"
2026-06-22T11:29:30.5211852Z *** Submission result:
2026-06-22T11:29:30.5223891Z 
2026-06-22T11:29:30.5235717Z resourceType       : Submission
2026-06-22T11:29:30.5247298Z state              : InProgress
2026-06-22T11:29:30.5266584Z substate           : Submitted
2026-06-22T11:29:30.5280075Z targets            : {@{type=Scope; value=Preview}}
2026-06-22T11:29:30.5291572Z resources          : {@{type=Availability; value=e240932d-997c-7103-6c85-c15ec1838a96}, @{type=Listing; value=2d719bbf-9a4d-634e-8683-515d119f528b}, @{type=Package; value=2ab7b54d-45b3-469a-abb8-ec171c6cbd88}, @{type=Property; value=55cc5443-7a41-1743-0f23-f1213aaac719}…}
2026-06-22T11:29:30.5303097Z publishedTimeInUtc : 01.01.1601 00:00:00
2026-06-22T11:29:30.5321863Z pendingUpdateInfo  : @{updateType=Create; status=Completed}
2026-06-22T11:29:30.5335285Z releaseNumber      : 227
2026-06-22T11:29:30.5335576Z friendlyName       : Submission 227
2026-06-22T11:29:30.5335817Z areResourcesReady  : True
2026-06-22T11:29:30.5336027Z id                 : 1152921505701276408
2026-06-22T11:29:30.5336155Z 
2026-06-22T11:29:30.5336302Z 
2026-06-22T11:30:00.5203626Z *** Using cached OAuth token for [https://api.partner.microsoft.com]
2026-06-22T11:30:00.5207585Z ##[command]Invoke-RestMethod -Method Get -Uri "https://api.partner.microsoft.com/v1.0/ingestion/products/51d5cfd2-3e74-4a3f-ad3f-07bcd5d03b9e/submissions/1152921505701276408/workflowdetails"
2026-06-22T11:30:01.4129015Z *** Using cached OAuth token for [https://api.partner.microsoft.com]
2026-06-22T11:30:01.4147014Z ##[command]Invoke-RestMethod -Method Get -Uri "https://api.partner.microsoft.com/v1.0/ingestion/products/51d5cfd2-3e74-4a3f-ad3f-07bcd5d03b9e/submissions/1152921505701276408"
2026-06-22T11:30:02.0300678Z *** Submission result:
2026-06-22T11:30:02.0357605Z 
2026-06-22T11:30:02.0399069Z resourceType       : Submission
2026-06-22T11:30:02.0415720Z state              : InProgress
2026-06-22T11:30:02.0436373Z substate           : Submitted
2026-06-22T11:30:02.0448608Z targets            : {@{type=Scope; value=Preview}}
2026-06-22T11:30:02.0459421Z resources          : {@{type=Availability; value=e240932d-997c-7103-6c85-c15ec1838a96}, @{type=Listing; value=2d719bbf-9a4d-634e-8683-515d119f528b}, @{type=Package; value=2ab7b54d-45b3-469a-abb8-ec171c6cbd88}, @{type=Property; value=55cc5443-7a41-1743-0f23-f1213aaac719}…}
2026-06-22T11:30:02.0477281Z publishedTimeInUtc : 01.01.1601 00:00:00
2026-06-22T11:30:02.0532427Z pendingUpdateInfo  : @{updateType=Create; status=Completed}
2026-06-22T11:30:02.0552070Z releaseNumber      : 227
2026-06-22T11:30:02.0553814Z friendlyName       : Submission 227
2026-06-22T11:30:02.0554257Z areResourcesReady  : True
2026-06-22T11:30:02.0554501Z id                 : 1152921505701276408
2026-06-22T11:30:02.0554637Z 
2026-06-22T11:30:02.0554774Z 
2026-06-22T11:30:32.0346829Z *** Using cached OAuth token for [https://api.partner.microsoft.com]
2026-06-22T11:30:32.0349941Z ##[command]Invoke-RestMethod -Method Get -Uri "https://api.partner.microsoft.com/v1.0/ingestion/products/51d5cfd2-3e74-4a3f-ad3f-07bcd5d03b9e/submissions/1152921505701276408/workflowdetails"
2026-06-22T11:30:32.8580412Z *** Using cached OAuth token for [https://api.partner.microsoft.com]
2026-06-22T11:30:32.8580968Z ##[command]Invoke-RestMethod -Method Get -Uri "https://api.partner.microsoft.com/v1.0/ingestion/products/51d5cfd2-3e74-4a3f-ad3f-07bcd5d03b9e/submissions/1152921505701276408"
2026-06-22T11:30:34.3462486Z *** Submission result:
2026-06-22T11:30:34.3462814Z 
2026-06-22T11:30:34.3463098Z resourceType       : Submission
2026-06-22T11:30:34.3463314Z state              : InProgress
2026-06-22T11:30:34.3463515Z substate           : Submitted
2026-06-22T11:30:34.3463756Z targets            : {@{type=Scope; value=Preview}}
2026-06-22T11:30:34.3464151Z resources          : {@{type=Availability; value=e240932d-997c-7103-6c85-c15ec1838a96}, @{type=Listing; value=2d719bbf-9a4d-634e-8683-515d119f528b}, @{type=Package; value=2ab7b54d-45b3-469a-abb8-ec171c6cbd88}, @{type=Property; value=55cc5443-7a41-1743-0f23-f1213aaac719}…}
2026-06-22T11:30:34.3464569Z publishedTimeInUtc : 01.01.1601 00:00:00
2026-06-22T11:30:34.3464839Z pendingUpdateInfo  : @{updateType=Create; status=Completed}
2026-06-22T11:30:34.3465050Z releaseNumber      : 227
2026-06-22T11:30:34.3465248Z friendlyName       : Submission 227
2026-06-22T11:30:34.3465463Z areResourcesReady  : True
2026-06-22T11:30:34.3465716Z id                 : 1152921505701276408
2026-06-22T11:30:34.3465859Z 
2026-06-22T11:30:34.3465976Z 
2026-06-22T11:31:04.3527630Z *** Using cached OAuth token for [https://api.partner.microsoft.com]
2026-06-22T11:31:04.3552554Z ##[command]Invoke-RestMethod -Method Get -Uri "https://api.partner.microsoft.com/v1.0/ingestion/products/51d5cfd2-3e74-4a3f-ad3f-07bcd5d03b9e/submissions/1152921505701276408/workflowdetails"
2026-06-22T11:31:04.8365885Z ##[error]Exception calling "ReadAsStringAsync" with "0" argument(s): "Cannot access a disposed object.
Object name: 'System.Net.Http.HttpConnectionResponseContent'."
2026-06-22T11:31:04.8926101Z *** PWSH Run Completed: 1
2026-06-22T11:31:04.9325698Z ##[section]Finishing: ALOps AppSource

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions