getting error TypeError: Cannot read property 'timestamp' of null
TypeError: Cannot read property 'timestamp' of null at /home/vagrant/apps/cloudboost/database-connect/realTime.js:131:66 at /home/vagrant/apps/cloudboost/helpers/socketQuery.js:18:17 at tryCatcher (/home/vagrant/apps/cloudboost/node_modules/bluebird/js/main/util.js:26:23) at Promise.successAdapter (/home/vagrant/apps/cloudboost/node_modules/bluebird/js/main/nodeify.js:23:30) at Promise._settlePromiseAt (/home/vagrant/apps/cloudboost/node_modules/bluebird/js/main/promise.js:582:21) at Promise._settlePromises (/home/vagrant/apps/cloudboost/node_modules/bluebird/js/main/promise.js:700:14) at Async._drainQueue (/home/vagrant/apps/cloudboost/node_modules/bluebird/js/main/async.js:123:16) at Async._drainQueues (/home/vagrant/apps/cloudboost/node_modules/bluebird/js/main/async.js:133:10) at Immediate.Async.drainQueues (/home/vagrant/apps/cloudboost/node_modules/bluebird/js/main/async.js:15:14) at runCallback (timers.js:773:18) at tryOnImmediate (timers.js:734:5) at processImmediate [as _immediateCallback] (timers.js:711:5) Mon, 22 Jan 2018 14:06:36 GMT body-parser deprecated undefined extended: provide extended option at server.js:86:27
Getting this error on cloudboost, which restarts the cloudboost server and all sockets connections are lost
What causes this?
facing the same issue
Hi @PratikG9 please could you provide the code snippet that is causing this error? That will be real helpful, thanks.
Here is the architecture diagram of our cloudboost development server,

To diagnose the issue we've added logs in /database-connect/realTime.js file at line 131.
18|Locatio | REDIS CLIENT SOCKETDATA : null
18|Locatio | REDIS CLIENT SOCKETDATA : {"query":{"tableName":"Streams","query":{"$include":[],"$includeList":[],"_id":"5BDJUx60"},"select":{},"sort":{},"skip":0,"limit":10},"timestamp":"3MnjziOJ","eventType":"updated"}
18|Locatio | REDIS CLIENT SOCKETDATA : null
18|Locatio | REAL CLIENT SOCKETDATA : null
from the above logs it is cleared that socketData is null. due to this we're getting exceptions shown below,
TypeError: Cannot read property 'timestamp' of null at /home/vagrant/apps/cloudboost/database-connect/realTime.js:131:66 at /home/vagrant/apps/cloudboost/helpers/socketQuery.js:18:17 at tryCatcher (/home/vagrant/apps/cloudboost/node_modules/bluebird/js/main/util.js:26:23) at Promise.successAdapter (/home/vagrant/apps/cloudboost/node_modules/bluebird/js/main/nodeify.js:23:30) at Promise._settlePromiseAt (/home/vagrant/apps/cloudboost/node_modules/bluebird/js/main/promise.js:582:21) at Promise._settlePromises (/home/vagrant/apps/cloudboost/node_modules/bluebird/js/main/promise.js:700:14) at Async._drainQueue (/home/vagrant/apps/cloudboost/node_modules/bluebird/js/main/async.js:123:16) at Async._drainQueues (/home/vagrant/apps/cloudboost/node_modules/bluebird/js/main/async.js:133:10) at Immediate.Async.drainQueues (/home/vagrant/apps/cloudboost/node_modules/bluebird/js/main/async.js:15:14) at runCallback (timers.js:773:18) at tryOnImmediate (timers.js:734:5)
@sauban , @nawazdhandala
I think it's due to two different cloudboost instances on the same machine using the same redis server
please comment