FrancoisMentec / OpenCompare2

https://opencompare.org/
3 stars 4 forks source link

Server shutdown when PCM does not exist #4

Open FAMILIAR-project opened 6 years ago

FAMILIAR-project commented 6 years ago

Hi,

We have tried to load the following PCM https://opencompare.org/pcm/5757b9be975a3c01a5e5b477

the server is down. We suspect it has problems to handle a non-existing PCM (with a non-existing ID)

Informations : source: https://opencompare.org/

FAMILIAR-project commented 6 years ago

The trace

`/var/www/jsoc2/OpenCompare2/node_modules/mongodb/lib/utils.js:123 process.nextTick(function() { throw err; }); ^

TypeError: Cannot read property '_id' of null at new PCM (/var/www/jsoc2/OpenCompare2/public/js/pcm.js:11:13) at /var/www/jsoc2/OpenCompare2/src/editSessionManager.js:33:20 at /var/www/jsoc2/OpenCompare2/src/db.js:59:13 at handleCallback (/var/www/jsoc2/OpenCompare2/node_modules/mongodb/lib/utils.js:120:56) at /var/www/jsoc2/OpenCompare2/node_modules/mongodb/lib/collection.js:1417:5 at handleCallback (/var/www/jsoc2/OpenCompare2/node_modules/mongodb/lib/utils.js:120:56) at /var/www/jsoc2/OpenCompare2/node_modules/mongodb/lib/cursor.js:682:5 at handleCallback (/var/www/jsoc2/OpenCompare2/node_modules/mongodb-core/lib/cursor.js:171:5) at setCursorNotified (/var/www/jsoc2/OpenCompare2/node_modules/mongodb-core/lib/cursor.js:515:3) at /var/www/jsoc2/OpenCompare2/node_modules/mongodb-core/lib/cursor.js:590:16 `