Page 3 of 10

Re: XMPP plugin request

Posted: Mon Jan 15, 2018 3:30 pm
by Snowbird
ok great, now it works again !! :) thank yoooooouuuuuu !

There is still one last thing that is driving me nuts though.... and it's not your fault, it does the same with the original release of the plugin 1.0.0, when you disable the XMPP plugin, it takes forever and doesn't succeed then EG freezes !! sometimes you can disable the plugin without any problem, but when you decide to re-enable it, it takes forever then EG freezes. And sometimes, you can disable / re-enable the plugin as many times as you want, it works without any problem. I can't understand why it does that.... My only hypothesis is maybe some authentication issue with the remote server upon connection/disconnection (when plugin enable/disable), maybe it doesn't reply fast enough and puts the plugin and EG in an unstable state (probably by waiting for a reply that never comes ?) hence the freeze of EG. What do you think about this hypothesis ? Do you have any idea what could cause this ? why sometimes it works and sometimes it doesn't ?

This is the last thing to fix (if fixable...), and this plugin will be 100% working in its every aspects !

Thanks again.

Re: XMPP plugin request

Posted: Mon Jan 15, 2018 7:40 pm
by kgschlosser
I will take a look at the code a little later today and see what is going on.

Re: XMPP plugin request

Posted: Sun Jan 21, 2018 10:58 pm
by Snowbird
it looks like you were busy with other things lately :)

I'm still interested in your findings :)

Re: XMPP plugin request

Posted: Sun Jan 21, 2018 11:28 pm
by Snowbird
I forgot to tell you that I've found a clue that might help you, when I disable the XMPP plugin, EG fires this event "XMPP.Logout" but in reality it never logs out ! I was able to verify this with a regular Windows XMPP client, so this is a bug I think, and it could be related to our main issue.

Re: XMPP plugin request

Posted: Mon Jan 22, 2018 6:15 am
by kgschlosser
ok give this bad larry a try.

There is no disconnect routine with the library that is being used with this plugin. So i am not sure how to disconnect it. I am hoping that with these recent changes it might help it out. You have to bear with me i change a whole lot of things this time so it could have some issues.

Re: XMPP plugin request

Posted: Mon Jan 22, 2018 8:37 am
by Snowbird
no worries for the possible issues, we can never fix things from the first attempt all the time ;)

I have tested this new version, and here's the error I get :
09:32:54 Error starting plugin: XMPP
09:32:54 Traceback (most recent call last) (0.5.0-rc4):
09:32:54 File "C:\Program Files (x86)\EventGhost\eg\Classes\PluginInstanceInfo.py", line 192, in Start
09:32:54 self.instance.__start__(*self.args)
09:32:54 File "C:\ProgramData\EventGhost\plugins\XMPP\__init__.py", line 81, in __start__
09:32:54 while self.startupEvent.isSet():
09:32:54 AttributeError: 'XMPP' object has no attribute 'startupEvent'
and of course it doesn't connect anymore :) the XMPP plugin appears in red in EG, but the positive thing is that I can enable/disable the plugin as many times as I want and EG never freezes like it used to.

Re: XMPP plugin request

Posted: Mon Jan 22, 2018 4:37 pm
by kgschlosser
sorry about that. i forgot to add an _

Re: XMPP plugin request

Posted: Mon Jan 22, 2018 5:28 pm
by Snowbird
no worries :)

but now i have the SSL error back, maybe you removed my SSL fix accidentally ?

Code: Select all

18:26:46   Exception in thread EventGhostXMPPThread:
18:26:46   Traceback (most recent call last):
18:26:46     File "threading.pyc", line 801, in __bootstrap_inner
18:26:46     File "threading.pyc", line 754, in run
18:26:46     File "C:\ProgramData\EventGhost\plugins\XMPP\__init__.py", line 147, in _thread_loop
18:26:46       self._client.connect(server=(self._server, int(self._port)))
18:26:46     File "C:\ProgramData\EventGhost\plugins\XMPP\xmpp\client.py", line 205, in connect
18:26:46       while not self.TLS.starttls and self.Process(1): pass
18:26:46     File "C:\ProgramData\EventGhost\plugins\XMPP\xmpp\dispatcher.py", line 303, in dispatch
18:26:46       handler['func'](session,stanza)
18:26:46     File "C:\ProgramData\EventGhost\plugins\XMPP\xmpp\transports.py", line 345, in StartTLSHandler
18:26:46       self._startSSL()
18:26:46     File "C:\ProgramData\EventGhost\plugins\XMPP\xmpp\transports.py", line 324, in _startSSL
18:26:46       tcpsock._sslIssuer = tcpsock._sslObj.issuer()
18:26:46   AttributeError: '_ssl._SSLSocket' object has no attribute 'issuer'

