Failed to deploy web package to App Service. Code 401 - azure

I've deployed my little django app, but can't deploy it continously. Every time I see this error message, while deploying from GitHub. I am using student account, so mb that could be a reason?😣
Run azure/webapps-deploy#v2
Package deployment using ZIP Deploy initiated.
Error: Failed to deploy web package to App Service.
Error: Deployment Failed with Error: Error: Failed to deploy web package to App Service.
Unauthorized (CODE: 401)

Related

gcloud app deploy is failing with Failed to create cloud build: Permission denied on 'locations/xyz' (or it may not exist)

I have a 2.x python app and some 3.x python app which are running on google app engine.
Recently, I had updated the 2.x app without any issue. Now, when I'm trying to deploy an update for a 3.x python app, I'm getting an error "Error Response: [7] Failed to create cloud build: Permission denied on"
Services to deploy:
descriptor: [C:\Users\artha\Documents\gae billApp\CbicNtfnAndAutoMailer\app.yaml]
source: [C:\Users\artha\Documents\gae billApp\CbicNtfnAndAutoMailer]
target project: [cbicntfnandautomailer]
target service: [default]
target version: [1]
target url: [https://cbicntfnandautomailer.appspot.com]
target service account: [App Engine default service account]
Do you want to continue (Y/n)? Y
Beginning deployment of service [default]...
#============================================================#
#= Uploading 0 files to Google Cloud Storage =#
#============================================================#
File upload done.
Updating service [default]...failed.
ERROR: (gcloud.app.deploy) Error Response: [7] Failed to create cloud build: Permission denied on 'locations/asia-south1' (or it may not exist)..
Previously, I did not face any issue.
gcloud app describe shows me
authDomain: gmail.com
codeBucket: staging.cbicntfnandautomailer.appspot.com
databaseType: CLOUD_DATASTORE_COMPATIBILITY
defaultBucket: cbicntfnandautomailer.appspot.com
defaultHostname: cbicntfnandautomailer.appspot.com
featureSettings:
splitHealthChecks: true
useContainerOptimizedOs: true
gcrDomain: asia.gcr.io
id: cbicntfnandautomailer
locationId: asia-south1
name: apps/cbicntfnandautomailer
serviceAccount: cbicntfnandautomailer#appspot.gserviceaccount.com
servingStatus: SERVING
I have also tried disabling and re-enabling cloud build, but to no avail...
Can you please advice how to resolve the issue, thanks!!!
EDIT: As a workaround, created a seperate project and deployed there to resolve the issue, but the root cause still remains unknown!!
Check if you reached the limit of build-triggers allowed per region:
Cloud build limits

Build failed: No module named virtualenv

I have a Python 3.7 GCP App Engine project. Everything works well normally. For the past hour, however, I have not been able to deploy a new version of my app. I keep the same kind of Internal error. What can I do to resolve this? According to the VCS used, I have not changed anything since the last commit.
The command I run is the same as always: gcloud app deploy app.yaml --project=my-project-name
Here is the output:
Beginning deployment of service [default]...
#============================================================#
#= Uploading 1 file to Google Cloud Storage =#
#============================================================#
File upload done.
Updating service [default]
...
............................failed. ERROR: (gcloud.app.deploy) Error
Response: [9] Cloud build 111fffff-1111-2222-cbaf-edcba154321f status:
FAILURE. Error ID: 6C9DE5CE. Error type: InternalError. Error message:
create_virtualenv had stderr output: /opt/python3.7/bin/python3.7:
No module named virtualenv
error: create_virtualenv returned code: 1.

ReactJS deployment failed on Google App Engine

I'm trying to deploy my simple ReactJS project on Google App Engine. But I don't know why deployment is failed on Google App Engine regarding following documentation of Google. https://cloud.google.com/nodejs/getting-started/hello-world
Error logs when I encountered.
The push refers to a repository [us.gcr.io/react-ppshein/appengine/default.20160905t090720] (len: 1)
ec870881572a: Preparing
Post https://us.gcr.io/v2/react-ppshein/appengine/default.20160905t090720/blobs/uploads/: token auth attempt for registry: https://us.gcr.io/v2/token?account=_token&scope=repository%3Areact-ppshein%2Fappengine%2Fdefault.20160905t090720%3Apush%2Cpull&service=us.gcr.io request failed with status: 403 Forbidden
ERROR
ERROR: error pushing image "us.gcr.io/react-ppshein/appengine/default.20160905t090720:latest": exit status 1
ERROR: (gcloud.app.deploy) Error Response: [2] Build failed; check build logs for details

App Engine deploy fails (Managed VM nodejs)

App Engine deploy fails with this error
Copying files to Google Cloud Storage...
Synchronizing files to [gs://staging.john-slowmo-droid-1116.appspot.com/].
Updating module [default]...failed.
ERROR: (gcloud.preview.app.deploy) Error Response: [400] Invalid character in filename: node_modules/es5-ext/array/#/##iterator/implement.js
This behavior did not happen before the second to latest gcloud update. Tried in gcloud sdk 0.9.86 and 0.9.87.

Why is Web Deployment Agent Service (MsDepSvc) crashing with a FileNotFoundException?

I'm attempting to deploy a .NET 4 web application to a Windows 2008R2 server using Web Deploy V2. As part of this deployment we copy some batch files to the target machine. When I execute the command below, Web Deployment Agent Service (MsDepSvc) stops and a FileNotFoundException is logged to the system Application event log.
The web deploy command:
"C:\Program Files (x86)\IIS\Microsoft Web Deploy V2\msdeploy.exe" -verb:sync -source:contentPath="C:\work\27f84e3eca3a33d5\Output\BatchFiles" -dest:contentPath="c:_DeployCommands",computerName="192.168.1.14"
Full console output:
C:\Windows\system32>"C:\Program Files (x86)\IIS\Microsoft Web Deploy
V2\msdepl y.exe" -verb:sync
-source:contentPath="C:\work\27f84e3eca3a 3d5\Output\BatchFiles"
-dest:contentPath="c:_DeployCommands",computer ame="192.168.1.14" Info: Using ID '326b55b4-602c-4cdf-ae5c-052e9d44b377' for connections
to the remote server. Warning: Retrying the sync because a socket
error (10054) occurred. Retrying operation 'Serialization' on object
MSDeploy.contentPath (sourcePath). Attempt 1 of 25. Info: Using ID
'a6e468ca-53b9-474b-8568-42dba196bd72' for connections to the remote
server. Error Code: ERROR_COULD_NOT_CONNECT_TO_REMOTESVC More
Information: Could not connect to the destination computer
("192.168.1.14" using the specified process ("Web Deployment Agent
Service") because the serve did not respond. Make sure that the
process ("Web Deployment Agent Service") i started on the destination
computer. Error: The remote server returned an error: (503) Server
Unavailable. Error count: 1.
Event Log Entry:
Application: MsDepSvc.exe Framework Version: v4.0.30319 Description:
The process was terminated due to an unhandled exception. Exception
Info: System.IO.FileNotFoundException Stack: at
Microsoft.Web.Deployment.Tracer.TraceError(Microsoft.Web.Deployment.DeploymentTraceSource,
System.String, System.Object[]) at
MSDepSvc.WDAgent.BeginProcessRequest(System.Net.HttpListenerContext)
at System.Net.LazyAsyncResult.Complete(IntPtr) at
System.Net.ListenerAsyncResult.IOCompleted(System.Net.ListenerAsyncResult,
UInt32, UInt32) at
System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32,
UInt32, System.Threading.NativeOverlapped*)
How can I diagnose this?
We ran into a similar issue. You're best bet is to decompile using ILSpy and add extra logging in every catch block and replace the exe on the client to see the exact error. In our scenario, we used on older version 7.1.1631.0 that works. There's a newer version 7.1.1762.0 that's caused the problem. The exe is copied from the client and not the server.
I had the exact same issue. It turned out to be a bug in Web Deploy 3.5 as described here: Could not find file or assembly Microsoft.Web.Deployment.Tracing with Web Deploy V3 using tempagent

Resources