I have a relatively simple code to upload files to GridFS with mon...@2.2.27 (Node.js v6.10.3):
```
let store = gridstore.openUploadStreamWithId(id, null, opts);
store.once('error', err => {
callback(err);
});
store.once('finish', () => {
callback(null, id);
});
store.end(data);
```
At least once there has been an exception while uploading. Unfortunately I don't have the data available that was trying to get uploaded. The exception that was thrown looks like this:
```
/path/to/app/node_modules/mongodb/lib/utils.js:123
process.nextTick(function() { throw err; });
^
Error: Digest already called
at Error (native)
at Hash.digest (crypto.js:81:23)
at checkDone (/path/to/app/node_modules/mongodb/lib/gridfs-stream/upload.js:259:17)
at /path/to/app/node_modules/mongodb/lib/gridfs-stream/upload.js:427:11
at /path/to/app/node_modules/mongodb/lib/collection.js:536:5
at /path/to/app/node_modules/mongodb/lib/collection.js:714:5
at handleCallback (/path/to/app/node_modules/mongodb/lib/utils.js:120:56)
at executeCommands (/path/to/app/node_modules/mongodb/lib/bulk/ordered.js:398:12)
at resultHandler (/path/to/app/node_modules/mongodb/lib/bulk/ordered.js:425:5)
at /path/to/app/node_modules/mongodb-core/lib/connection/pool.js:469:18
```
The app has uploaded more than a million files and I've seen this exception only once so far. It caused the process to crash though as it is uncatchable (in normal ways).
Regards,
Andris Reinman