Back to All

submitProof command not working sometimes

tried using both collection level and database level proofs but same thing happen. Also purchased the developer plan but no luck. Here is the service(for a document level proof) & the error:

dbObject.command(
{
submitProof: currentVersion,
collections: ["provenDiamonds"],
filter: newDocument, },
(error, res) => {
if (error) {
console.error(error);
reject("Could not submitproof for version.");
} else {
console.log(res);
resolve("New proof created.", res);
}
}
);

ERROR =>

MongoServerError: UNAVAILABLE: io exception
at MessageStream.messageHandler (F:\Builds\test\node_modules\mongodb\lib\cmap\connection.js:467:30)
at MessageStream.emit (events.js:315:20)
at processIncomingData (F:\Builds\test\node_modules\mongodb\lib\cmap\message_stream.js:108:16)
at MessageStream._write (F:\Builds\test\node_modules\mongodb\lib\cmap\message_stream.js:28:9)
at writeOrBuffer (internal/streams/writable.js:358:12)
at MessageStream.Writable.write (internal/streams/writable.js:303:10)
at TLSSocket.ondata (internal/streams/readable.js:719:22)
at TLSSocket.emit (events.js:315:20)
at addChunk (internal/streams/readable.js:309:12)
at readableAddChunk (internal/streams/readable.js:284:9) {
ok: 0,
code: 125,
codeName: 'CommandFailed'
}

the thing is those documents stored in the database without a proof and the request not get resolved or rejected either. Here I attached the output when I try to get the proof of such documents using getDocumentProof.

{
"collection": "provenDiamonds",
"version": 25,
"documentId": "61de71ac00c5985c343f70e3",
"errmsg": "There is no proof for this version of the document"
}