Re: XMPP plugin request

Posted: Mon Jan 22, 2018 5:34 pm
by Snowbird
Ok, I've put back manually my SSL fix, and got rid of the SSL errors (you should do the same on your end), now I'm left with these errors :

Code: Select all

18:31:07   Traceback (most recent call last) (0.5.0-rc4):
18:31:07     File "C:\Program Files (x86)\EventGhost\eg\Classes\PluginInstanceInfo.py", line 102, in CreateInstance
18:31:07       plugin.__init__()
18:31:07     File "C:\ProgramData\EventGhost\plugins\XMPP\__init__.py", line 58, in __init__
18:31:07       self._users = users
18:31:07   NameError: global name 'users' is not defined

Re: XMPP plugin request

Posted: Mon Jan 22, 2018 5:39 pm
by Snowbird
The XMPP plugin still appears in red in EG, if I disable it, it gets disabled and nothing happens, if I re-enable it, it gets re-enabled but this time 2 events are fired at the same time, see below :

Code: Select all

18:35:07   XMPP.Login
18:35:07   XMPP.Logout
and the plugin still stays in red.

Re: XMPP plugin request

Posted: Mon Jan 22, 2018 6:57 pm
by kgschlosser
I can handle the issue with enabling and disabling the plugin. and having it work properly. There is no logout or disconnect feature to that library this plugin uses. and I fear what is happening is it is staying logged in even tho I have deleted the instance of the connection. so when it tries to connect it errors. Now if i keep the same instance and carry it over between restarts and simply kill the polling loop when disabled. this will appear to be disconnected. But the reality would be that it is not.

Re: XMPP plugin request

Posted: Mon Jan 22, 2018 7:19 pm
by kgschlosser
i found a disconnect routine I think. I hate it when people code in voodoo magic. it makes it impossible to follow anything.

I put back in the sll stuff. i grabbed the wrong version of the plugin sorry bouts that.

Re: XMPP plugin request

Posted: Mon Jan 22, 2018 8:01 pm
by Snowbird
ok, thanks, here's what I get now :

Code: Select all

20:59:57   Exception in thread EventGhostXMPPThread:
20:59:57   Traceback (most recent call last):
20:59:57     File "threading.pyc", line 801, in __bootstrap_inner
20:59:57     File "threading.pyc", line 754, in run
20:59:57     File "C:\ProgramData\EventGhost\plugins\XMPP\__init__.py", line 185, in _thread_loop
20:59:57       self._client.disconnect()
20:59:57     File "C:\ProgramData\EventGhost\plugins\XMPP\xmpp\dispatcher.py", line 373, in disconnect
20:59:57       while self.Process(1): pass
20:59:57     File "C:\ProgramData\EventGhost\plugins\XMPP\xmpp\dispatcher.py", line 303, in dispatch
20:59:57       handler['func'](session,stanza)
20:59:57     File "C:\ProgramData\EventGhost\plugins\XMPP\__init__.py", line 123, in _presence_callback
20:59:57       if user not in self._users:
20:59:57   NameError: global name 'user' is not defined
When I disable then enable the plugin, EG freezes (like it used to...)

Re: XMPP plugin request

Posted: Mon Jan 22, 2018 8:44 pm
by kgschlosser
wow I am really having an off day. messing all kinds of things up.

here is another

Re: XMPP plugin request

Posted: Mon Jan 22, 2018 8:59 pm
by Snowbird
lol :D

Code: Select all

21:57:22   Exception in thread EventGhostXMPPThread:
21:57:22   Traceback (most recent call last):
21:57:22     File "threading.pyc", line 801, in __bootstrap_inner
21:57:22     File "threading.pyc", line 754, in run
21:57:22     File "C:\ProgramData\EventGhost\plugins\XMPP\__init__.py", line 185, in _thread_loop
21:57:22       self._client.disconnect()
21:57:22     File "C:\ProgramData\EventGhost\plugins\XMPP\xmpp\dispatcher.py", line 373, in disconnect
21:57:22       while self.Process(1): pass
21:57:22     File "C:\ProgramData\EventGhost\plugins\XMPP\xmpp\dispatcher.py", line 303, in dispatch
21:57:22       handler['func'](session,stanza)
21:57:22     File "C:\ProgramData\EventGhost\plugins\XMPP\__init__.py", line 114, in _presence_callback
21:57:22       user = email + "/" + device
21:57:22   TypeError: cannot concatenate 'str' and 'NoneType' objects
EG still freezes when enabling/disabling the plugin... I don't know why it does that...