Menu

#27 mhgui freezes during login

None
closed
nobody
None
5
2014-08-20
2014-08-02
maaltan
No

When I try to log into the mhgui interface, the GUI freezes until killed. There seems to be an exception being thrown in the suds command.

I am running the git cloned version:
commit f2a0703b3c5c6d48fb85633f7b26bbb4973a5e9c
Author: Scott Talbert swt@techie.net
Date: Thu Jul 31 20:14:37 2014 -0400

Fixes to match latest website changes

Here is the output while running with the --suds-debug flag:

DEBUG:suds.transport.http:sending:
URL:https://svcs.myharmony.com/CompositeSecurityServices/Security.svc
HEADERS: {'SOAPAction': '"http://tempuri.org/ISecurity/LoginUser"', 'Content-Type': 'text/xml; charset=utf-8', 'Content-type': 'text/xml; charset=utf-8', 'Soapaction': '"http://tempuri.org/ISecurity/LoginUser"'}
MESSAGE:
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:ns3="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns0="http://tempuri.org/" xmlns:ns1="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Header/><ns2:Body><LoginUser xmlns="http://tempuri.org/"><email>myuser</email><password>mypass</password><customCredential></customCredential><isPresistent>false</isPresistent></LoginUser></ns2:Body></SOAP-ENV:Envelope>
DEBUG:suds.transport.http:received:
CODE: 200
HEADERS: {'content-length': '315', 'x-aspnet-version': '4.0.30319', 'x-powered-by': 'ASP.NET', 'server': 'nginx/1.2.4', 'connection': 'close', 'cache-control': 'private', 'date': 'Sat, 02 Aug 2014 22:36:49 GMT', 'content-type': 'text/xml; charset=utf-8'}
MESSAGE:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><s:Fault><faultcode>s:Client</faultcode><faultstring xml:lang="en-US">1</faultstring><detail><guid xmlns="http://schemas.microsoft.com/2003/10/Serialization/">460ac6de-81f6-4656-b716-5e2d5bb38bde</guid></detail></s:Fault></s:Body></s:Envelope>
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib64/python2.7/threading.py", line 811, in bootstrap_inner
self.run()
File "/usr/lib64/python2.7/threading.py", line 764, in run
self.
target(self.args, **self.kwargs)
File "/usr/local/bin/mhgui", line 124, in ThreadFunction
result = self.backgroundFunction(
self.backgroundFunctionArgs)
File "/usr/local/bin/mhgui", line 245, in DoLogin
return mhMgr.Login(username, password)
File "/usr/local/share/congruity/mhmanager.py", line 162, in Login
isPresistent=False)
File "/usr/lib/python2.7/site-packages/suds/client.py", line 542, in call
return client.invoke(args, kwargs)
File "/usr/lib/python2.7/site-packages/suds/client.py", line 602, in invoke
result = self.send(soapenv)
File "/usr/lib/python2.7/site-packages/suds/client.py", line 647, in send
result = self.succeeded(binding, reply.message)
File "/usr/lib/python2.7/site-packages/suds/client.py", line 684, in succeeded
reply, result = binding.get_reply(self.method, reply)
File "/usr/lib/python2.7/site-packages/suds/bindings/binding.py", line 151, in get_reply
self.detect_fault(soapbody)
File "/usr/lib/python2.7/site-packages/suds/bindings/binding.py", line 182, in detect_fault
raise WebFault(p, fault)
WebFault: Server raised fault: '1'

