Own OpenHAB Cloud couldn´t register a user

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.

I’ve run into the same problem again this morning, after fixing it the day before yesterday.

My openhabcloud is running on a scaleway arm vps running ubuntu 16.04

I’m betting the app.js “shuffle” works. Did you change anything.

I have BTW sent a PM to the Author of the Cloud, at least as it’s listed on GitHub.

@Joe_Lawrence @ryandetzel @vbbaby3,

can you please recheck if this is still the case wirh latest oh cloud state. I think should be solved with https://github.com/openhab/openhab-cloud/pull/65

1 Like

BTW I had the same issue…worked for me.
Let me know if it resolves your issue.
Feel free to contact dan or me, if you need support.

BR Mehmet

1 Like

Hi Mehmet,

the new Version solve the problem for me. Good work!

Thanks!

2 Likes

Ran “git pull” got the new files started the server, all seems well. Thanks for your help.

1 Like

updated to new version… issue resolved… thanks!

2 Likes

you re all welcome! Thanks for openHABing :slight_smile:

1 Like

Which linux command should be used in order to upgrade the software?

No issues since the upgrade, thanks for fast response!!!

@MARZIMA

Hello sir,

I am getting the “ForbiddenError: invalid csrf token” when i am trying to register a user to my own cloud through javascript code. here is the code i am using:

type: ‘POST’,
url: ‘https://XXX.XXX.com/register’,
contentType: ‘application/x-www-form-urlencoded’,
data : {“Username":"xxx@gmail.com”,“Password”:“xx1234”,“openHAB UUID”:“XXX-XXX-XXX-XXX”,“openHAB secret”:“XXXX”},
headers : { ‘Access-Control-Allow-Origin’:‘*’ },

This is the error i am getting:

ForbiddenError: invalid csrf token

at csrf (/home/ubuntu/openhab-cloud/node_modules/csurf/index.js:112:19)

at /home/ubuntu/openhab-cloud/app.js:277:9

at Layer.handle [as handle_request] (/home/ubuntu/openhab-cloud/node_modules/express/lib/router/layer.js:95:5)

at trim_prefix (/home/ubuntu/openhab-cloud/node_modules/express/lib/router/index.js:317:13)

at /home/ubuntu/openhab-cloud/node_modules/express/lib/router/index.js:284:7

at Function.process_params (/home/ubuntu/openhab-cloud/node_modules/express/lib/router/index.js:335:12)

at Context.next (/home/ubuntu/openhab-cloud/node_modules/express/lib/router/index.js:275:10)

at Context.actions.pass (/home/ubuntu/openhab-cloud/node_modules/passport/lib/passport/context/http/actions.js:77:8)

at SessionStrategy.authenticate (/home/ubuntu/openhab-cloud/node_modules/passport/lib/passport/strategies/session.js:67:10)

at attempt (/home/ubuntu/openhab-cloud/node_modules/passport/lib/passport/middleware/authenticate.js:243:16)

at Passport.authenticate (/home/ubuntu/openhab-cloud/node_modules/passport/lib/passport/middleware/authenticate.js:244:7)

at Layer.handle [as handle_request] (/home/ubuntu/openhab-cloud/node_modules/express/lib/router/layer.js:95:5)

at trim_prefix (/home/ubuntu/openhab-cloud/node_modules/express/lib/router/index.js:317:13)

at /home/ubuntu/openhab-cloud/node_modules/express/lib/router/index.js:284:7

at Function.process_params (/home/ubuntu/openhab-cloud/node_modules/express/lib/router/index.js:335:12)

at next (/home/ubuntu/openhab-cloud/node_modules/express/lib/router/index.js:275:10)

at Passport.initialize (/home/ubuntu/openhab-cloud/node_modules/passport/lib/passport/middleware/initialize.js:69:5)

at Layer.handle [as handle_request] (/home/ubuntu/openhab-cloud/node_modules/express/lib/router/layer.js:95:5)

at trim_prefix (/home/ubuntu/openhab-cloud/node_modules/express/lib/router/index.js:317:13)

at /home/ubuntu/openhab-cloud/node_modules/express/lib/router/index.js:284:7

at Function.process_params (/home/ubuntu/openhab-cloud/node_modules/express/lib/router/index.js:335:12)

at next (/home/ubuntu/openhab-cloud/node_modules/express/lib/router/index.js:275:10)

Can any one help me on this please.