Picture of Suresh Kumar
Issue when previewing a course
by Suresh Kumar - Friday, 1 September 2017, 8:41 AM
 

Hi,

When I preview a course, one or more images seem to be not loaded in the preview and then I refresh the screen, the tool got crashed. I had to reach out to the server team to restart the server ("node server" command). I am facing this issue quite frequently during preview. I shared the error log below. It would be great if there is any suggestion to avoid such issue. Thanks.

/Users/sureshkumars/AdaptDev/adapt_authoring/node_modules/connect-mongo/node_modules/bluebird/js/release/async.js:61

        fn = function () { throw arg; };

                           ^

 

TypeError: Cannot read property 'toString' of undefined

    at ServerResponse.writeHead (_http_server.js:190:44)

    at ServerResponse.writeHead (/Users/sureshkumars/AdaptDev/adapt_authoring/node_modules/compression/node_modules/on-headers/index.js:55:19)

    at ServerResponse.writeHead (/Users/sureshkumars/AdaptDev/adapt_authoring/node_modules/express-session/node_modules/on-headers/index.js:55:19)

    at ServerResponse._implicitHeader (_http_server.js:157:8)

    at ServerResponse.end (/Users/sureshkumars/AdaptDev/adapt_authoring/node_modules/compression/index.js:102:14)

    at writeend (/Users/sureshkumars/AdaptDev/adapt_authoring/node_modules/express-session/index.js:261:22)

    at MongoStore.onsave (/Users/sureshkumars/AdaptDev/adapt_authoring/node_modules/express-session/index.js:335:11)

    at MongoStore.tryCatcher (/Users/sureshkumars/AdaptDev/adapt_authoring/node_modules/connect-mongo/node_modules/bluebird/js/release/util.js:16:23)

    at Promise.successAdapter [as _fulfillmentHandler0] (/Users/sureshkumars/AdaptDev/adapt_authoring/node_modules/connect-mongo/node_modules/bluebird/js/release/nodeify.js:23:30)

    at Promise._settlePromise (/Users/sureshkumars/AdaptDev/adapt_authoring/node_modules/connect-mongo/node_modules/bluebird/js/release/promise.js:566:21)

    at Promise._settlePromise0 (/Users/sureshkumars/AdaptDev/adapt_authoring/node_modules/connect-mongo/node_modules/bluebird/js/release/promise.js:614:10)

    at Promise._settlePromises (/Users/sureshkumars/AdaptDev/adapt_authoring/node_modules/connect-mongo/node_modules/bluebird/js/release/promise.js:693:18)

    at Promise._fulfill (/Users/sureshkumars/AdaptDev/adapt_authoring/node_modules/connect-mongo/node_modules/bluebird/js/release/promise.js:638:18)

    at Promise._resolveCallback (/Users/sureshkumars/AdaptDev/adapt_authoring/node_modules/connect-mongo/node_modules/bluebird/js/release/promise.js:432:57)

    at Promise._settlePromiseFromHandler (/Users/sureshkumars/AdaptDev/adapt_authoring/node_modules/connect-mongo/node_modules/bluebird/js/release/promise.js:524:17)

    at Promise._settlePromise (/Users/sureshkumars/AdaptDev/adapt_authoring/node_modules/connect-mongo/node_modules/bluebird/js/release/promise.js:569:18)

    at Promise._settlePromise0 (/Users/sureshkumars/AdaptDev/adapt_authoring/node_modules/connect-mongo/node_modules/bluebird/js/release/promise.js:614:10)

    at Promise._settlePromises (/Users/sureshkumars/AdaptDev/adapt_authoring/node_modules/connect-mongo/node_modules/bluebird/js/release/promise.js:693:18)

    at Promise._fulfill (/Users/sureshkumars/AdaptDev/adapt_authoring/node_modules/connect-mongo/node_modules/bluebird/js/release/promise.js:638:18)

    at /Users/sureshkumars/AdaptDev/adapt_authoring/node_modules/connect-mongo/node_modules/bluebird/js/release/nodeback.js:42:21

    at handleCallback (/Users/sureshkumars/AdaptDev/adapt_authoring/node_modules/mongoose/node_modules/mongodb/lib/utils.js:96:12)

    at /Users/sureshkumars/AdaptDev/adapt_authoring/node_modules/mongoose/node_modules/mongodb/lib/collection.js:974:5

    at /Users/sureshkumars/AdaptDev/adapt_authoring/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:772:13

    at Callbacks.emit (/Users/sureshkumars/AdaptDev/adapt_authoring/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:95:3)

    at null.messageHandler (/Users/sureshkumars/AdaptDev/adapt_authoring/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:243:23)

    at Socket.<anonymous> (/Users/sureshkumars/AdaptDev/adapt_authoring/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js:262:22)

    at emitOne (events.js:77:13)

    at Socket.emit (events.js:169:7)