microsoft / powerplatform-actions

Power Platform GitHub Actions automate common build and deployment tasks related to Power Platform. This includes synchronization of solution metadata (a.k.a. solutions) between development environments and source control, generating build artifacts, deploying to downstream environments, provisioning/de-provisioning of environments, and the ability to perform static analysis checks against your solution using the PowerApps checker service.
MIT License
221 stars 68 forks source link

Error: The request channel timed out while waiting for a reply after 00:02:00. #167

Closed jdiekman closed 2 years ago

jdiekman commented 2 years ago

Hi,

We had our pipelines working nicely, however, importing the managed solution from Build > Production is continually failing with this error.

Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout.

Importing the unmanaged solution from Dev > Build works fine, it fails whilst trying to export to managed and import. Exactly where/why it's failing were unsure.

Action below - removed org-specific details.

name: release-solution-to-prod

prepare for releasing to prod:

convert solution to managed (using a build PowerPlatform environment for the conversion)

upload the solution to the GitHub artifacts and deploy to the PROD environment

on: workflow_dispatch: inputs:

Change this value

  solution_name:
    description: 'name of the solution to worked on from Power Platform'
    required: true
    default: DummyName
   #Do Not change these values
  solution_shipping_folder:
    description: 'folder name for staging the exported solution *do not change*'
    required: true
    default: out/ship/
  solution_outbound_folder:
    description: 'staging the unpacked solution folder before check-in *do not change*'
    required: true
    default: out/solutions/
  solution_source_folder: 
   description: 'folder name to be created and checked in *do not change*'
   required: true
   default: solutions/
  solution_release_folder:
   description: 'folder where the released binaries are going to be hosted *do not change*'
   required: true
   default: out/release

release: types: [created]

env:

edit your values here

BUILD_ENVIRONMENT_URL: 'https://xxx.crm6.dynamics.com' PRODUCTION_ENVIRONMENT_URL: 'https://xxx.crm6.dynamics.com' CLIENT_ID: 'xxxxxx' TENANT_ID: 'xxxxxxx'

jobs: convert-to-managed: runs-on: windows-latest

or you can say runs-on: ubuntu-latest

env:
  RUNNER_DEBUG: 1

steps:
- uses: actions/checkout@v2
  with:
    lfs: true

- name: Pack solution
  uses: microsoft/powerplatform-actions/pack-solution@v0
  with:
    solution-folder: ${{ github.event.inputs.solution_source_folder}}/${{ github.event.inputs.solution_name }}
    solution-file: ${{ github.event.inputs.solution_outbound_folder}}/${{ github.event.inputs.solution_name }}.zip
    solution-type: Unmanaged

- name: Import solution as unmanaged to build env
  uses: microsoft/powerplatform-actions/import-solution@v0
  with:
    environment-url: ${{env.BUILD_ENVIRONMENT_URL}}
    app-id: ${{env.CLIENT_ID}}
    client-secret: ${{ secrets.PowerPlatformSPN }}
    tenant-id: ${{env.TENANT_ID}}
    solution-file: ${{ github.event.inputs.solution_outbound_folder}}/${{ github.event.inputs.solution_name }}.zip
    force-overwrite: true
    publish-changes: true
    run-asynchronously: true

- name: Export solution as managed
  uses: microsoft/powerplatform-actions/export-solution@v0
  with:
    environment-url: ${{env.BUILD_ENVIRONMENT_URL}}
    app-id: ${{env.CLIENT_ID}}
    client-secret: ${{ secrets.PowerPlatformSPN }}
    tenant-id: ${{env.TENANT_ID}}
    solution-name: ${{ github.event.inputs.solution_name }}
    managed: true
    solution-output-file: ${{ github.event.inputs.solution_shipping_folder}}/${{ github.event.inputs.solution_name }}.zip

- name: Upload the ready to ship solution to GH artifact store
  uses: actions/upload-artifact@v2
  with:
    name: managedSolutions
    path: ${{ github.event.inputs.solution_shipping_folder}}/${{ github.event.inputs.solution_name }}.zip

release-to-staging: needs: [ convert-to-managed ] runs-on: windows-latest env: RUNNER_DEBUG: 1

steps:
- uses: actions/checkout@v2
  with:
    lfs: true

- name: Fetch the ready to ship solution from GH artifact store
  uses: actions/download-artifact@v2
  with:
    name: managedSolutions
    path: ${{ github.event.inputs.solution_release_folder}}
- name: Import solution to prod env
  uses: microsoft/powerplatform-actions/import-solution@v0
  with:
    environment-url: ${{env.PRODUCTION_ENVIRONMENT_URL}}
    app-id: ${{env.CLIENT_ID}}
    client-secret: ${{ secrets.PowerPlatformSPN }}
    tenant-id: ${{env.TENANT_ID}}
    solution-file: ${{ github.event.inputs.solution_release_folder}}/${{ github.event.inputs.solution_name }}.zip
    force-overwrite: true
    publish-changes: true
    run-asynchronously: true
kkanakas commented 2 years ago

We had some issues over the weekend. We have fixed that. Please run your pipeline again. I would recommend that you create a support case with the logs from GitHub.

