Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

XMPP plugin request

Got a good idea? You can suggest new features here.
Snowbird
Experienced User
Posts: 364
Joined: Fri Jul 03, 2009 10:04 am

Re: XMPP plugin request

Post 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.
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XMPP plugin request

Post by kgschlosser »

I will take a look at the code a little later today and see what is going on.
If you like the work I have been doing then feel free to Image
Snowbird
Experienced User
Posts: 364
Joined: Fri Jul 03, 2009 10:04 am

Re: XMPP plugin request

Post by Snowbird »

it looks like you were busy with other things lately :)

I'm still interested in your findings :)
Snowbird
Experienced User
Posts: 364
Joined: Fri Jul 03, 2009 10:04 am

Re: XMPP plugin request

Post 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.
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XMPP plugin request

Post 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.
Attachments
XMPP-1.2.0.egplugin
(68.77 KiB) Downloaded 44 times
If you like the work I have been doing then feel free to Image
Snowbird
Experienced User
Posts: 364
Joined: Fri Jul 03, 2009 10:04 am

Re: XMPP plugin request

Post 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.
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XMPP plugin request

Post by kgschlosser »

sorry about that. i forgot to add an _
Attachments
XMPP-1.2.0.egplugin
(68.78 KiB) Downloaded 42 times
If you like the work I have been doing then feel free to Image
Snowbird
Experienced User
Posts: 364
Joined: Fri Jul 03, 2009 10:04 am

Re: XMPP plugin request

Post 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'
Snowbird
Experienced User
Posts: 364
Joined: Fri Jul 03, 2009 10:04 am

Re: XMPP plugin request

Post 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
Snowbird
Experienced User
Posts: 364
Joined: Fri Jul 03, 2009 10:04 am

Re: XMPP plugin request

Post 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.
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XMPP plugin request

Post 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.
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XMPP plugin request

Post 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.
Attachments
XMPP-1.2.0.egplugin
(68.79 KiB) Downloaded 44 times
If you like the work I have been doing then feel free to Image
Snowbird
Experienced User
Posts: 364
Joined: Fri Jul 03, 2009 10:04 am

Re: XMPP plugin request

Post 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...)
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XMPP plugin request

Post by kgschlosser »

wow I am really having an off day. messing all kinds of things up.

here is another
Attachments
XMPP-1.2.0.egplugin
(68.8 KiB) Downloaded 46 times
If you like the work I have been doing then feel free to Image
Snowbird
Experienced User
Posts: 364
Joined: Fri Jul 03, 2009 10:04 am

Re: XMPP plugin request

Post 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...
Post Reply