ni-c / heimcontrol.js

Home-Automation with node.js and Raspberry PI
MIT License
1.41k stars 297 forks source link

Logging in with Android app makes heimcontrol crash #85

Closed harmverbeek closed 10 years ago

harmverbeek commented 10 years ago

I downnloaded the heimcontrol android app from the Play Store. When I use it to log in heimcontrol crashes with the following error message:

/home/pi/heimcontrol.js/node_modules/mongodb/lib/mongodb/connection/base.js:242 throw message;
^ Error: Cannot use a writeConcern without a provided callback at Collection.update (/home/pi/heimcontrol.js/node_modules/mongodb/lib/mongodb/collection/core.js:641:11) at /home/pi/heimcontrol.js/routes/index.js:515:15 at Db.collection (/home/pi/heimcontrol.js/node_modules/mongodb/lib/mongodb/db.js:495:44) at /home/pi/heimcontrol.js/routes/index.js:514:29 at /home/pi/heimcontrol.js/node_modules/mongodb/lib/mongodb/cursor.js:162:16 at commandHandler (/home/pi/heimcontrol.js/node_modules/mongodb/lib/mongodb/cursor.js:706:16) at /home/pi/heimcontrol.js/node_modules/mongodb/lib/mongodb/db.js:1806:9 at Server.Base._callHandler (/home/pi/heimcontrol.js/node_modules/mongodb/lib/mongodb/connection/base.js:442:41) at /home/pi/heimcontrol.js/node_modules/mongodb/lib/mongodb/connection/server.js:485:18 at MongoReply.parseBody (/home/pi/heimcontrol.js/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:68:5)

I have no problem when I log in from a browser.

tjanson commented 10 years ago

Are you using the very latest version of heimcontrol.js (i.e., do a git pull)? Alternatively, can you post your heimcontrol.js/routes/index.js around line 515?

harmverbeek commented 10 years ago

Hello,

I simply followed the instructions on page http://ni-c.github.io/heimcontrol.js/get-started.html

But I used wget http://nodejs.org/dist/v0.10.26/node-v0.10.26.tar.gz instead of wget http://nodejs.org/dist/v0.10.18/node-v0.10.18.tar.gz

The file index.js is attached.

Regards,

Harm

From: tjanson notifications@github.com Reply-To: "ni-c/heimcontrol.js" <reply+i-38934053-55e92f6b87b45e196534b1dfd4a3826388c27062-8293480@reply.git hub.com> Date: Monday 28 July 2014 23:19 To: "ni-c/heimcontrol.js" heimcontrol.js@noreply.github.com Cc: HV harm@certeza.nl Subject: Re: [heimcontrol.js] Logging in with Android app makes heimcontrol crash (#85)

routes/index.js

tjanson commented 10 years ago

The attachment doesn't show unfortunately (Github converts your email to comments). The result of git log -1 in the heimcontrol directory would work too.

The thing is: I think this bug was fixed very recently and you’re not running the latest code. A git pull should solve it – if you are running the old version.

harmverbeek commented 10 years ago

Ok, I will pull the latest code.

Harm

From: tjanson notifications@github.com Reply-To: "ni-c/heimcontrol.js" <reply+i-38934053-55e92f6b87b45e196534b1dfd4a3826388c27062-8293480@reply.git hub.com> Date: Monday 28 July 2014 23:43 To: "ni-c/heimcontrol.js" heimcontrol.js@noreply.github.com Cc: HV harm@certeza.nl Subject: Re: [heimcontrol.js] Logging in with Android app makes heimcontrol crash (#85)

The attachment doesn't show unfortunately (Github converts your email to comments). The result of git log -1 in the heimcontrol directory would work too.

The thing is: I think this bug was fixed very recently and you¹re not running the latest code. A git pull should solve it ­ if you are running the old version.

‹ Reply to this email directly or view it on GitHub https://github.com/ni-c/heimcontrol.js/issues/85#issuecomment-50406338 .

harmverbeek commented 10 years ago

Solved in the latest code