[Collaboration] Get error message when running update scroll api (Update Scroll Sync Session)

Hi PDFTron,

I use Collaboration to use Scroll Sync Session. I use this document to create, exit, … a scroll session: Introduction | WebViewer Real-time Collaboration

From the server side, I set ‘proxy_read_timeout’ is X(s), X can be 100, 36000, or any value. After X seconds, connections will be disconnected.
When joining a session, after X seconds, the scroll session will be disconnected, then scrolling the mouse, API UpdateScrollSyncSession responses success 200 status and the error message that the scroll session does not exist. I sent the image illustrating the error.
My problem is that I cannot get the event to get the above error message in the code. I researched the document but there is no idea to support my issue.
Can you give me the solution to get the error message when occurring the error from the client side?

Product Version:

  • webviewer: 8.10.0
  • collab-client: 2.0.0

Thank you.

Hello iris,

Here is a link to our EventManager API

We have:

  • scrollSyncSessionsChanged
  • joinedScrollSyncSession
  • leftScrollSyncSession

You can catch the errors on these events, does this work for you?

Best regards,
Tyler Gordon
Web Development Support Engineer
PDFTron

Hello Tyler Gordon,

I tried to use the events you mentioned but they do not work for my issue.
When I scroll the document and the error appears, no events are called. I checked what is the scroll sync session in which the document is joining, and the result of the session still showing. However, when scrolling the document, the error message shows that the session does not exist. I assume that on the server side, the session was closed, but the client side does not know about that.
Therefore, I want to catch the errors on the scroll event (I mean the event when I scroll the document), can you give me the solutions or any information about the event?

Thank you.

Hello iris,

The scroll event it self would be on the browser itself: Document: scroll event - Web APIs | MDN

Best regards,
Tyler Gordon
Web Development Support Engineer
PDFTron

Hello Tyler Gordon,
When using Document: scroll event - Web APIs | MDN you mentioned above, I cannot get the API Update Scroll Sync Session. I attached the relevant image about the API:

I want to know the scroll event of PDFTron Collaboration to catch the error in the scroll session: the leader user scrolls the document, and the followers’ side is not scrolled following. Can you give me any solutions for the error?

Thank you.

Hello iris,

Apologies I see what you mean now. We do not have an event exposed for when the leader scrolls and the follower listens to catch any errors.

Since we are not longer developing new features for collab, you could add this by using the scroll event on the leader and sending a notification using notifications Notifications | WebViewer Real-time Collaboration to the followers. If the leader sends the notification and the user doesnt scroll you can handle the error catching on both ends.

Best regards,
Tyler Gordon