Parse.com或iron.IO返回SSL错误



我用铁。调用下面的parse.com函数来获取用户好友的Facebook详细信息。

var getDetailsForID = function (fbID) {
var thePromise = new Parse.Promise();
// TODO: maybe we can batch several users together into a single request................
console.log("Enter getDetailsForID");
FB.api('/v1.0', 'post', { 
    batch: [
        { method: 'get', name: 'basic',      relative_url: fbID + '?fields=id,name,gender&include_headers=false', omit_response_on_success: false },
    ]
}, function(res) {
    console.log("Enter callback in getDetailsForID");
    if(!res || res.error) {
        console.log(!res ? 'error occurred' : res.error);
        return;
    }
    console.log(" getDetailsForID res: " + res);
    thePromise.resolve(res);
});

console.log("Exit getDetailsForID");
return thePromise;
}

在熨斗里。io log I see:

Enter callback in getDetailsForID
[Error: 139994800940864:error:0607907F:digital envelope routines:EVP_PKEY_get1_RSA:expecting an rsa key:../deps/openssl/openssl/crypto/evp/p_lib.c:288:

以下不调用:

console.log(" getDetailsForID res: " + res);
    thePromise.resolve(res);

你知道怎么解决这个问题吗?

自从这个问题的答案出来后,IronWorker已经发布了一个Docker工作流。请随意使用我们的官方iron/node Docker镜像。https://github.com/iron-io/dockerworker/tree/master/node

啊,这绝对不是Iron的问题。你的Facebook v1.0 API调用有问题。

+ '?fields=id,name,gender&include_headers=false', omit_response_on_success: false

你真的想忽略对成功的回应吗?您要向哪个Facebook端点发送帖子?

编辑
截至2014年7月22日,IronWorker目前设置为0.10.25,如果您的节点版本是<0.10.25你可能会收到这个错误。

fix:加载你自己版本的node在中。worker文件添加以下

deb "http://ppa.launchpad.net/chris-lea/node.js/ubuntu/pool/main/n/nodejs/nodejs_0.10.29-1chl1~trusty1_amd64.deb" 
# OR you can download it from a local copy
deb "nodejs_0.10.29-1chl1~trusty1_amd64.deb"

如果有.deb文件,您可以以类似的方式安装其他丢失或更新的二进制文件版本。

在github上的实践示例

tldr。使用最新版本的node,也可以使用openssl。

最新更新