"Socket Hang Up" / ECONNRESET error while uploading to Google Cloud Storage

We use Google Cloud Storage to store images uploaded by our users. For some reason, it stopped working today.

var googleapis = require('googleapis');
var GoogleAuth = require('google-auth-library');

var googleAuth = new GoogleAuth();
var authClient = new googleAuth.JWTClient(
    accountEmail, keyFile, null,
    'https://www.googleapis.com/auth/devstorage.read_write'
);

authClient.authorize(function (err) {
    // Error here: { [Error: socket hang up] code: 'ECONNRESET' }
});

      

So, it looks like I am unable to establish a connection to google cloud storage.

0


source to share


1 answer


I was using Node v0.12 and required the longjohn package. When I exclude the longjohn package (which is only for longer stack traces) it works. I don't know why, but maybe it helps someone.



+1


source







All Articles