app engine deploy with [13] Error processing user code - node.js

I download google official latest Node.js app engine demo and deploy to standard env, but this problem arises:
ERROR: (gcloud.app.deploy) Error Response: [13] Error processing user code.
Here is the demo url:
https://github.com/GoogleCloudPlatform/nodejs-docs-samples/tree/master/appengine/hello-world/standard
Someone can take a look for me?

This error has happened before whenever the default App Engine service accounts gets deleted.
Please check that you have have it and it has been not modified.
In case you don't have it (it has been deleted), a workaround would be to use the Undelete API to restore the Default App Engine service account.
You will need to input your service account's unique numeric ID, which can be found in your console's activity logs.

Related

How to change Azure App Services Github workflow deployment environment name

When you create an app there's no option to customize this, it's just there by default.
This matters because sometimes I don't want github actions to say that I'm deploying to "production", I want it to say I'm deploying to "development". But if I change this property manually, I'll get an error in github actions saying: Error: Deployment Failed with Error: Error: Publish profile is invalid for app-name and slot-name provided. Provide correct publish profile credentials for app. But then as soon as it's changed back the deployment works again, so I need to find a way to change this property in Azure?
Always the main slot of the webapp is called production, there is no way to change it.

Azure Function publish - "Timed out waiting for SCM to update the Environment Settings"

I've deployed and published several Function Apps without issues over the last 12 months. However, as of this week, when publishing a Function App using the following PowerShell script:
func azure functionapp publish <functionAppName> --java
I will receive the following error after a few minutes: "Timed out waiting for SCM to update the Environment Settings"
Similarly, I'm also unable to deploy any Function Apps, using:
mvn azure-functions:deploy
In the Function App activity log, the following error is logged for both cases:
Operation name: Sync Web Apps Function Triggers.
Status: Failed.
Error code: BadRequest (HTTP Status Code: 400)
Message: Encountered an error (InternalServerError) from host runtime.
So far I've created the Application setting WEBSITE_WEBDEPLOY_USE_SCM (value: true) based on feedback in another topic, which unfortunately hasn't helped. Other than that I've not been able to find much other information on this issue.
Does anyone have any thoughts?
Resolved this issue myself. The Application Setting WEBSITE_CONTENTAZUREFILECONNECTIONSTRING contained an outdated storage account key.

Error while creating bot

I am getting error while creating bot. I am trying to deploy a Web app bot. After specifying the name of resource group and their location I click on create. After which bot deployment process starts. But it ends up with an error:
MsaAppId: MsaAppId is already in use..
What can I do successfully deploy a basic bot. This is second time in a week, I am facing something like this on Azure.
Edit
Initially I was using Autocreate MsaAppId & Password option. That didn't work out (although that used to work)
Then I tried a couple of times with Create MsaAppId & Password option. Which takes to a different page to generate AppId & password, and I pasted the new keys in the provided fields.
Still the same result. MSA App Id already in use
Edit 2
As one of the answer mentioned, I tried creating a separate Bot Registration which I will link up with the Web app later.
But that fails with a weird message saying, App Insights is already deployed, and cannot deploy with same name, when in fact, I have not asked for any new App Insights instance to be deployed. Attaching a screenshot
it ends up with an error:
MsaAppId: MsaAppId is already in use..
I have same problem, when I create the web app bot (select Auto create App ID and password option), it failed at creating botServices resource.
Deployment:
Failed operation details:
I also tried to manually create app on https://apps.dev.microsoft.com and provide App ID and password for creating botService, but the deployment still failed.
As a workaround, I manually created Bot Channels Registration and specify corresponding web application URL as message endpoint, and then modify Application settings of that corresponding Azure web site with new App ID and password, which works for me.
Note:
I suspect something wrong with Azure while performing deployment and creating botServices, if possible, you can report it on Azure portal or create an issue on github.
Updated:
I click Automation options and download the template after I enter the required information/fields for creating a new web app bot, and then I perform deployment by using powershell with downloaded template&parameter file, which work for me, you can try it.

Hosting Parse on Azure - Internal Server Error

