Aly Aly - 1 year ago 86
Node.js Question

Gcloud crashes with a time data error when using “gcloud app logs read” command

I’m encountering an error that I’ve never seen before when I run “gcloud app logs read” after deploying my app using "gcloud app deploy".

This is the error: “ERROR: gcloud crashed (ValueError): time data '2016-09-16T19:39:42Z' does not match format '%Y-%m-%dT%H:%M:%S.%fZ'”

I thought it might be because of some changes I made to the app, but I tried deploying a simple server and I’m still getting the same error when I try to look at the logs. Again, it does seem to be deploying, so I’m having trouble figuring out what the problem is with the logging functionality.

IOW, no matter what I deploy, I get the same error.

I get the same error when I deploy this:

'use strict';

var express = require('express');

var app = express();

app.get('/', function (req, res) {
res.status(200).send('Hello, world!');

// Start the server
var server = app.listen(process.env.PORT || '8080', function () {
console.log('App listening on port %s', server.address().port);
console.log('Press Ctrl+C to quit.');

If anyone has any ideas, it would be much appreciated. Thank you.

Edit: Added code.

Answer Source

This is related to a known issue and should be fixed shortly. You can check the logs in the Cloud Console, or using the gcloud beta logging read command instead in the meantime.

Update: we have a fix expected in the next Cloud SDK release.

Update: Cloud SDK 127.0.0 is out; please update your client and this should be resolved.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download