Discussion

  • Scott Talbert

    Scott Talbert - 2014-08-03

    Thanks for the bug report. I'll try to fix it tomorrow.

     
  • Scott Talbert

    Scott Talbert - 2014-08-04

    Did you happen to type your username or password wrong? If not, then I'm not sure how to reproduce this. If it was a failed login, I think I've got a fix to better handle that in the harmony_touch branch. I'll see if I can cherry-pick that over to master.

     
  • Scott Talbert

    Scott Talbert - 2014-08-04

    OK, I cherry-picked the login stuff from the harmony_touch branch. Let me know if that was what you were seeing.

     
  • maaltan

    maaltan - 2014-08-04

    It seems i was typing the wrong password in, but when i backed up to the commit mentioned above i was getting the same error with a correct password. That said the new version seems to behave better. I am still getting a freeze/exception though:

    [maaltan@localhost congruity-code]$ mhgui
    Exception in thread Thread-1:
    Traceback (most recent call last):
    File "/usr/lib64/python2.7/threading.py", line 811, in bootstrap_inner
    self.run()
    File "/usr/lib64/python2.7/threading.py", line 764, in run
    self.
    target(self.args, **self.kwargs)
    File "/usr/local/bin/mhgui", line 124, in ThreadFunction
    result = self.backgroundFunction(
    self.backgroundFunctionArgs)
    File "/usr/local/bin/mhgui", line 245, in DoLogin
    return mhMgr.Login(username, password)
    File "/usr/local/share/congruity/mhmanager.py", line 171, in Login
    url = baseUrl + "/Home/Login?usr=" + jsonResponse["Token"]
    TypeError: cannot concatenate 'str' and 'NoneType' objects

    unfortunately, suds-debug no longer works (probably because of the switch to json)

    Thanks for your quick response.

     
  • Scott Talbert

    Scott Talbert - 2014-08-04

    Very interesting. I'm not quite sure what might be going on? Does your username or password contain any characters other than a-z and 0-9? Maybe I am not encoding it correctly.

     
  • maaltan

    maaltan - 2014-08-05

    Nothing special in user/pass. I hacked in a debug statement and the token is null (the error says as much so probably doesnt help much).

    I tried going to the generated url manually in my browser and it said " An error occurred while processing your request. "

    I tried changing the url to "https://setup.myharmony.com/Home/Login" and doesnt respond with a json response. In my browser it redirected to a page where it complained about my browser not being windows.

    I dont have any user agent spoofers or json testers on this computer, I'll see if i can manually ping these services tomarrow on my dev computer.

    For what it is worth, I can login successfully using the offical software running in wine (once I blind clicked my way though the un-rendered update screen..annoying). Of course it cant find my remote, but that was expected.

     
  • Scott Talbert

    Scott Talbert - 2014-08-05

    What OS distribution are you using?

     
  • maaltan

    maaltan - 2014-08-05

    Fedora 20

     

    Last edit: maaltan 2014-08-05
  • Scott Talbert

    Scott Talbert - 2014-08-05

    That's what I use too, so that shouldn't be a problem. :-) Did you create your account with MHGUI or the official software?

     
  • maaltan

    maaltan - 2014-08-05

    (oops sorry for spam, i cleaned it up. didn't realize direct reply posted entire email.)

    I just tried direct access using a rest client (chrome advanced rest client, currently in windows without agent spoofing) and myharmony is indeed replying with a null token with my credentials.

    {
    Result: true
    Token: null
    }

    if the user/pass is bad it returns:

    {
    Result: false
    Token: null
    }

    I am using https://setup.myharmony.com/Home/TestLogin with post submission. Unfortunately, i cannot get a "get" submission to work. It keeps giving me a 404 error.

    https://setup.myharmony.com/Home/TestLogin?username=asdf&password=asdfasdf

    This is a really old account (close to 10 yrs) I successfully accessed with congruity about April. Perhaps there is a "license agreement" i need to click through or something.

     
  • Scott Talbert

    Scott Talbert - 2014-08-05

    Wait a minute. Is this a members.harmonyremote.com account or a myharmony.com account? I don't think myharmony.com existed that long ago. What model of remote are you using?

     
  • maaltan

    maaltan - 2014-08-05

    Hrm.

    as i mentioned i have a really old remote (520 i think). there appears to be 2(or more) versions of the software now. When i click the giant download button on myharmony i get a silverlight monstrosity. if i search for my remote and click download software there i get something completely different.

    the new software requires an email for a user, my account is username only and does not work. Therefore the old remotes might not be compatible with the new json stuff :(

    I will try backing up to the version 18 checkpoint and seeing if i can gleam any more info.

    <Oops, cross="" post,="" hope="" i="" answered="" your="" question.="">

     

    Last edit: maaltan 2014-08-05
  • Scott Talbert

    Scott Talbert - 2014-08-05

    So, there are actually two separate systems, members.harmonyremote.com (older) and myharmony.com (newer system that uses Silverlight). MHGUI is only for accessing myharmony.com. Your remote only works with the old system (members.harmonyremote.com), so you just need to go to members.harmonyremote.com with a web browser and then run the files through congruity.

     
  • Scott Talbert

    Scott Talbert - 2014-08-06

    OK, I pushed an update that will check for the non-null token so now you should properly get a "login failed" message.

     
  • Scott Talbert

    Scott Talbert - 2014-08-07

    OK, so I thought about this some more and I figured we should provide a different error message if a members.harmonyremote.com account is used - so I pushed another update that does that.

     
    • maaltan

      maaltan - 2014-08-07

      I tried out the new changes and they seem to work ok. I get the new
      message with my account. One note though, I was reading through the
      logitech webpage and i believe my remote will not work with myharmony.
      I'm not sure if there are models that will work with both services.

      I was able to update my remote using the website directly as you suggested.
      I was not aware that they changed services. I tend to only update my
      remote like once ever 2-4 yrs.

       
  • Scott Talbert

    Scott Talbert - 2014-08-07

    Correct, there are a few models that will work with both services, but most remotes will only work with one or the other. The 520 is one that will only work with the older website.

    If you create an account and try to add a remote to your account using MHGUI, it will list the supported remotes.

     
  • Scott Talbert

    Scott Talbert - 2014-08-10
    • status: open --> closed
    • Group: -->
     

Log in to post a comment.