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

Error 404: When request Azure resource at PublishContent, zipDeploy : Failed to use /home/runner/work/_temp/temp_web_package_...zip as ZipDeploy content #216

Open
martin-greentrax opened this issue Jan 31, 2024 · 19 comments

Comments

@martin-greentrax
Copy link

These github workflows have worked 2 years for us to deploy various python functions hundreds of times to azure and now are suddenly no longer reliable:

      - name: Publish Azure Function
        uses: Azure/functions-action@v1
        id: fa
        with:
          app-name: ${{ env.AZURE_FUNCTIONAPP_NAME }}
          package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}
          publish-profile: ${{ secrets.AZURE_FUNCTIONAPP_PUBLISH_PROFILE }}

While debugging now we also tried v1.5.1, but no success with it either. Some more or less random restart/delete/disable may or may not help to resolve it (as described here microsoft/azure-pipelines-tasks#18739 (comment)) but the issue comes back and then one can start the deployment over and over again and see the same error.

Here is how the github job log starts with debug logging:

Current runner version: '2.311.0'
Operating System
Runner Image
  Image: ubuntu-22.04
  Version: 20240116.3.0
  Included Software: https://github.com/actions/runner-images/blob/ubuntu22/20240116.3/images/ubuntu/Ubuntu2204-Readme.md
  Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu22%2F20240116.3
Runner Image Provisioner
  2.0.324.1

And this is how it fails:

##[debug]Deployment status: 0 'Building and Deploying '***-4e62-871a-d8bdc4ef87f0'.'. retry after 5 seconds
##[debug]setting affinity cookie ["ARRAffinity=****a443cf3f6c7c2e4daaee92c2062af1b69e3649bf26d43fe66fe700a7de;Path=/;HttpOnly;Secure;Domain=***.scm.azurewebsites.net","ARRAffinitySameSite=****443cf3f6c7c2e4daaee92c2062af1b69e3649bf26d43fe66fe700a7de;Path=/;HttpOnly;SameSite=None;Secure;Domain=***.scm.azurewebsites.net"]
##[debug][GET] [https://***.scm.azurewebsites.net:443/api/deployments/latest?deployer=GITHUB_ZIP_DEPLOY_FUNCTIONS_V1&time=2024-01-23_11-20-47Z](https://***.scm.azurewebsites.net/api/deployments/latest?deployer=GITHUB_ZIP_DEPLOY_FUNCTIONS_V1&time=2024-01-23_11-20-47Z)
##[debug]Could not parse response body.
##[debug]{}
Error: Failed to deploy web package to App Service.
Error: Execution Exception (state: PublishContent) (step: Invocation)
Error:   When request Azure resource at PublishContent, zipDeploy : Failed to use /home/runner/work/_temp/temp_web_package_8472975363497814.zip as ZipDeploy content
Error:     Failed to deploy web package to App Service.
Not Found (CODE: 404)
Error:       Error: Failed to deploy web package to App Service.
Not Found (CODE: 404)
    at Kudu.<anonymous> (/home/runner/work/_actions/Azure/functions-action/v1/lib/appservice-rest/Kudu/azure-app-kudu-service.js:235:41)
    at Generator.throw (<anonymous>)
    at rejected (/home/runner/work/_actions/Azure/functions-action/v1/lib/appservice-rest/Kudu/azure-app-kudu-service.js:6:65)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
Error: Deployment Failed!
##[debug]Node Action run completed with exit code 1

It does seem to finish the publishing though (as our version tag shows the new version) but it does not start the remaining steps of the deployment as it considers this step as failed.

@martin-greentrax
Copy link
Author

This issue keeps occurring randomly for our deployments. :(

@mboiman
Copy link

mboiman commented Feb 21, 2024

same here too. Microsoft fix this please!

@mboiman
Copy link

mboiman commented Feb 27, 2024

@patelchandni @Hazhzeng any ideas how to solve this problem?

@charlesgardyn
Copy link

Same here

@CaptainJojo
Copy link

Same here, I have error but it's deploy

@kuuselajuha
Copy link

Any solutions inbound? Having the same issue with v1.5.0 and 1.5.1

@codingawayy
Copy link

codingawayy commented Mar 21, 2024

Same thing here - the builds suddenly started failing after 2 years.

My workaround for now is to use https://github.com/Azure/webapps-deploy instead. Found the workaround in another related issue: #213.

  - name: Deploy
    uses: azure/webapps-deploy@v2
    id: fa
    with:
      app-name: ${{ env.AZURE_FUNCTIONAPP_NAME }}
      package: '${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}/build'
      publish-profile: ${{ secrets.AZURE_API_PUBLISH_PROFILE }}

@skvark
Copy link

skvark commented Mar 22, 2024

Same issue here as well...

@amorimcode
Copy link

same issue here

@kokatic
Copy link

kokatic commented Apr 19, 2024

same issue here!

@hynrbf
Copy link

hynrbf commented Apr 24, 2024

Same issue here!

@kokatic
Copy link

kokatic commented Apr 28, 2024

Any alternative solutions to propose ?

@viachmev
Copy link

+1

@kokatic
Copy link

kokatic commented May 11, 2024

Hello Allo,
I fixed the issue by :

  • Redeploy my Azure Function
  • Generate the Github Action Worflow file from the portal

Hope this can help you !

@SjoerdTimovanVliet
Copy link

+1

1 similar comment
@runeheidem
Copy link

+1

@ricardofalc
Copy link

Same issue here.

@MarcoP9
Copy link

MarcoP9 commented Aug 19, 2024

Hey this issue is still existing for me. The re-deploy mentioned previously is not working, is there any attention on this?

@iMeany
Copy link

iMeany commented Aug 30, 2024

I got a similar error message in my workflow and have been trying to solve it for several days. I'm using RBAC instead of publish-profile, but maybe this still applies and helps someone:

I disconnected the leftover configuration in the functions Deployment center (menu in Azure portal), even though I was NOT deploying through it, but through GitHub runner with RBAC credentials.

No actual changes to the workflow itself or environment variables (I do have the WEBSITE_RUN_FROM_PACKAGE=1 there since the beginning though.) Just re-run the same job and started to work afterwards 🤷, my guess its grabbing some wrong configurations for deployment because multiple are configured (no understandable messages in workflows debug outputs either).

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

No branches or pull requests