Hi,
I have setup some unit and integration tests and now when I try to remove from file-collection I get the following error:
I20160818-15:20:53.411(3)? Exception in callback of async function: Error: Lock.removeLock Lock document not found in collection.
I20160818-15:20:53.412(3)? at Object.Future.wait (C:\Users\Ignas\AppData\Local.meteor\packages\meteor-tool\1.4.0-1\mt-os.windows.x86_32\dev_bundle\server-lib\nodemodules\fibers\future.js:449:15)
I20160818-15:20:53.412(3)? at .extend.wrapAsync (packages/meteor/helpers.js:119:1)
I20160818-15:20:53.412(3)? at packages/vsivsi_file-collection/src/gridFS_server.coffee:318:22
I20160818-15:20:53.413(3)? at SynchronousCursor.forEach (packages/mongo/mongo_driver.js:1057:16)
I20160818-15:20:53.413(3)? at Cursor.meteorInstall.node_modules.meteor.mongo.mongodriver.js..each.Cursor.(anonymous function) (packages/mongo/mongo_driver.js:904:44)
I20160818-15:20:53.413(3)? at Cursor.hijackDBOps.forEach.cursorProto.(anonymous function) (packages/meteorhacks_kadira/lib/hijack/db.js:126:1)
I20160818-15:20:53.414(3)? at Cursor.kadira_Cursor_forEach as forEach
I20160818-15:20:53.414(3)? at FileCollection.remove (packages/vsivsi_file-collection/src/gridFS_server.coffee:317:29)
I20160818-15:20:53.414(3)? at server/jobsBusinessLogic.js:16:29
I20160818-15:20:53.415(3)? at meteorInstall.node_modules.meteor.mongo.collection.js.Mongo.Collection.upsert.callback (packages/mongo/collection.js:651:5)
I20160818-15:20:53.415(3)? - - - - -
I20160818-15:20:53.416(3)? at emitError (C:\Users\Ignas\AppData\Local.meteor\packages\vsivsi_file-collection\1.3.6\npm\node_modules\gridfs-locks\index.js:419:37)
I20160818-15:20:53.416(3)? at C:\Users\Ignas\AppData\Local.meteor\packages\vsivsi_file-collection\1.3.6\npm\node_modules\gridfs-locks\index.js:188:16
I20160818-15:20:53.416(3)? at handleCallback (C:\Users\Ignas\AppData\Local.meteor\packages\vsivsi_file-collection\1.3.6\npm\node_modules\mongodb\lib\utils.js:96:12)
I20160818-15:20:53.417(3)? at C:\Users\Ignas\AppData\Local.meteor\packages\vsivsi_file-collection\1.3.6\npm\node_modules\mongodb\lib\collection.js:2395:14
I20160818-15:20:53.417(3)? at handleCallback (C:\Users\Ignas\AppData\Local.meteor\packages\vsivsi_file-collection\1.3.6\npm\node_modules\mongodb\lib\utils.js:96:12)
I20160818-15:20:53.417(3)? at C:\Users\Ignas\AppData\Local.meteor\packages\vsivsi_file-collection\1.3.6\npm\node_modules\mongodb\lib\db.js:319:5
I20160818-15:20:53.418(3)? at commandCallback (C:\Users\Ignas\AppData\Local.meteor\packages\vsivsi_file-collection\1.3.6\npm\node_modules\mongodb-core\lib\topologies\server.js:1246:9)
I20160818-15:20:53.418(3)? at [object Object].Callbacks.emit (C:\Users\Ignas\AppData\Local.meteor\packages\vsivsi_file-collection\1.3.6\npm\node_modules\mongodb-core\lib\topologies\server.js:119:3)
I20160818-15:20:53.420(3)? at [object Object].messageHandler (C:\Users\Ignas\AppData\Local.meteor\packages\vsivsi_file-collection\1.3.6\npm\node_modules\mongodb-core\lib\topologies\server.js:397:23)
I20160818-15:20:53.425(3)? at Socket.dataHandler (C:\Users\Ignas\AppData\Local.meteor\packages\vsivsi_file-collection\1.3.6\npm\node_modules\mongodb-core\lib\connection\connection.js:302:22)
I have no idea what's wrong, maybe you could take a look at stacktrace and at least give me some hints of the nature of this problem?
In test sample data I did just a simple insert like this:
MyCollection.insert({metadata: metadata, length: 1, uploadDate: new Date()});
OK I rewrote code a little bit and the problem is gone. I don't know what was exactly wrong but most likely it was my error in setting up testing environment.
Hi, I have setup some unit and integration tests and now when I try to remove from file-collection I get the following error:
I have no idea what's wrong, maybe you could take a look at stacktrace and at least give me some hints of the nature of this problem? In test sample data I did just a simple insert like this: