Tuesday, March 26, 2024

Azure @ Enterprise - App Service Deployment Error: ENOENT: no such file or directory, open

I was fiddling with deployment via the Kudo console in the Azure app service. Removed one file as part of testing. The expectation was that the next deployment would put the file back.

The next deployment from GitHub actions failed with the below message.

33      Cleaning up temp folders from previous zip deployments and extracting pushed zip file /tmp/zipdeploy/5b7989fd-9794-4ed0-8bfc-dbf1f18c686b.zip (4.31 MB) to /tmp/zipdeploy/extracted
Error: Failed to deploy web package to App Service.
Error: Deployment Failed, Package deployment using ZIP Deploy failed. Refer logs for more details.
App Service Application URL: https://<app service web app name>.azurewebsites.net


No more details on failure in GH Actions logs. There was an error as shown below in the Azure AppService Deployment center.

Error: ENOENT: no such file or directory, open '/home/site/wwwroot/Azure.Core.dll

That was the exact file I removed earlier.


Hypothesis 1

The file may be open in a Kudu console, hence unable to access it. 

But even after closing, the error persisted.

Hypothesis 2

The App Service deployment action in GHActions requires the file to be present there as that may be keeping track of files.

Even after manually uploading the file, the issue persists


Finally attempted the Microsoft-certified solution of Restarting the App service. It worked.

The order is to stop the App service, do the deployment, and start again.

No comments: