beagle-im icon indicating copy to clipboard operation
beagle-im copied to clipboard

No chat history if you open Contact

Open jnaeff opened this issue 4 years ago • 38 comments

Describe the bug If I open a new chat window to a college then the chat history is not loaded. It works fine if I added MUC group. I tried it a couple of times now with changing the setting related with this but I get the same result.

To Reproduce Steps to reproduce the behaviour:

  1. Open a new 1 on 1 chat to a college;
  2. The new window opens you should see now the old chat history (it is now empty);

Expected behaviour If you open the new chat window you expect to see the old chat history. But that is now empty. It feels that it doesn't catch the old chat history from the server.

Screenshots Screenshot #8

Desktop (please complete the following information):

  • OS: 10.15.4
  • Version: 87

jnaeff avatar Apr 13 '20 20:04 jnaeff

Which server do you use? Does it support message archiving (MAM)? Did you enabled storing message history on the server?

woj-tek avatar Apr 13 '20 22:04 woj-tek

Ejabberd 19.05

jnaeff avatar Apr 14 '20 08:04 jnaeff

1-1 chat history is not retrieved on the opening of a chat but on connection to the XMPP server. BeagleIM retrieves messages from X last days or since the last message which is in BeagleIM archive.

hantu85 avatar Apr 14 '20 08:04 hantu85

The issue still excited if you send a message on BeagleIM and then switch to SiskimIM. Then they message are not synced. This way you mis part of the conversation. What do you need to debug this issue?

jnaeff avatar Apr 19 '20 17:04 jnaeff

Can you confirm, ie. with the use of another client, that those messages are actually archived by the server?

hantu85 avatar Apr 19 '20 17:04 hantu85

It works on other clients. I notice I have the issue only by 1 on 1 chats. I have the same issue in SiskimIM. If I switch between BeagleIM and SiskimIM my message are also not synced. With MUC it works like it suposed to.

jnaeff avatar Apr 27 '20 08:04 jnaeff

Which version of BeagleIM do you use? From the AppStore? of beta build?

hantu85 avatar Apr 27 '20 08:04 hantu85

SiskimIM 6.0 and BeagleIM 90

jnaeff avatar Apr 27 '20 09:04 jnaeff

I have similar issue, the message synchronisation does not work but if I try to use other client (like converse.js) it gets all the history retrieved correctly.

Steps to reproduce

  • send message from converse.js, close it
  • open BeagleIM, can't see my sent message, close it
  • open converse.js in another browser, all history retrieved correctly

BeagleIM , Version 4.0 (103)

achempion avatar Oct 27 '20 10:10 achempion

Could you check if you have message synchronization enabled in the account settings?

hantu85 avatar Oct 27 '20 11:10 hantu85

@hantu85 how do I check it, do you mean "Automatic synchronisation" under "Message archiving" section?

I checked the server database as well and it contains the message, also it can be retrieved from completely fresh instance of other xmpp client.

achempion avatar Oct 27 '20 11:10 achempion

do you mean "Automatic synchronisation" under "Message archiving" section?

Yes, exactly there.

hantu85 avatar Oct 27 '20 11:10 hantu85

@hantu85 I checked it, re-activated the account and restarted an application after that, it still doesn't show messages sent from other client.

I thought it would be better to keep this setting off because of deprecated status of message archiving standard https://xmpp.org/extensions/xep-0136.html. But still can't see my messages.

I wonder can I somehow delete local Beagle database to see will it retrieve any messages.

achempion avatar Oct 27 '20 11:10 achempion

Message archiving in this case is general term and BeagleIM does not support XEP-0136, only XEP-0313 is supported.

Just to be sure, you have enabled "Automatic message synchronization" and selected period of time to synchronize?

hantu85 avatar Oct 27 '20 11:10 hantu85

Just to be sure, you have enabled "Automatic message synchronization" and selected period of time to synchronize?

Yes, last 3 days. All messages was sent today.

More info how to reproduce:

  • close beagle
  • create file index.html with content
<html>
  <head>
    <link rel="stylesheet" type="text/css" media="screen" href="https://cdn.conversejs.org/6.0.0/dist/converse.min.css">
    <script src="https://cdn.conversejs.org/6.0.0/dist/converse.min.js" charset="utf-8"></script>
  </head>
  <body>
    <script>
    converse.initialize({
        bosh_service_url: 'https://<your server>:5443/bosh',
      view_mode: 'fullscreen'
    });
</script>
  </body>
</html>

login and send any message

  • open beagle and check can you see your sent message

p.s. thank you for the client, it's best client for the xmpp today, easy to use and great design

achempion avatar Oct 27 '20 11:10 achempion

Well, I'm testing BeagleIM with Tigase all the time and "message sync issues" are rarely reported from other servers. Could you tell me which server do you use? i would need to test BeagleIM against exactly this server software and most likely version to be able to provide a fix.

hantu85 avatar Oct 27 '20 11:10 hantu85

I'm using ejabberd 20.07.45.

I have UTC timezone on the server and my client is UTC+3.

