Openhab-android: Unable to connect to remote openhab2 using openhab2 app on Samsung phone

Created on 21 Dec 2017  路  21Comments  路  Source: openhab/openhab-android

Works well on my amazon tablet, but get authentication issues, http 401 on my Samsung A5 with android 7

bug

Most helpful comment

I was having the same issue and the problem was that the Android auto completed the username field and added an extra space at the end. After removing the space I was able to log in successfully.

All 21 comments

Did you enter the user and pw for the remote connection under "Remote server settings"?

Yes, the settings are identical between the 2 devices, but I cannot connect using the Samsung phone, it works locally thoe.
Thanks Gunnar

Does it run the original samsung software?

Yes, no rootkit, but f-secure security software

So gcm should be present. Can you capture a debug log?

FWIW, GCM registration also fails on my wife's Galaxy Tab S2 running stock 7.0. I'll see whether anything sticks out in the debug log. Nevermind, GCM registration isn't attempted when no remote server URL is set.

How should I capture a Debug log?

I have similar problem with Xiaomi redmi 4x with Android 7 - getting error 401. With exacly same credentials iPhone 6s working fine.
At the same time Xiaomi 3s with Android 6 working../

I'll changed the error dialogs to output more information, when in debug mode. https://github.com/openhab/openhab.android/pull/557
You can enable debug mode in the settings in the app.
Please install this apk and post a screenshot (blur password before) when the error happens again:
mobile-full-debug.zip

I instaled app which you sent and was able to login from the first try - hope it will work always!
Will let you know if errors appear again.
Thanks!

Did it work before the update to 2.0.0?

After installing the Debug version, it all works fine, I'll upload a Debug report if it fails agan.
Thanks a lot for the help.
Gunnar

Unfortunately, I did not catch when it stop working exactly, but it was working 3 months ago...

@GuruLarsson When did it stop working for you?

@ip-ua The debug version and the version on play have the exact same source code, so are you 100% sure, you just entered a wrong password or change the password in the cloud at some time, but not in the app?

I am sure that I have the same password and do not change it.
What I did when found this problems on both android devices:

  1. Deleted app, rebooted device and installed app back - did not helps
  2. Deleted devices from myopenhab and try to reconnect again. It worked with Xiaomi 3s only
  3. Deleted app, rebooted device and installed app you sent - it works.
    Thanks!

I don't think it has never been worked before. I am quite sure that the settings where the same,maybe the unintelligible and install of the debug version fixed it. I will try with the plain download from Google play and check.
Gunnar

I have now tried to uninstall the debug version and installed the standard version from Google play store, after setting it up everything works fine. I have not a clue why.
Gunnar

I was having the same issue and the problem was that the Android auto completed the username field and added an extra space at the end. After removing the space I was able to log in successfully.

I was having the same issue and the problem was that the Android auto completed the username field and added an extra space at the end. After removing the space I was able to log in successfully.

Thank you, thank you, thank you. I had the same issue. And after several weeks and countless attemps to solve the failure i found your advise and that immediately made it work.

We could remove a white space at the end of the user name.

We could remove a white space at the end of the user name.

It seems that white spaces are allowed in both username and password. Do not use these commands to create entries in your htpasswd file. -s is insecure.

bash $ htpasswd -nbs "foo " "foo " foo :{SHA}Nc/Elo93ZDu3eIwAV6FBzKshQts= $ htpasswd -nbs "foo" "foo" foo:{SHA}C+7Hteo/D9vJXQ3UfzxbwnXaijM=

White spaces are removed from the url input field in #1495.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

holmes picture holmes  路  7Comments

kubawolanin picture kubawolanin  路  13Comments

mueller-ma picture mueller-ma  路  3Comments

cribskip picture cribskip  路  8Comments

mueller-ma picture mueller-ma  路  4Comments