我们有2个环境(分期和Beta版),并使用演示客户帐户(两者均相同)。我没有,但是docusign webhook请求仅在分阶段前就停止工作了。我们没有做太多改变。现在,在Docusign管理员的“失败的连接通知”部分中,我们得到了The request was aborted: The connection was closed unexpectedly.
。我搜索了错误消息,但没有得到任何有用的信息。
您能否告知此错误是什么意思,或者我可以如何调试/修复该错误?
更新: 从Docusign管理员“连接失败通知”-link on the picture
我还从Docusign日志中下载了13_OK_GetConnectFailures.txt
文件,例如:
{"type":"failure",
"failures":[{
"accountId":"8c188fc6-e77a-4777-843b-bb4595835d48",
"envelopeId":"78c31c0e-28e0-4a9d-bcc6-ac20d583eb18",
"subject":"Please sign this document",
"created":"2019-03-04T21:37:42.0300000Z",
"userName":"Hanover Specialty Lines",
"email":"our_email",
"status":"completed",
"lastTry":"2019-03-04T21:37:42.0300000Z",
"retryCount":"0",
"error":"https://our_domain_com/api/docusign/webhook :: Error - The request was aborted: The connection was closed unexpectedly.",
"connectId":"Envelope",
"failureUri":"/accounts/8c188fc6-e77a-4777-843b-bb4595835d48/connect/failures/16025814",
"failureId":"16025814",
"retryUri":"/accounts/8c188fc6-e77a-4777-843b-bb4595835d48/connect/envelopes/78c31c0e-28e0-4a9d-bcc6-ac20d583eb18/retry_queue"
},
所以我看不到任何有用的描述...
更新: 我尝试了webhook.site,下一条消息出现在DocuSign link to the picture中 但是我也将生成的Webhook设置在本地计算机上,DocuSign向该Webhook发送了很好的请求。暂存env和我的本地计算机上的代码相同。
更新:
我尝试替换所有.includeDocuments
设置并将其设置为false
,然后收到403代码错误see picture
/**
* Composing a notification is complex and requires to prepare several layers under
* the main EventNotification object.
*
* @method getEventNotification
*/
getEventNotification() {
// Setup EventNotification settings
const eventNotification = new docusign.EventNotification();
eventNotification.url = this.configuration.webhookUrl;
eventNotification.loggingEnabled = 'true';
eventNotification.requireAcknowledgment = 'true';
eventNotification.useSoapInterface = 'false';
eventNotification.includeCertificateWithSoap = 'false';
eventNotification.signMessageWithX509Cert = 'false';
eventNotification.includeDocuments = 'true';
eventNotification.includeDocumentFields = 'true';
eventNotification.includeEnvelopeVoidReason = 'true';
eventNotification.includeTimeZone = 'true';
eventNotification.includeSenderAccountAsCustomField = 'true';
eventNotification.includeDocumentFields = 'true';
eventNotification.includeCertificateOfCompletion = 'true';
// Add states to get notified on (Envelope and Recipient-level)
const envelopeEvents = [];
[
'sent',
'delivered',
'completed',
'declined',
'voided',
].forEach(eventKey => {
const event = new docusign.EnvelopeEvent();
event.envelopeEventStatusCode = eventKey;
event.includeDocuments = true;
envelopeEvents.push(event);
});
const recipientEvents = [];
['Sent', 'Delivered', 'Completed', 'Declined'].forEach(eventKey => {
const event = new docusign.RecipientEvent();
event.recipientEventStatusCode = eventKey;
event.includeDocuments = true;
recipientEvents.push(event);
});
eventNotification.envelopeEvents = envelopeEvents;
eventNotification.recipientEvents = recipientEvents;
return eventNotification;
}
答案 0 :(得分:0)
通常,Connect错误消息The request was aborted: The connection was closed unexpectedly
表示Connect系统尝试向您的服务器(您的“监听器”)发出HTTPS POST请求时未收到响应。
要调试,请仔细检查服务器的日志,以查看在连接错误消息中指定的时间是否有传入请求。然后了解该请求发生了什么。
由于该请求最终将由Connect重试,或者被同一信封的另一个通知消息所取代,因此,如果该请求很少发生,则没什么大不了的。
如果您没有看到对侦听器服务器的任何传入POST请求,则您的服务器可能在Internet上不可用。
请记住,您的侦听器服务器需要在公共互联网上可用,以便DocuSign可以向其发出POST请求。
通过向其发出POST请求来测试侦听器的网络连接。您可以使用curl来实现此目的(但您的测试计算机不应位于侦听器所在的网络或VPN上)。
或者您可以使用公共测试工具,例如https://www.apirequest.io/或https://apitester.com/
答案 1 :(得分:0)
Docusign由于防火墙而被阻止,因为它未设置某些我们检查过的标头。因此,您需要检查防火墙设置。并检查此问题的其他答复。他们真的帮了我!