Annotation Selector is not valid for given xxx

Explorer ,
Nov 28, 2020 Nov 28, 2020

Copy link to clipboard

Copied

Hi, 

 

I've encountered this error when using 

annotationManager.addAnnotations(xxx);

 

tangyun_0-1606551786012.png

It was working for some time. then suddenly this error shows up. 

Views

208

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct Answer

Community Beginner , Dec 02, 2020 Dec 02, 2020
This error encounters when the Comment is added to the File without selecting the selector

Likes

Translate

Translate
Community Beginner ,
Dec 02, 2020 Dec 02, 2020

Copy link to clipboard

Copied

This error encounters when the Comment is added to the File without selecting the selector

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 02, 2020 Dec 02, 2020

Copy link to clipboard

Copied

Actually,

 

The annotation data are captured by adding event listeners for the event ANNOTATION_ADDED. 

 

This issue was solved by using the annotationManager.registerEventListener, instead of registering the event listener directly on the adobeViewer. 

 

Probably the event .d

it was solved by using the annotationManager to add the eventlistener for Annotation added. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 02, 2020 Dec 02, 2020

Copy link to clipboard

Copied

seems one cannot edit the post once it's posted....

 

I meant probably because of the event.data content are different when captured by annotationManager compared to when captured by adobeViewer

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 03, 2020 Dec 03, 2020

Copy link to clipboard

Copied

            annotationManager.registerEventListener(
                function (event) {
                    console.log(event);
                    if(event.type === "ANNOTATION_ADDED"){
                        annotationAdded(event);
                    }
                }
            );

This is how I am listening to the EventListener.
On annotationAdded(event) I am storing it locally .
and When I use the same annotation value to addAnnotations() that's when I get the Error 

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Dec 03, 2020 Dec 03, 2020

Copy link to clipboard

Copied

Thanks for using PDF Embed API. We are sorry for the inconvenience, could you please help us with the following information?

As tangyun said, "It was working for some time. then suddenly this error shows up.", are you trying to add the annotation to the same PDF from which annotation data was generated. Also, did annotation gets updated in between?

And for Dhruv5CCF query, is this happening each time for you, or for any particular PDF or annotation type or position?

Looking forward to helping you out.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 03, 2020 Dec 03, 2020

Copy link to clipboard

Copied

Hi Shubhanshu, I am getting the Error Message as - "Annotation selector is not valid for given XXXXX", 

Steps to reproduce it :

1. Open the Adobe PDF Dialog ( you will see the pdf get opened. )

2. Click on the coment dialogue on the top right corner , add some text to it and Click POST.

3. The Annotated data get saved in the database with success message.

4. Now when we are using the same data to be loaded with the below function as:

           annotationManager.addAnnotations(annotatedValue)
                .then(function () {
                    console.log("Annotations added through annotatedValue")
                })
                .catch(function (error) {
                    console.log(error)
            });
where "annotatedValue" contains the same data which is saved to the collection.
5. Throws an error - Annotation selector is not valid for given XXXXX
 
Screenshot is also attached.Annotate Issue 1.PNGAnnotate Issue 2.PNGAnnotate Issue 3.PNGAnnotate Issue 4.PNG

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Dec 03, 2020 Dec 03, 2020

Copy link to clipboard

Copied

Thanks, Dhruv for the information, we are experiencing this problem with Page Level Annotation for some PDFs. We are actively working on the fix and will be rolled out soon. Appreciate your patience on this. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 16, 2021 Feb 16, 2021

Copy link to clipboard

Copied

Is there any update on this? I am receiving the same error when loading page level annotations or drawing annotations. Sticky notes are working.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 19, 2021 Feb 19, 2021

Copy link to clipboard

Copied

LATEST

I have the same problem.  Works on some pdf files and fails on others.  Fails most of the time. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines