ApplyRedactions API does not return (Recurred)

WebViewer Version:

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

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)

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


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
    }, 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