EDIT: I have enabled logging, here is the error in more detail:
Uncaught internal server error. { [MongoError: Authentication failed.]
name: 'MongoError',
message: 'Authentication failed.',
ok: 0,
code: 18,
I've been following the Microsoft Azure guide to setting up Parse on Azure, which is here.
I've completed the steps and have everything up and running, however, when I try to create a new account on my Obj-C app, I get the error [Error]: {"code":1,"message":"Internal server error."} (Code: 1, Version: 1.12.0).
I'm not sure why this happens, as I can see on Azure that I am getting multiple requests and HTTP errors.
Also the parse source I'm using is the one Azure have provided/forked, so maybe that's where the error is coming from?
Thanks.
The error is with your MongoDB authentication. Double check you followed the steps correctly for the Parse on Azure tutorial, so that there isn't any hard coded incorrect "username/password123" strings
Double check that the URI is correct. I had some issues when migrating. If you use the Parse Server Managed on Azure, it creates the server for you and you can check the Database URI structure there. (In the web app - application settings - DATABASE_URI)
You can also open the settings of the documentDB and check the URI settings there.
Another trick is that if you change the DATABASE_URI setting (in application settings) make sure you restart your web app.
Make sure you have added "/parse" at the end of your URL

Azure NodeJS console log

I have a Visual Studio Enterprise MSDN subscription so I decided to move from Heroku to Microsoft Azure because I used to pay: now I don't. My Service Plan is the D1.
I wish I can trail the console.log strings of my Node JS application deployed on my Azure platform. My service plan is the shared one named
I deployed the app code on BitBucket and linked my repo to the application with a correct destribution. Correct means I see the green check flag. I deployed, on the main folder of the app, a file named IISNode.yml, here is the content:
nodeProcessCommandLine: "D:\Program Files (x86)\nodejs\0.12.6\node.exe"
loggingEnabled: true
debuggingEnabled: false
devErrorsEnabled: false
node_env: production
The firse line I copied from the iisnode.yml created by Azure itselves. The other lines I am not quite sure about the exact meanings of all of them, but I figured they were enough. If I visit the url: http://MY_APP_NAME.scm.azurewebsites.net/DebugConsole I can click on Tools->Log Stream menu but the page remains on loading.
I can reach the Azure Portal, enter my node app, Tools -> Application Log and Web Server log. The application log shows this (I think quite interesting) message:
System.ApplicationException: The trace listener AzureBlobTraceListener is disabled. ---> System.InvalidOperationException: The SAS URL for the cloud storage account is not specified. Use the environment variable 'DIAGNOSTICS_AZUREBLOBCONTAINERSASURL' to define it.
at Microsoft.WindowsAzure.WebSites.Diagnostics.AzureBlobTraceListener.RefreshConfig()
I have not reached informations about this "environment variable", and I can0t guess what the BLOB container has to do with my log application. And: what is the correct value for this variable? And if there is any, why is that one correct?
The Web Servier log is are empty. I can see http activities from the monitor of the app on the same portal, but still no log.
Am I missing something ? I decided to install Visual Studio, maybe this will help? I hope this has tools to be integrated with Azure for good. Meanwhile, where is the console log of my (Extremely Simple) node application?
You can view your logs in real time if you use the azure SCM interface. This can usually be accessed on the following url
https://{{ name of webapp }}.scm.azurewebsites.net/api/logstream
All your console output from your application is redirected here.
You can also use curl:
curl -u {{ deploymentCredentialsUsername:deploymentCredentialsPassword }} https://webapp-name.acm.azurewebsites.net/api/logstream
Otherwise you could use the nodejs azure cli. Install it with
npm install -g azure-cli
Switch to asm mode:
azure config mode asm
Then you can proceed to look at the logs from your terminal:
azure site log tail {{ webapp name }}
You can add an item in iisnode.yml named logDirectory, set the value as iisnode for example, then the application will create a folder in this name in your root directory and store files with stdout and stderr captures in it. You can refer to https://github.com/tjanczuk/iisnode/blob/master/src/samples/configuration/iisnode.yml#L94 for the details for this configuration.
You can store logs in files whatever you need via console.log(), then the application will create a html file index.html in the log folder to provide logs. You can visit the logs via the URL: http://<you_app_name>.azurewebsites.net/<log_file_name>/index.html
Additionally, you can leverage Node.js console class to customize logger, refer to https://nodejs.org/api/console.html#console_new_console_stdout_stderr for the sample
If you are using the Azure Portal web interface, you can find the console.log output under the Log Stream section under Monitoring.
Refer to the screenshot below:

Resources