achempion avatar Oct 27 '20 11:10 achempion

If I delete beagleim.sqlite and then re-open an application I'll get all history correctly.

achempion avatar Oct 27 '20 11:10 achempion

Did you have any message from this account in your BeagleIM? If so, BeagleIM would fetch only newer messages that in had in the local storage.

hantu85 avatar Oct 27 '20 11:10 hantu85

I did. Now, after I deleted the beagleim.sqlite the synchronization started working correctly. Can't reproduce my case anymore.

achempion avatar Oct 27 '20 12:10 achempion

I suppose that this was causing the issue in your case. I suppose we should improve onboarding process, so that we would ask users to enable message archiving synchronization during adding the account.

hantu85 avatar Oct 27 '20 12:10 hantu85

It appears I have a similar issue. Using Beagle 4.1 (110) and prosody 0.11.5.

With Profanity on account A I write to account B which is online with ChatSecure, no encryption used. ChatSecure receives the messages. I leave ChatSecure on. I start Beagle. Nothing happens. I click on the past conversations with account A: the recently sent messages still do not appear.

jubalh avatar Jan 19 '21 18:01 jubalh

They will not appear if message synchronization is not enabled. Please check account settings in Beagle IM. It may happen that only newer messages (after message synchronization is enabled) will sync to Beagle IM.

hantu85 avatar Jan 19 '21 20:01 hantu85

They will not appear if message synchronization is not enabled. Please check account settings in Beagle IM

I didn't find that setting, but will look again later today. What is the intention behind not having this on by default? I imagine most users would want this behaviour.

jubalh avatar Jan 20 '21 07:01 jubalh

What is the intention behind not having this on by default? I imagine most users would want this behaviour.

@jubalh privacy concerns, though there should be a prompt for the user (like in Siskin) if feature is available on the server.

woj-tek avatar Jan 25 '21 10:01 woj-tek

I confirm that 1 on 1 MAM does not work for me either (even non-OMEMO). My server is a prosody instance and MAM works just fine in gajim, dino, conversejs and Conversations. MUC MAM works OK though, even in beagle. Interestingly enough, if I manually check "enable sync" / "automatic sync", click save, and reopen "archiving settings", they are unchecked. I am using Version 5.0 (134). Let me know if I can help further debug this.

EDIT: I did some more testing and now "enabled" stays checked on in "archiving settings" but "automatic sync" does not. This is what the XML console report when I do that:

<!--   2021-09-29T05:52:55Z   >>>>   -->
<iq id='7BAD86DD-E224-4B96-9EDC-A8BE4178019E' type='get'>
<prefs xmlns='urn:xmpp:mam:2'/>
</iq>

<!--   2021-09-29T05:52:55Z   <<<<   -->
<iq type='result' id='7BAD86DD-E224-4B96-9EDC-A8BE4178019E' to='[email protected]/8b-Cwfxo'>
<prefs xmlns='urn:xmpp:mam:2' default='always'>
<always/>
<never/>
</prefs>
</iq>

<!--   2021-09-29T05:52:57Z   >>>>   -->
<iq id='F50FB703-359D-4EC8-8116-45EA58D9D141' type='get'>
<prefs xmlns='urn:xmpp:mam:2'/>
</iq>

<!--   2021-09-29T05:52:57Z   <<<<   -->
<iq type='result' id='F50FB703-359D-4EC8-8116-45EA58D9D141' to='[email protected]/8b-Cwfxo'>
<prefs default='always' xmlns='urn:xmpp:mam:2'>
<always/>
<never/>
</prefs>
</iq>

<!--   2021-09-29T05:52:57Z   >>>>   -->
<iq id='9F223A17-4746-4C04-B484-A55719117E06' type='set'>
<prefs default='always' xmlns='urn:xmpp:mam:2'/>
</iq>

<!--   2021-09-29T05:52:57Z   <<<<   -->
<iq type='result' id='9F223A17-4746-4C04-B484-A55719117E06' to='[email protected]/8b-Cwfxo'/>

<!--   2021-09-29T05:53:13Z   >>>>   -->
<iq type='get' id='EB6D18DC-E231-499D-83C2-058A3ED1FF22'>
<prefs xmlns='urn:xmpp:mam:2'/>
</iq>

<!--   2021-09-29T05:53:13Z   <<<<   -->
<iq id='EB6D18DC-E231-499D-83C2-058A3ED1FF22' to='[email protected]/8b-Cwfxo' type='result'>
<prefs xmlns='urn:xmpp:mam:2' default='always'>
<always/>
<never/>
</prefs>
</iq>

<!--   2021-09-29T05:53:16Z   >>>>   -->
<iq type='get' id='D6C303F7-54EE-4C6F-9056-31B56BA18671'>
<prefs xmlns='urn:xmpp:mam:2'/>
</iq>

<!--   2021-09-29T05:53:16Z   <<<<   -->
<iq to='[email protected]/8b-Cwfxo' type='result' id='D6C303F7-54EE-4C6F-9056-31B56BA18671'>
<prefs default='always' xmlns='urn:xmpp:mam:2'>
<always/>
<never/>
</prefs>
</iq>

