Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display refresh (every minute) always jumping to the end of the conversation #2493

Closed
hjuvi opened this issue May 10, 2021 · 12 comments
Closed

Comments

@hjuvi
Copy link

hjuvi commented May 10, 2021

Describe the bug
When reading a conversation with relatively long history, the display refreshes every minute and brings back to the bottom of the conversation, which is quite irritating, because we just have the time to scroll up and find where we had stopped reading in the conversation, and then again it bumps to the end.

To Reproduce
Steps to reproduce the behavior:

  1. Read a long conversation (several screens)
  2. Scroll up
  3. Wait for 1 minute (at max)
  4. See that we bump to the bottom

Expected behavior
Whatever needs to be refreshed, I would expect the current position in the conversation to be preserved.

Environment (please complete the following information):

  • Desktop version
  • Firefox browser
  • Converse.js version 7.0.4
@hjuvi hjuvi changed the title Display refresh (every second) always jumping to the end of the conversation Display refresh (every minute) always jumping to the end of the conversation May 10, 2021
@licaon-kter
Copy link
Contributor

licaon-kter commented May 10, 2021

Can you test with current HEAD?

/duplicate #2075 ?

@hjuvi
Copy link
Author

hjuvi commented May 10, 2021

Unfortunately, I'm using a public instance, I'm not running my own server... So I can't test it myself.
Sounds like it could be a duplicate of #2075 but... this one was announced fixed in June 2020, while version 7.0.4 was released in December 2020. So I'm not so sure...

@jcbrand
Copy link
Member

jcbrand commented May 10, 2021

The latest code is here: https://conversejs.org/trunk/fullscreen.html

You can check whether it happens there as well.

@hjuvi
Copy link
Author

hjuvi commented May 10, 2021

It seems to be fixed on this trunk version. In fact, there seems to be no refresh (i.e. brief blank screen with spinner) at all, even when we're at the end of the conversation. But that's surely normal behaviour.
OK, so I'll just wait for the service provider to upgrade the version (Hope it's already in 7.0.5).
Thank you.

@jcbrand
Copy link
Member

jcbrand commented May 10, 2021

Thanks for checking.

I think this issue is solved in 7.0.5 as well.

@jcbrand jcbrand closed this as completed May 10, 2021
@hjuvi
Copy link
Author

hjuvi commented Jun 29, 2021

Hi, sorry for commenting this issue again, but in the meantime my XMPP service provider kindly upgraded the version, first with 7.0.5, and later with 7.0.6.
With both versions, the problem was reproduced. Do you have any idea of anything else besides the source code itself - maybe a config file - that could explain the difference of behaviour?
I've just tried connecting with both this instance, and your trunk instance. And I clearly have the issue only in my 7.0.6 instance. And I had already checked that the trunk version did not have the problem, before 7.0.6 was released (comments above).

@jcbrand
Copy link
Member

jcbrand commented Jun 29, 2021

In the current master branch we no longer manually scroll down but use flex-direction: reverse which is finally supported by Firefox. I suspect that also fixes this issue.

@hjuvi
Copy link
Author

hjuvi commented Jun 29, 2021

OK, so you're suggesting we should try again with the next release?
Yet the strange thing is that it was apparently fixed with the trunk before 7.0.6...

@jcbrand
Copy link
Member

jcbrand commented Jun 29, 2021

Yes, I believe it's fixed in master and so the fix will be included in the upcoming 8.0.0 release.

@hjuvi
Copy link
Author

hjuvi commented Jul 2, 2021

The issue has been fixed - with version 7.0.6 - by changing the connection method from Websockets to BOSH. The admin from my XMPP service provider needs to investigate a little bit more, to clearly understand what caused the issue with Websockets, but he decided to test BOSH after having seen that your trunk instance was using it, and that the websocket connection was closed automatically after about one minute (which resulted in page reloading).

He's still not sure whether the problem is due to the particular setting of its installation, or a bug that anyone should have if using websockets...

@jcbrand
Copy link
Member

jcbrand commented Jul 2, 2021

Are you using Openfire?

I remember @guusdk also having an issue with the websocket connection dropping every 60 seconds.

This was the issue that caused it: strophe/strophejs#374

@pitchum
Copy link

pitchum commented Jul 3, 2021

We are using ejabberd and the problem was actually caused by a misconfiguration on our side.
We had 2 nginx (don't ask me why) reverse proxies in front of ejabberd's websocket listener, and I guess one of those nginx was shutting connections after 60 seconds of inactivity. I'm not entirely sure of that because I couldn't find any meaningfull message in nginx's error log.

Problem solved after moving one the 2 nginx out of the equation and setting websocket_ping_interval: 55 in ejabberd.yml.
It ensures that ejabberd sends a keepalive ping every 55 seconds, just before nginx consider the connection unused (nginx's default proxy_read_timeout is 60 secs).

Our ConverseJS now works fine with websockets :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants