Firebase Log error FAILED_PRECONDITION code 9 - google-cloud-functions

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.

Related

Server error occurred at DriveApp.createFile

Every time I'm trying to manually invoke this test function in my script I get Server Error occurred. Please wait and try again (in a red bar on top of the editor window).
My original intention was to save a blob with createFile(blob) in my Web App, but it just fails with no error output, so I created this minimal test function.
function testgdrive()
{
var gdrive_file =
DriveApp.createFile("testfile","testcontents",MimeType.PLAIN_TEXT);
}
EDIT: This happens both on old Rhino engine and the new V8 engine as well.
The Web App is being deployed as a Google Sheets script on my basic (free) GSuite account.
It is a Google Cloud project, as I wasn't able to get any logs for Web App executions in the Standard mode at all.
For server errors such as
Server Error occurred. Please wait and try again
Creating/switching over to a new project may resolve the issue.

CodeIgniter's error log doesn't seem to report all errors

I'm currently creating a web application through linux OS (debian), using php7, codeIgniter 3, Nginx and Mysql.
Few months ago, all my PHP errors used to be reported in the default nginx log error (located at : /var/log/nginx/)
But recently, I have configured CodeIgniter in purpose to report those errors inside the folder of my application.
It seemed to work, because I noticed that my current errors were repported in this new log file.
However, "some" errors don't seem to be reported. For example, I have a form in my web application, running aswell with Javascript (ajax use). Once I send the form, I can notice in my browser's console an Error 500 (internal server error). However, this error is not reported in my error log file ! (and I already checked in the former log file belonging to Nginx, there's nothing too)
What am I supposed to do ?
Thanks you.

IBM MobileFirst 7.0 with Sencha Touch in Windows Phone 8.1 showing errors

I am using weinre is WEb INspector REmote for debugging IBM Worklight 7.0-sencha touch 2.4 App.
Tested in Windows Phone Emulator 8.1 WVGA 4 inch 512MB.
When Application Starts it Shows :
Local storage capacity reached. Client logs will not be persisted
LocalStorage Quota exceeded, cannot store -x- wmapp0: /www/default/css/app.css locally
LocalStorage Quota exceeded, cannot store -x-wmapp0:/www/default/app.js locally
ondeviceready event dispatched
wlclient init started
CookieMgr read cookies: {}
When We Call Worklight Adapter WL.Client.invokeProcedure Calls it Shows Errors Like:
WL.Utils.getSkinLoaderChecksum(..) should be supported only on environments that support direct update Error: WL.Utils.getSkinLoaderChecksum(..) should be supported only on environments that support direct update.
[/apps/services/api/myApplication/windowsphone8/query] exception. TypeError: Unable to get property 'notificationTitle' of undefined or null reference
Uncaught Exception: Unable to get property 'notificationTitle' of undefined or null reference at (compiled_code):3667
The first error has nothing to do with MobileFirst; if you're using localstorage in your app it seems you have over-used it.
The second error should not happen and sounds like a product defect. You need to open an IBM support ticket (PMR) and provide the following details: full version number (with build number), a test case app that reproduces the error.

Error Logging in windows Phone8 app

How can we log exceptions and error for windows Phone8.0 app
I also want a mechanism to delete the logs after a period of time
Is there a method other than ISO to log error
thanks in advance
Write them to files in isolated storage. You can write code to iterate over the file system to clean them up. If this is just for testing use Windows Phone Power Tools to manually remove logs.
An alternative is to build a logging service and have your devices connect and write to it when they have a data connection.

How to retrieve crash logs from Windows Phone 8 programmatically?

I have a WP8 App where I want to store the crash logs if and when generated.
Is there any way of fetching the crash dump file from Windows Phone 8 programmatically?
As far as I know, you can't retrieve the crash dumps that are automatically sent to the DevCenter. However, what you can do is subscribing to the global unhandled exception event handler, store the exception contents in the isolated storage, then do whatever you need with it (like sending it to a remote server). That's what many applications do, and it's even automated by some libraries (such as Telerik).
You can achieve that by using a logging system as MetroLog. You'll be able to collect these crash logs if you configure GlobalCrashHandler that will ensure that a FATAL log entry is written if an unhandled exception occurs.
You can install it using NuGet
Install-Package MetroLog
Here's an quick example:
using MetroLog;
using MetroLog.Targets;
LogManagerFactory.DefaultConfiguration.AddTarget(LogLevel.Trace, LogLevel.Fatal, new FileStreamingTarget());
GlobalCrashHandler.Configure();
ILogger log = LogManagerFactory.DefaultLogManager.GetLogger<MainPage>();
log.Trace("This is a trace message.");
You can find a tutorial explaining how to add it on your project at http://talkitbr.com/2015/06/11/adicionando-logs-em-universal-apps. Also there is an explanation regarding retrieving these logs.