ApplyRedactions API does not return (Recurred)

WebViewer Version:
10.3.0

Do you have an issue with a specific file(s)?
No.
Can you reproduce using one of our samples or online demos?
No.
Are you using the WebViewer server?
No.
Does the issue only happen on certain browsers?
No.
Is your issue related to a front-end framework?
No.
Is your issue related to annotations?
No.

Please give a brief summary of your issue:
(Think of this as an email subject)
applyRedactions API does not return.

Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)

Hello,
This problem has occurred again.

Sometimes I succeed 10 times in a row, and sometimes I fail.

Is the applyRedactions API unstable…?
Or is my code bad?

Best Regards.

Please provide a link to a minimal sample where the issue is reproducible:

1 Like

Hello,

Thank you for contacting WebViewer Support. I took a look at this issue, and there seem to be a race condition for applying redaction. Can you try something the the following to see if it works

WebViewer(.....).then((instance) => {
  const { documentViewer, annotationManager } = instance.Core;

  documentViewer.addEventListener('annotationsLoaded',  async () => {
    setTimeout(() => {
      // looks like there is a small delay between when "annotationsLoaded" trigger and when redaction can be applied
      annotationManager.applyRedactions(annotationManager.annotationList)      
    }, 500);
  });
})

Please let me know if the above works for you (if not we can debug further). Since the above isn’t a great solution, we’ll add this to our backlog so you wouldn’t need to do something like that in the future.

Thank you

Best Regards,

Andrew Yip
Web Developer
Apryse

2 Likes

Hello,

We are in the testing phase.
This issue has reoccurred.

When this issue occurs, the document may appear blank.

This is a bad situation…
Could you please take care of it?

Best Regards.

1 Like

Hello,

Sorry for the delayed response. We are still looking into this issue, we found what seem to be causing this issue but are still investigating a fix for it. We’ll let you know when we have more information, thank you for your patience

Best Regards,

Andrew Yip
Web Developer
Apryse

2 Likes

Hello,

Thank you for your reply.
I understand.

Best Regards.

1 Like