Please give a brief summary of your issue:
A new scrollSyncSession is created by the Leader and as a follower, I want to join that new session. Get Error on join()
Please describe your issue and provide steps to reproduce it:
As a follower I have joined a session by the leader, and I am able to join the first session.
A new scrollSyncSession is created by the Leader and as a follower, I want to join that new session.
When I attempt join() the new session, this is the error I receive:
Error: Cannot return null for non-nullable field ScrollSyncSession.leaderId.
Below is the code snippets we us to join and exit from the session.
We have noticed that active sessions list will occasionally contain 2 sessions of the same session ID so perhaps those are conflicting.
Regarding the useCurrentScrollSyncSession hook, yarn is telling us it can’t be found: error An unexpected error occurred: "https://registry.yarnpkg.com/@pdftron%2fcollab-react: Not found".
Is the package publicly accessible?
Hey, I’m the working scrum master for the team here and the above issue is a major blocker for our current sprint. So if we are still having issues is somebody available to jump on a call and do a screen share? Also, should we be worried that the library is now deprecated? Are there plans to continue with something else? How long will it be supported? Thanks!
@pdftron/collab-client is deprecated and is no longer supported.
We have built a signification portion of our functionality off of the collab-client package. Will @pdftron/collab-client continue to be supported or is there a package that will replace this functionality?
Andrey here, Director of Product at PDFTron. I am free to jump on a call to walk through your options for building out collab: Calendly - Andrey Safonov. If you do not find time on Calendly, I can try to move things around. I am in EST timezone.
I replied via email twice, but I will post my response here as well.
Hi Tyler,
Here is the following information:
Our webviewer instance exist on it’s own seperate page.
when the leader goes to the page, a session is started.
when the follower joins afterward, it joins the session fine.
problem occurs when leader leaves by clicking on another page and tries to navigate back to the webviewer page.
according to the logs the session is not ended when the leader leaves.
when the leader navigates back to the webviewer a new session is created then ended immediately.
Please see previous console logs in ticket regarding seemingly duplicated sessions
package versions:
“@pdftron/collab-client”: “^2.0.0-alpha.13”,
“@pdftron/webviewer”: “8.2.0-20211206”,
logs:
2022-09-29 13:12:39 info [SCROLL_SYNC]: User 5846f06e-8786-4483-a89c-586c53a43e63 started a scroll sync session on document 1974e7b2-43d4-4cba-b48d-459236aff4b3
2022-09-29 13:12:44 info [SCROLL_SYNC]: User 0e66b377-8db3-4111-8d27-edf2fa6040c8 joined a scroll sync session 1664471559007-5846f1974e
2022-09-29 13:12:51 info [SCROLL_SYNC]: User 5846f06e-8786-4483-a89c-586c53a43e63 started a scroll sync session on document 1974e7b2-43d4-4cba-b48d-459236aff4b3 <== when leader navigates back.
2022-09-29 13:12:51 info [SCROLL_SYNC]: User 5846f06e-8786-4483-a89c-586c53a43e63 ended a scroll sync session 1664471559007-5846f1974e <== leader didn’t take any action, this just happens _ immediately after starting the session.
Thank you for the information, please keep all discussion for this topic here as emailing support@pdftron.com will automatically create new tickets (which will be hard to track). Thank you!
What could be happening is since the session isn’t cancelled, when they open a new session it checks if they have any current sessions open then closes them.
Leader creates session
User joins
Leader leaves page before calling ScrollSyncSession.exit()
Leader rejoins page
4.1. Leader creates new session
4.2. Collab checks if user has another session made
4.3. Collab closes the session
4.4 Session is made
So tracking the onbeforeunload event, you can end the scroll sync session
Best regards,
Tyler Gordon
Web Development Support Engineer
PDFTron
Sometimes when leader starts scroll sync session, leader will lose the ability to scroll. Not sure how to reproduce consistently and not seeing errors in console.
When the leader starts a scroll sync session follower isn’t joining the session even though it sees the active session. Sometimes follower will be able to join session after refreshing, but still showing the same error in console.
Error: Cannot return null for non-nullable field ScrollSyncSession.leaderId.