I am developing a GAS app.
Im using clasp to develop locally. I managed to get the connection working in order to run functions locally.
This required to move the GAS project from the default one to a new dedicated project.
I had to set up a proper OAuth ID in order to get the credentials for clasp, as they show in their Documentation.
The issue now is that the previosuly working webb app deployment dont work anymore. I get the next error:
404:
The requested URL /scripts/<MyProjectId>:run was not found on this server.
error screenshot
I'm thinking the web app deployment needs a proper OAuth or some other configuration in the new GCProject, but i cant figure out what it is.
Thanks in advance for any help.
I have a bunch of logs in the Stackdriver Logging console for a Google Cloud Function called 'Daily_ETL_Job'. I edit the code and redeploy this function, keeping the same name. Once the redeployment succeeds, I can no longer view the previous versions' logs in the Logging console. I just see a blank screen with no logs at all.
Is there some other way to view these prior deployment invocation logs?
I'm trying to make a firebase firestore function to send a notifications from device to device but when I deploy it I get this error in the console log.
{"#type":"type.googleapis.com/google.cloud.audit.AuditLog","status":{"code":9,"message":"FAILED_PRECONDITION"},"authenticationInfo":{"principalEmail":"ahmednab93#gmail.com"},"requestMetadata":{"callerIp":"156.208.116.97","callerSuppliedUserAgent":"FirebaseCLI/7.2.1,gzip(gfe),gzip(gfe)","requestAttributes":{"time":"2019-07-29T16:14:02.968Z","auth":{}},"destinationAttributes":{}},"serviceName":"cloudfunctions.googleapis.com","methodName":"google.cloud.functions.v1.CloudFunctionsService.UpdateFunction","authorizationInfo":[{"permission":"cloudfunctions.functions.update","granted":true,"resourceAttributes":{}},{"resource":"projects/pharmacy-20900/locations/us-central1/functions/sendNotification","permission":"cloudfunctions.functions.update","granted":true,"resourceAttributes":{}}],"resourceName":"projects/pharmacy-20900/locations/us-central1/functions/sendNotification","request":{"updateMask":"sourceUploadUrl,name,labels,runtime,eventTrigger.resource,eventTrigger.eventType,eventTrigger.service","#type":"type.googleapis.com/google.cloud.functions.v1.UpdateFunctionRequest","function":{"eventTrigger":{"eventType":"providers/cloud.firestore/eventTypes/document.write","resource":"projects/pharmacy-20900/databases/(default)/documents/pharmacies/{pharmacy_id}/notifications/{notification_id}","service":"firestore.googleapis.com"},"sourceUploadUrl":"https://storage.googleapis.com/gcf-upload-us-central1-0d95e983-f4fa-4c11-81b9-6e4469829392/ddcadf56-bd44-4316-a945-6736ef01c7eb.zip?GoogleAccessId=service-410106319211#gcf-admin-robot.iam.gserviceaccount.com&Expires=1564418639&Signature=ElmWD3IeTx8j%2FdJKqMOjBZ4BnZ22MUS7uiZ77xtX1lZULFtHQ0%2F4QVBU%2BIum8%2Fdrv%2BaeTNa7mjN00HZEL7eVnDlX1ogxKdDv3ZeBBfrKDDz9NWqY3M126mFT48dAVdkRDBBEMcKllQoELKgwnJK6aRyDWawYVx5O64Ybrczr3y4RlmlFxa57ZT7418HoWRgV%2FH5IlFymTYPbHTG2lbJfEN4KBrTUv0WBvYx%2BViOvwAMnq8DerXj9q6SkBXt8zSTDmUirsOWEUcsVGh6nEYvg0EWRNCiklxiQys%2BLeJvE4pSsUrs%2BwPeErOFWZd%2FeOwyojpkA617f8Yf6qHrpjrugyA%3D%3D","runtime":"nodejs8","name":"projects/pharmacy-20900/locations/us-central1/functions/sendNotification","labels":{"deployment-tool":"cli-firebase"}}}}
what this error implies?
In my case, I could deploy successfully after deleting the existing version of the function giving the error. Maybe the cause of the error was the existing version used node 10, while the new version used node 8.
I have a web app published to Azure built in Visual Studio MVC. Many times after publishing updated files the app will fail when querying the database so it seems. For instance the home page will load fine but the app will crash when a link is selected that connects to my database. It is a MySQL database hosted remotely.
Here's the error for the deployed version:
I'm not sure how to interpret the error either and I've looked into enabling development mode in my app but as far as I can tell it is enabled.
Occasionally after a few restarts through Azure the app will start working fine and the app consistently works when I build and launch through Visual Studio. It leads me to believe this is an Azure issue conflicting with my data base setup.
It's making testing a real hassle and I don't have confidence the app/database will be up when I need it to.
Thank you for your help!
I think that you need to get the detailed error message to interpret the error.
To get the error message in azure, we can watch the diagnostic logs, about how to do this, we can refer to: Enable diagnostics logging for web apps in Azure App Service
We can also display the error message directly on browser. For example, if you are using ASP.NET core MVC, we can do as below:
Replace the below code of Startup class:
if (env.IsDevelopment())
{
app.UseBrowserLink();
app.UseDeveloperExceptionPage();
}
else
{
app.UseExceptionHandler("/Home/Error");
}
With:
app.UseBrowserLink();
app.UseDeveloperExceptionPage();
When the error occurs again, we can see the error message at browser directly
I am following this doc.
I know Cloud functions make an HTTP request to your function, run the following command.
https://cloud.google.com/functions/docs/
I'd like to run a API that created in advance when the Stackdriver alerts may be triggered. I have already defined simple custom log-based metrics in GCP.
For example, I create a Stackdriver Alert detecting an unexpected error GAE log.
I want system to be down if that alert me.
It is possible to autmatic control APIs using StackDriver Alerting and Cloud funtions? if you were me?