<!--   2021-09-29T05:53:16Z   >>>>   -->
<iq id='353A0C78-F02F-46AF-BC7B-1A029343527C' type='set'>
<prefs default='always' xmlns='urn:xmpp:mam:2'/>
</iq>

<!--   2021-09-29T05:53:16Z   <<<<   -->
<iq type='result' to='[email protected]/8b-Cwfxo' id='353A0C78-F02F-46AF-BC7B-1A029343527C'/>

Is my prosody instance behaving in some way that beagle does not expect?

truenicoco avatar Sep 29 '21 05:09 truenicoco

Beagle 5.0 is out, all is great except this MAM thing not working. I have no idea where to read error messages or where to start to try and help debug this. All I know is that the 'automatic sync' checkbox does not 'stay' checked in the app settings. Please let me know where I can look to find logs or something...

truenicoco avatar Dec 08 '21 07:12 truenicoco

Removing beagleim.sqlite did work for me. I tried to uninstall and remove all beagle files to start from a clean state, but because of some mac os x magic, I cannot seem to find how to do that. I tried removing my account from beagle and readding it, but still no message sync.

Launching BeagleIM from the terminal does not print anything useful to stderr or stdout.

In settings, if I go to archiving settings, 'enabled' is unchecked and clicking 'save' does not close the dialog. I can close it using "cancel". If I reopen 'archiving settings', 'enabled' is checked, so I can try to check 'automatic synchronization', and close the dialog with 'cancel' again. If I reopen a third time 'archiving settings', 'enabled' is checked but not 'automatic sync'.

Please, I don't want to give up a this, BeagleIM is great besides this issue which apparently can be solved by starting from a clean state. If anybody reads this, just help me remove all application cache/data/whatever. Do I have to reinstall macos x to do that?

truenicoco avatar Dec 11 '21 07:12 truenicoco

If you want to remove all data of BeagleIM, have a look at zap section on https://github.com/tigase/homebrew-tigase/blob/master/Casks/beagleim-beta.rb which cleans up BeagleIM data when installed with homebrew. (Directories listed there are removed AFAIR).

As for 'save' not closing the dialog, it is only possible if BeagleIM was not able to retrieve your MAM settings from the server or update them. As those operations are crucial, the window stays open (unfortunately, it was not possible to retrieve the actual error). To dig deeper, please open the XML console for this account (in BeagleIM hold OPTION and click on Window, XML Console and select the correct account. Then try to save options in the settings window.

hantu85 avatar Dec 11 '21 12:12 hantu85

if you want to remove all data of BeagleIM, have a look at zap section on https://github.com/tigase/homebrew-tigase/blob/master/Casks/beagleim-beta.rb which cleans up BeagleIM data when installed with homebrew. (Directories listed there are removed AFAIR)

Well I installed via app store, then tried the beta from the releases on github. Are some settings saved via apple cloud or something?

This is the XML console output when I tried to enable 'automatic sync', and click on save, resulting on the dialog box not closing.

<!--   2021-12-12T07:16:59Z   >>>>   -->
<iq id='EF33DEC0-695B-4575-84D9-CF64A4E24D91' type='get'>
<prefs xmlns='urn:xmpp:mam:2'/>
</iq>

<!--   2021-12-12T07:16:59Z   <<<<   -->
<iq type='result' id='EF33DEC0-695B-4575-84D9-CF64A4E24D91' to='[email protected]/SvNMiUQY'>
<prefs xmlns='urn:xmpp:mam:2' default='always'>
<always/>
<never/>
</prefs>
</iq>

<!--   2021-12-12T07:17:03Z   >>>>   -->
<iq id='1117D5FB-D787-4E3A-8E4B-3968B8F56D20' type='get'>
<prefs xmlns='urn:xmpp:mam:2'/>
</iq>

<!--   2021-12-12T07:17:03Z   <<<<   -->
<iq to='[email protected]/SvNMiUQY' type='result' id='1117D5FB-D787-4E3A-8E4B-3968B8F56D20'>
<prefs default='always' xmlns='urn:xmpp:mam:2'>
<always/>
<never/>
</prefs>
</iq>

<!--   2021-12-12T07:17:03Z   >>>>   -->
<iq id='B39F4042-9074-427A-8E7F-761AC72A8536' type='set'>
<prefs xmlns='urn:xmpp:mam:2' default='always'/>
</iq>

<!--   2021-12-12T07:17:03Z   <<<<   -->
<iq to='[email protected]/SvNMiUQY' id='B39F4042-9074-427A-8E7F-761AC72A8536' type='result'/>

I have never digged into MAM stuff too much, my prosody settings are pretty vanilla there, and it works fine using monal, conversations, conversejs, gajim, dino. Do you think beagle needs some special settings enabled/disabled in prosody?

Thanks for your reply btw!

truenicoco avatar Dec 12 '21 07:12 truenicoco