“Socket Hang Up” / ECONNRESET Error while uploadin

2019-08-20 03:52发布

We're using Google Cloud Storage to store pictures uploaded by our users. For some reason, it stopped to work 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 seems like I can not establish a connection to the Google Cloud Storage.

1条回答
神经病院院长
2楼-- · 2019-08-20 04:33

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.

查看更多
登录 后发表回答