Own OpenHAB Cloud couldn´t register a user

@Haoe can you upload your old app.js file somewhere or compare it with the new one ?

sure, Here

1 Like

@Haoe With this mine works too…

@digitaldan I saw on github that you made some changes, but my skills are too low…Can you have a look on this :innocent:

Glad to hear it works for you.
Have no time to compare both, making it work is my priority at this moment .:slight_smile:

Worked for me too!!! Thanks!

Interesting, it’s possible that something changed from the time I did the tutorial and you guys did thus the difference but I’m assuming it’s something else. Glad to hear you got it working though.

It now works for me with the new version too.
It seems to be that you need to have redis-server version >=2.6 (I found this somewhere in the www :sunglasses:)

$ sudo add-apt-repository ppa:chris-lea/redis-server

$ sudo apt-get update

$ sudo apt-get install redis-server

@ryandetzel I think you could add this to your tutorial :wink:

1 Like

Did it for me, back to the newest “app.js”.

Thanks!

I tried also to install the new redis-server, but I get the same error message…

I run into the same problem since this morning.
Everything worked fine untill i tried to logon this morning (did not change a thing)

When trying to log on to my own openhab cloud i get the following error:

ForbiddenError: invalid csrf token
at verifytoken (/var/www/openhab.heerle.com/openhab-cloud/node_modules/csurf/index.js:263:11)
at csrf (/var/www/openhab.heerle.com/openhab-cloud/node_modules/csurf/index.js:93:7)
at Object.handle (/var/www/openhab.heerle.com/openhab-cloud/app.js:268:13)
at Context.next (/var/www/openhab.heerle.com/openhab-cloud/node_modules/express/node_modules/connect/lib/proto.js:174:15)
at Context.actions.pass (/var/www/openhab.heerle.com/openhab-cloud/node_modules/passport/lib/passport/context/http/actions.js:77:8)
at SessionStrategy.authenticate (/var/www/openhab.heerle.com/openhab-cloud/node_modules/passport/lib/passport/strategies/session.js:67:10)
at attempt (/var/www/openhab.heerle.com/openhab-cloud/node_modules/passport/lib/passport/middleware/authenticate.js:243:16)
at Passport.authenticate (/var/www/openhab.heerle.com/openhab-cloud/node_modules/passport/lib/passport/middleware/authenticate.js:244:7)
at next (/var/www/openhab.heerle.com/openhab-cloud/node_modules/express/node_modules/connect/lib/proto.js:174:15)
at Passport.initialize (/var/www/openhab.heerle.com/openhab-cloud/node_modules/passport/lib/passport/middleware/initialize.js:69:5)
at next (/var/www/openhab.heerle.com/openhab-cloud/node_modules/express/node_modules/connect/lib/proto.js:174:15)
at Object.handle (/var/www/openhab.heerle.com/openhab-cloud/node_modules/connect-flash/lib/flash.js:21:5)
at next (/var/www/openhab.heerle.com/openhab-cloud/node_modules/express/node_modules/connect/lib/proto.js:174:15)
at /var/www/openhab.heerle.com/openhab-cloud/node_modules/express/node_modules/express-session/index.js:421:7
at Command.callback (/var/www/openhab.heerle.com/openhab-cloud/node_modules/connect-redis/lib/connect-redis.js:148:25)
at normal_reply (/var/www/openhab.heerle.com/openhab-cloud/node_modules/redis/index.js:714:21)
at RedisClient.return_reply (/var/www/openhab.heerle.com/openhab-cloud/node_modules/redis/index.js:816:9)
at JavascriptRedisParser.returnReply (/var/www/openhab.heerle.com/openhab-cloud/node_modules/redis/index.js:188:18)
at JavascriptRedisParser.execute (/var/www/openhab.heerle.com/openhab-cloud/node_modules/redis-parser/lib/parser.js:560:12)
at Socket. (/var/www/openhab.heerle.com/openhab-cloud/node_modules/redis/index.js:267:27)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)

I’ve tried rebooting, updating redis but have not found a working solution yet.

p.s. the habdroid clients seem to work just fine using the same openhabcloud.

Help!

This will be a shot in the dark at best, but, I have had this happen twice, each time I renamed the current app.js to app.js.new and used the one provided by Haoe, in the link above, this allowed me to logon. I then shut the server down and renamed the app.js to app.js.old, and renamed app.js.new to app.js, and restarted the server and everything was working ok again.

Don’t ask how I found this, I’ve baffled programmers for years when I break their programs and then give them a four page procedure on how to produce the fault! LOL!!! Actually it dawned on me what was happening the 2nd time I had to fix, the 3rd time was the charm, although I am still not 100% sure what happened, I did some OS updated, and was also changing the IP addresses, and moving from clear to SSL, I think it was the network changes that caused this to happen.

If you should try this and it works, please let ryandetzel know as it will be PROOF of my concept.

The link I spoke of so you don’t have to go searching. Older app.js

Worked like a charm Joe!!!

Thnx!!!

1 Like

Check out posts 18-22, discussing this, I think I may have found some hints for you Re:people having this problem.

Glad to help!!!

Sorry, I mistakenly assumed you were the author.

Hi Joe,

Also it was only a shot in the dark it was a direct hit!
I stopped the application, renamed it and took the older one and with this version I could register my instance.
After the registration process I stopped the application again and revoked the changes.

Now I can login and my openhab instance is connected to my self-hosted openhab-cloud.

Thanks for the help!
Thomas

1 Like

Haoe gets at least half the credit!!!

Just got the “ForbiddenError: invalid csrf token…” error again, had gotten an error about ubuntu asking if I wanted to report, didn’t right the error down as I thought it wasn’t connected to MyOpenHAB, it could have been, I will be logging errors now. I also rebooted as I was setting up autostart for the cloud. I got the error, stopped the server, renamed as abover, started the server, hit logged on, killed server, renamed again and back in business.

I’m guessing I should post to Dan "digitaldan"Cunningham and lead him to this thread???

I’m interested, those that have this problem, what platform are you using for your Cloud, maybe we can find some similarity, that is causing this problem.

I running my cloud on the ec2 free for a year Ubuntu server provided by Amazon Web Services.