I am using CloudShell to publish AzureFunction. I was able to publish the AzureFunction previously but today I am getting this Error while executing the publish command func azure functionapp publish <APP_NAME>
Getting site publishing info...
Creating archive for current directory...
Performing remote build for functions project. Deleting the old .python_packages directory Uploading 15.91 KB [##############################################################################]
Remote build in progress, please wait...
Unexpected character encountered while parsing value: {. Path '[0].build_summary', line 1, position 630.
Related
When the release pipeline run end up with this error
RangeError [ERR_INVALID_OPT_VALUE]: The value "4294967295" is invalid for option "size".
I don't know what means this error
task failed
Log of the task failed when release run
Same issue for me using Web Deploy to a nodejs app service.
Web Deploy worked at first, until we added some packages in our package.json (e.g. "#fortawesome/free-brands-svg-icons")
Then our release pipeline suddenly outputs "64-bit = +" in the deployment log.
If we remove the packages, the "64-bit = +" is gone, and our Web Deploy works again.
Image of log from Release pipeline
Not sure how to resolve it, but in our case we used Zip Deploy instead like #Ari Gunawan recommended.
I had the same issue when trying to deploy a node app to Azure App Service from release pipeline. Not sure what the error means as there are no further details about it but I resolved it by using "Zip Deploy" deployment method and "Continue on error"
Below is Azure error log from the Azure release pipeline.
2020-07-24T05:17:13.7712974Z ##[section]Starting: Deploy Azure App Service
2020-07-24T05:17:14.0464143Z ==============================================================================
2020-07-24T05:17:14.0465719Z Task : Azure App Service deploy
2020-07-24T05:17:14.0469391Z Description : Deploy to Azure App Service a web, mobile, or API app using Docker, Java, .NET, .NET Core, Node.js, PHP, Python, or Ruby
2020-07-24T05:17:14.0469849Z Version : 3.163.5
2020-07-24T05:17:14.0470410Z Author : Microsoft Corporation
2020-07-24T05:17:14.0470921Z Help : https://aka.ms/azureappservicetroubleshooting
2020-07-24T05:17:14.0471274Z =============================================================================
2020-07-24T05:17:16.0650643Z Got connection details for Azure App Service:'XXXXX'
2020-07-24T05:17:17.6576087Z (node:764) Warning: Use Cipheriv for counter mode of aes-256-ctr
**2020-07-24T05:17:17.6627737Z ##[error]Error: No package found with specified pattern: D:\a\r1\a\Drop<br/>Check if the package mentioned in the task is published as an artifact in the build or a previous stage and downloaded in the current job.**
2020-07-24T05:17:22.9168975Z Successfully added release annotation to the Application Insight : XXXXX
2020-07-24T05:17:24.8686063Z Successfully updated deployment History at https://XXXXX.scm.azurewebsites.net/api/deployments/231595567842919
2020-07-24T05:17:24.8933576Z ##[section]Finishing: Deploy Azure App Service
P.S. I have checked build pipeline, I can download build Artificats, but it displays below warning.
[warning]Directory 'D:\a\1\a' is empty. Nothing will be added to build artifact 'drop'.
Assuming you meant you have solved the build artifact empty issue, but the release pipeline still had issue in Azure App Service deploy task.
As the error mentioned, there is "No package found with specified pattern: D:\a\r1\a\Drop", you need to check how you define the package, try format $(System.DefaultWorkingDirectory)/**/*.zip instead of $(System.DefaultWorkingDirectory)\Drop.
As task "Publish Build Artifact" publish artifact from $(build.artifactstagingdirectory), so we need add a task "Copy files" to copy your files ** from $(system.defaultworkingdirectory) to $(build.artifactstagingdirectory) **. which copied my build to stagingdirectory.
I'm running Cypress in one of my release stages and it gives me this output:
Finished processing: D:\a\r1\a\_ClientWeb-Build-CI\ShellArtifact\tests\integration\cypress\videos\onboarding.spec.js.mp4 (0 seconds)
I have 2 questions:
Is the path name relative to the app service? If I have a app service called randomname and run the Cypress Stage on that randomname app service should I be able to find tCypresshe output in randomname.scm.azurewebsites.net.
If I go into the scm debug console and I do cd D:\a\ I get:
cd : Cannot find path 'D:\a\' because it does not exist.
So how do I actually access my Cypress test results?
I've also tried archiving the files into a zip file:
In the output of the task step I see:
Creating archive: d:\home\testing\somefile.zip
But when I try to access the D:/home/testing folder on my appname.scm.azurewebsites.net I get:
cd : Cannot find path 'D:\home\testing' because it does not exist.
The path D:\a\r1\a is inside the hosted agent that run the release pipeline, is not in your application.
The same thing is for the zip file, when you specify d:/home/... is in the agent.
After the release is finish all the files are deleted, so you need to save the file in another place (maybe in azure?) during the pipeline, for example, with "Azure File Copy" task.
How to delete files in Azure kudu after the deployment ? I wrote some Powershell script using Azure app service deploy task after the deployment using post deployment action step but I couldn't able to delete the files.
I have simple-test.log and simeple.txt files exist in azure kudu.Please help me to solve this issue.
Script:
if((Test-Path 'D:\home\site\wwwroot'))
{
rm simple*
Write-Host "Simple log file is exist,removed"
}
KUDU Log:
KUDU LOG FILES
Deployment Log Snap
using kudu you would need to put it under site\deployments\tools\PostDeploymentActions. then kudu will run it after every deployment automatically. All the ps1, bat, cmd under that directory would be run by kuku
you can also put it to a custom directory, but you'd need to tell kudu where to get it by setting this setting: SCM_POST_DEPLOYMENT_ACTIONS_PATH.
Reading: https://github.com/projectkudu/kudu/wiki/Post-Deployment-Action-Hooks
I have 2 Azure App Service Deploy steps in a Team Services build, they have the same Subscription details. The only difference is that they target different virtual applications - the one that fails contains an é character, could that be the cause? Here the step output:
2017-01-17T16:04:22.8323742Z 8570d8e4-b732-4c45-87c5-619fe9343427 exists true
2017-01-17T16:04:24.5778681Z Got connection details for Azure App Service:'foo'
2017-01-17T16:04:24.6088690Z Running command: "C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb:getParameters -source:package="C:\a\1\a\Foo.zip" > "C:\a\1\s\parameter.xml"
2017-01-17T16:04:25.4027522Z Running command: #echo off
2017-01-17T16:04:25.4027522Z "C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb:sync -source:package="C:\a\1\a\Foo.zip" -dest:auto,ComputerName='https://foo.scm.azurewebsites.net:443/msdeploy.axd?site=foo',UserName='********',Password='********',AuthType='Basic' -setParam:name='IIS Web Application Name',value='foo/bar-é' -userAgent:VSTS_foo_build_154_744 2>error.txt
2017-01-17T16:04:25.4027522Z if %errorlevel% neq 0 exit /b %errorlevel%
2017-01-17T16:04:25.4067519Z [command]C:\Windows\system32\cmd.exe /C C:\a\1\s\msDeployCommand.bat
2017-01-17T16:04:25.4157662Z 'C:\Program' is not recognized as an internal or external command,
2017-01-17T16:04:25.4167533Z operable program or batch file.
2017-01-17T16:04:25.4207534Z ##[error]Failed to deploy App Service.
2017-01-17T16:04:29.2496923Z ##[error]Error: Error: C:\Windows\system32\cmd.exe failed with return code: 9009
2017-01-17T16:04:29.2576899Z ##[section]Finishing: Azure App Service Deploy: foo-dev-global
It's almost as if the Powershell command itself is broken, I'm guessing by the special character.
It maybe not the special character causes that issue. I try to deploy the virtual Application with the special characters é , following is my detail steps. Hope it is useful. We also can get moreinfo about WebDeploy error code please refer to document.
1.Create a new build definition for the project
2.Select build solution corresponding VS version.
Before config Azure App Service Deployment, we need to create a WebApp in the Azure portal and the edit the appsetting to add the
Virtual applications info
Config the Azure App Service Deployment with service name and Virtual application created in the step3
5.New Queue build for the build definition
Then we can check that it deployed successfully from deployment log or from kudu.
This is now working as expected, without me making any changes. Having informed MS of the issue, I can only conclude they've released a fix to the build task.