Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getting error TypeError: Cannot read property 'timestamp' of null #290

Open
ahmedroofi opened this issue Jan 22, 2018 · 4 comments
Open

Comments

@ahmedroofi
Copy link

ahmedroofi commented Jan 22, 2018

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

@nawazdhandala
Copy link
Contributor

What causes this?

@PratikG9
Copy link

facing the same issue

@sauban
Copy link
Contributor

sauban commented Jun 11, 2018

Hi @PratikG9 please could you provide the code snippet that is causing this error? That will be real helpful, thanks.

@PratikG9
Copy link

PratikG9 commented Jul 3, 2018

Here is the architecture diagram of our cloudboost development server,

screen shot 2018-07-03 at 7 42 48 pm

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants