XMPP Plus

Questions and comments specific to a particular plugin should go here.
User avatar
kgschlosser
Site Admin
Posts: 4803
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XMPP Plus

Post by kgschlosser » Thu Jul 19, 2018 6:55 pm

yeah that is what i have found as well.

so is the problem with their server??? or is it with sleekxmpp?? is it something the 2 are not agreeing on???? I do not know. why does the socket bomb like it does??? it looks as tho the server is just disconnecting with no reason as to why. i cannot seem to get the cause nailed down. if i can't isolate the cause i can't fix it. I do not know the xmpp protocol at all. and trying to weave through the code for sleekxmpp is not a very easy task, it's very nested and jumps all over the place. maybe the solution is to host an xmpp server like open fire yourself. and use dynamic-dns.net so you have a friendly dns name that will always point to your server even if your server's IP changes..

No matter what i do i cannot get this thing to work properly using the servers that were posted above. but what does not make any sence is why it is able to connect. but then when it disconnects it will not reconnect. when i was testing this. i found that when the disconnect happened. i was no longer able to view one of the servers websites. when i managed to connect again i could view their website again. I am wondering if it is a problem with them and not this plugin. having the connection to openfire work properly it is kind of is pointing to that. I do not know.

I am not giving up but it is going to take more time.
If you like the work I have been doing then feel free to Image

Snowbird
Experienced User
Posts: 363
Joined: Fri Jul 03, 2009 10:04 am

Re: XMPP Plus

Post by Snowbird » Thu Jul 19, 2018 7:16 pm

so you're suggesting to test with another server and try again ? I can do that, no problem but I can tell you right away that the problem will still be there, why ? the answer is easy, when the problem occurs, just by restarting EG the problem is solved 100% of the time. If they are having server issues/load, then why are we able to reconnect simply by restarting EG ? I'm not saying that they don't have server issues, it probably happens like with any server, but that's not where the real problem resides, that's my point of view.

User avatar
kgschlosser
Site Admin
Posts: 4803
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XMPP Plus

Post by kgschlosser » Fri Jul 20, 2018 12:23 am

see that i am unable to replicate. I restart EG and it still will not connect to the server,

or if it does it is only for a brief instant then it drops and goes into the retrying loop.

I have never managed to stay connected to one of the servers for more then a few minutes before it drops and goes into the retrying loop. when i connect to openfire it connects and stays connected and never bombs out.

what I am saying is there could be something that is not playing nice nice between that server and sleekxmpp that is causing the issue. or it could be a server issue. what exactly it is i do not know. I know you want this working in the worst way but my hands are tied with this thing. the author of sleekxmpp is not answering at all. (and hasn't for over a year i think) there are no libraries made for python 2 that are being maintained and the ones for python 3 to convert them to python 2 is more of a process then writing one from scratch (if you are not familiar with how that library works)

My suggestion is to possibly get onto github and find a library that is made and being maintained that is for python 3 and make sure it has all of the features you want. and get that author to convert it. that is going to be the fastest solution. I do not know enough about xmpp to be able to hold an intelligent conversation with someone that is familiar with it. so it is best if you do this bit of it. I don't know enough of the vocabulary. and for me to have to go and learn it and have someone keep on explaining things to me is simply going to make the process take a heap longer.

again I am not giving up but you and I both want something that is going to work. I feel that the best solution is the one above. otherwise i am making a mess over here screwing around with trying to fix something i do not fully understand how it works. I am more then willing to work with you and the author of another library to get the best possible result. because continuing this way is only getting you frustrated and me going bald not being able to nail this thing down.
If you like the work I have been doing then feel free to Image

HTPCanwender
Experienced User
Posts: 59
Joined: Wed Feb 08, 2012 9:41 pm
Location: Germany

Re: XMPP Plus

Post by HTPCanwender » Fri Jul 20, 2018 7:58 am

At least I found a software/provider combination that fits my needs.

eg plugin XMPPplus
viewtopic.php?f=9&t=10068

XMPP server openfire installed on the same PC as eventghost
https://www.igniterealtime.org/projects/openfire/

DDNS provider in Germany dynv6
https://dynv6.com/

DDNS updater
http://ddnsupdater.videocoding.org/

Android XMPP client Xabber
https://www.xabber.com/

As I wrote before, the connection between XMPPplus and openfire on the same PC is stable. The connection does not use stream management XEP 198. The next problem that occured was, that the connection from the android client to my openfire server (dynamic IP) was not stable. I tried many android clients. The only one I found that held the connection permanently and resilient, even if the IP changes is Xabber. It uses stream management XEP 198.

Snowbird
Experienced User
Posts: 363
Joined: Fri Jul 03, 2009 10:04 am

Re: XMPP Plus

Post by Snowbird » Fri Jul 20, 2018 10:43 am

I don't mean to grouse :) but.... I have followed your recommendation and installed an OpenFire server on a remote server (not home), well I don't know what to say, it works fine until a connection change occurs. I have 2 WLAN network at home and each one is linked to a different internet provider, meaning different public IPs, so when I'm on WLAN#1 and connect to Openfire, it will work as expected, as soon as I switch to WLAN#2 I get this awkward behavior.... "trying to reconnect" endlessly, to get rid of this I simply restart EG, and everything works fine despite the fact that now I am on WLAN#2. I can reproduce this over and over, the connection change is not handled as it should in the plugin, or what else could it be ? I have tried several public xmpp servers, and I even installed my own, and the problem is still there, I guess there is nothing more to say, I should never make a connection change if I want it to work :)

User avatar
kgschlosser
Site Admin
Posts: 4803
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XMPP Plus

Post by kgschlosser » Fri Jul 20, 2018 11:03 am

@Snowbird
The issue you are having is because of a change to the logical network layout.

The issue others are having is the random drops in service with it not reconnecting for some reason.

the stream management XEP 198 protocol is for managing streams. as in video streams and audio streams. it is not a reconnection protocol it is a resume protocol.


But now that I just stated that about the logical network thing. I wonder if whatever server is being connected to is having an issue with the IP address changing for some reason. I think that sleekxmpp does some kind of a DNS thing with the server name that gets passed to it. I wonder if it is changing out the server name for the socket connection with an IP address. I'll have to look into that.

but in the meantime you can give this version a shot and see if it makes a difference. I have removed sleekxmpp from handling the socket connection. I have not tested this variant so i do not know if it will or will not work. But give it a shot and see what happens.
Attachments
XMPPPlus.egplugin
(538.92 KiB) Downloaded 25 times
If you like the work I have been doing then feel free to Image

Snowbird
Experienced User
Posts: 363
Joined: Fri Jul 03, 2009 10:04 am

Re: XMPP Plus

Post by Snowbird » Fri Jul 20, 2018 11:07 am

Ok, understood ! 🙂

I'm not home at the moment, I'll try this in about 2 hours and will let you know what happens.

Thanks for the follow up.

Snowbird
Experienced User
Posts: 363
Joined: Fri Jul 03, 2009 10:04 am

Re: XMPP Plus

Post by Snowbird » Fri Jul 20, 2018 1:29 pm

here's the errors I get :

Code: Select all

20/07  15:26:21         XMPP Plus v1.2.6: Send Presence: meee@404.city
20/07  15:26:21            Error in Action: "XMPP Plus v1.2.6: Send Presence: meee@404.city"
20/07  15:26:21            Traceback (most recent call last) (WIP-2018.06.03-12.44.49):
20/07  15:26:21              File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionBase.py", line 116, in CallWrapper
20/07  15:26:21                return self(*args)
20/07  15:26:21              File "C:\ProgramData\EventGhost\plugins\XMPPPlus\__init__.py", line 827, in __call__
20/07  15:26:21                parse(status)
20/07  15:26:21              File "C:\ProgramData\EventGhost\plugins\XMPPPlus\__init__.py", line 459, in send_presence
20/07  15:26:21                presence = self._client.make_presence(
20/07  15:26:21            AttributeError: 'NoneType' object has no attribute 'make_presence'

Code: Select all

20/07  15:26:21               XMPP Plus v1.2.6: Send Message: meee@404.city
20/07  15:26:21                  Error in Action: "XMPP Plus v1.2.6: Send Message: meee@404.city"
20/07  15:26:21                  Traceback (most recent call last) (WIP-2018.06.03-12.44.49):
20/07  15:26:21                    File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionBase.py", line 116, in CallWrapper
20/07  15:26:21                      return self(*args)
20/07  15:26:21                    File "C:\ProgramData\EventGhost\plugins\XMPPPlus\__init__.py", line 735, in __call__
20/07  15:26:21                      receipt
20/07  15:26:21                    File "C:\ProgramData\EventGhost\plugins\XMPPPlus\__init__.py", line 477, in send_message
20/07  15:26:21                      self._client['xep_0184'].auto_request = receipt
20/07  15:26:21                  TypeError: 'NoneType' object has no attribute '__getitem__'

User avatar
kgschlosser
Site Admin
Posts: 4803
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XMPP Plus

Post by kgschlosser » Fri Jul 20, 2018 2:55 pm

you don't get any errors when the plugin initially starts?? do you get any events when the plugin connects??
If you like the work I have been doing then feel free to Image

Snowbird
Experienced User
Posts: 363
Joined: Fri Jul 03, 2009 10:04 am

Re: XMPP Plus

Post by Snowbird » Fri Jul 20, 2018 5:08 pm

kgschlosser wrote:
Fri Jul 20, 2018 2:55 pm
you don't get any errors when the plugin initially starts??
There's no error when the plugin starts, but if I manually disable it, I get this error :

Code: Select all

20/07  18:59:26   Error starting plugin: XMPP Plus v1.2.6
20/07  18:59:26   Traceback (most recent call last) (WIP-2018.06.03-12.44.49):
20/07  18:59:26     File "C:\Program Files (x86)\EventGhost\eg\Classes\PluginInstanceInfo.py", line 227, in Stop
20/07  18:59:26       self.instance.__stop__()
20/07  18:59:26     File "C:\ProgramData\EventGhost\plugins\XMPPPlus\__init__.py", line 501, in __stop__
20/07  18:59:26       self._disconnect()
20/07  18:59:26     File "C:\ProgramData\EventGhost\plugins\XMPPPlus\__init__.py", line 365, in _disconnect
20/07  18:59:26       if self._sock is not None:
20/07  18:59:26   AttributeError: 'XMPPPlus' object has no attribute '_sock'
Then, if I try to re-enable it, it doesn't start, the plugin stays disabled !
kgschlosser wrote:
Fri Jul 20, 2018 2:55 pm
do you get any events when the plugin connects??
No, no events at all, it doesn't look as it has successfully connected despite the fact that no errors are thrown !


When I double click on the action "Send Message" I get this :

Code: Select all

20/07  19:03:56   Traceback (most recent call last) (WIP-2018.06.03-12.44.49):
20/07  19:03:56     File "C:\Program Files (x86)\EventGhost\eg\Classes\TaskletDialog.py", line 162, in ProcessingTask
20/07  19:03:56       self.Configure(*args, **kwargs)
20/07  19:03:56     File "C:\Program Files (x86)\EventGhost\eg\Classes\ConfigDialog.py", line 106, in Configure
20/07  19:03:56       treeItem.Configure(*args)
20/07  19:03:56     File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionItem.py", line 80, in Configure
20/07  19:03:56       return self.executable.Configure(*args)
20/07  19:03:56     File "C:\ProgramData\EventGhost\plugins\XMPPPlus\__init__.py", line 750, in Configure
20/07  19:03:56       jid_ctrl = JIDCtrl(self.plugin, panel, jid)
20/07  19:03:56     File "C:\ProgramData\EventGhost\plugins\XMPPPlus\__init__.py", line 640, in __init__
20/07  19:03:56       choices = list(j for j in plugin.roster_jids)
20/07  19:03:56     File "C:\ProgramData\EventGhost\plugins\XMPPPlus\__init__.py", line 439, in roster_jids
20/07  19:03:56       jid.split('/', 1)[0] for jid in self.roster
20/07  19:03:56     File "C:\ProgramData\EventGhost\plugins\XMPPPlus\__init__.py", line 449, in roster
20/07  19:03:56       return self._client.client_roster
20/07  19:03:56   AttributeError: 'NoneType' object has no attribute 'client_roster'

User avatar
kgschlosser
Site Admin
Posts: 4803
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XMPP Plus

Post by kgschlosser » Fri Jul 20, 2018 10:52 pm

all i want are the errors when you start the plugin. nothing else. i have to work this one step at a time. tossing a slew of errors at me when i haven't solved the first issue is going to confuse things.

OK so you do not get any errors.

how about the second question?. are there are connection events generated?. if there are no connection events it has not connected. there for anything else you do as far as using any actions is not going to work.
If you like the work I have been doing then feel free to Image

Snowbird
Experienced User
Posts: 363
Joined: Fri Jul 03, 2009 10:04 am

Re: XMPP Plus

Post by Snowbird » Sat Jul 21, 2018 6:29 am

ok, I already replied to the second question as well, i don't get any events at all, in fact nothing happens at all, no errors and no events, but the plugin does appear as it has started (it doesn't show in red in the configuration pane)

Snowbird
Experienced User
Posts: 363
Joined: Fri Jul 03, 2009 10:04 am

Re: XMPP Plus

Post by Snowbird » Mon Jul 23, 2018 7:14 pm

hi, any progress about the connection change ? this is annoying...
thanks

User avatar
kgschlosser
Site Admin
Posts: 4803
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XMPP Plus

Post by kgschlosser » Wed Jul 25, 2018 1:39 am

when I have gotten it working you will be the first to know
If you like the work I have been doing then feel free to Image

Snowbird
Experienced User
Posts: 363
Joined: Fri Jul 03, 2009 10:04 am

Re: XMPP Plus

Post by Snowbird » Thu Aug 02, 2018 2:24 pm

kgschlosser wrote:
Fri Jul 20, 2018 11:03 am
The issue others are having is the random drops in service with it not reconnecting for some reason.
I'm having that issue too, the thing that I don't understand is why this problem is fixed when EG is restarted ?
Those 2 problems (random drops in service + network change) are always fixed when EG is restarted, why ? What specific thing happens when EG restarts that doesn't happen when it's already running ? The other thing that is strange is when we disable the plugin, wait a few seconds then start it again, it doesn't fix those issues, the restart of EG is mandatory to make it work again until next time.

On the other hand, the random drops in service don't happen with OpenFire (or at least I haven't noticed it yet), the question is why OpenFire handles this better than other type of servers (eJabberd for instance for the domain 404.city) ? I've checked the differences of the running XEPs between the two and was surprised to see that OpenFire has way fewer XEPs running compared to eJabberd, and it doesn't have different XEPs. The ones that are running are the same as the ones on eJabberd, in other words they are running exactly the same XEPs except that OpenFire has fewer XEPs.

This is driving me nuts... can't use this damn plugin without a headache......

Post Reply