MattB-msft commented 2 years ago

@jdiekman are you still experiencing this issue? if so can you let us know if the issue is the same? or has it changed?

jjkinsey commented 2 years ago

I'm experiencing this issue as well (the 2 minute timeout error, specifically. My workflow(s) are a bit different from OP's, but functionally mostly the same). While the workflow always fails on the first attempt, rerunning the job will cause it to succeed (though sometimes it may take multiple reruns).

Additionally, I notice that while the workflow fails, the solution components have their modified date updated in the target environment.

sync commented 2 years ago

We started experiencing this issue few days ago, been using these actions for month and it was never an issue. We are still experiencing it as of today.

kkanakas commented 2 years ago

@jjkinsey @sync you are experiencing this on export. There was a GitHub outage today, but it should be fixed by now.

sync commented 2 years ago

Yes haven't had any issues with it since yesterday late arvo so far. Was wrong it came back at random

kkanakas commented 2 years ago

@jdiekman are you still having the issues? if not, can we close this issue?

jjkinsey commented 2 years ago

I'm still having this problem with the import-solution action (version 0.5.1). The specific error message I'm getting is:

Error: The request channel timed out attempting to send after 00:02:00. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout.
      The request channel timed out attempting to send after 00:02:00. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout.
          The HTTP request to '***XRMServices/2011/Organization.svc/web?SDKClientVersion=9.0.46.3291' has exceeded the allotted timeout of 00:02:00. The time allotted to this operation may have been a portion of a longer timeout.

Only some of my solutions have this problem when imported; I haven't been able to test rigorously for what might be different between the ones that work and the ones that don't.

sync commented 2 years ago

Same also with the same error

jdiekman commented 2 years ago

@kkanakas - Just tried to export the solution. Failed again

'The request channel timed out while waiting for a reply after 00:02:00. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout.'

Nothing has changed on our end. Originally we thought the issues was due to new connection references, but that was affecting our solution import.

Any ideas? Seems a few people are having this issue now @kkanakas

kkanakas commented 2 years ago

Can you do me a favor and open a support ticket and send the logs over to the support team, so that we can look at it, please?

jjkinsey commented 2 years ago

I'd be happy to, but I'm not sure how to do that. Do you have a link to instructions? Would speed the process up on my end.

kkanakas commented 2 years ago

On your Power Platform Admin center you will see help +support on the left side panel

image
jdiekman commented 2 years ago

@kkanakas do you need another support ticket logged for this? have there been any updates?

alin-balan commented 2 years ago

Same error for me with the import-solution@v0 action. "Error: The request channel timed out while waiting for a reply after 00:01:59.9970007. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout.".

apand35 commented 2 years ago

Same error while importing a solution.. please help URGENTLY... log details as below:

Microsoft PowerPlatform CLI

Version: 1.10.4+gf23be2f

Error: The request channel timed out while waiting for a reply after 00:01:17.9707259. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout. The HTTP request to 'https://<>.crm.dynamics.com/XRMServices/2011/Organization.svc/web?SDKClientVersion=9.0.46.3291' has exceeded the allotted timeout of 00:02:00. The time allotted to this operation may have been a portion of a longer timeout. The operation has timed out

herr-mueller commented 2 years ago

Also got this issue with the import-solution@v0 action

The request channel timed out while waiting for a reply after 00:01:59.9990013. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout. The HTTP request to 'https://xxx.crm4.dynamics.com/XRMServices/2011/Organization.svc/web?SDKClientVersion=9.0.46.3291' has exceeded the allotted timeout of 00:02:00. The time allotted to this operation may have been a portion of a longer timeout. The operation has timed out

josch83 commented 2 years ago

We're also encountering this error with the import-solution action. Interesting: Checking the Solutions/History page in the power apps environment shows, that the import has been completed successfully (in our case with 3m 28sec operation time). So this seems to occur just in the Github action itself (it seems that there are some synchronous HTTP requests in there). I just see that the action definition has a parameter run-asynchronously (https://github.com/microsoft/powerplatform-actions/blob/main/import-solution/action.yml), I'll try that.

josch83 commented 2 years ago

Yes! I can confirm that for us this parameter resolves the problem. The workflow step now looks like:

- name: Import solution as unmanaged to build env
  uses: microsoft/powerplatform-actions/import-solution@v0
  with:
    environment-url: ${{inputs.BUILD_ENVIRONMENT_URL}}
    app-id: ${{inputs.CLIENT_ID}}
    client-secret: ${{ secrets.envSecret }}
    tenant-id: ${{inputs.TENANT_ID}}
    solution-file: ${{ inputs.solution_outbound_folder}}/${{ inputs.solution_name }}.zip
    force-overwrite: true
    publish-changes: true
    run-asynchronously: true # Otherwise there is client-side timeout of 02:00, which causes the action to fail (but nevertheless the import is completed successfully)
paulbreuler commented 2 years ago

This should no longer be an issue. If this occurs when using v0 tasks migrate ALL tasks in the impacted pipeline to v2.* to ensure you are using the latest update.