Webviewer unable to load annotations for a specific file

WebViewer Version: 8.2.0

Do you have an issue with a specific file(s)? Yes
Can you reproduce using one of our samples or online demos? Yes
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? Yes

Please give a brief summary of your issue:
My file’s raises an exception in webviewer when I attempt to load it in webviewer. Out of 100+ annotations, only 39 are loaded:

Uncaught (in promise) SyntaxError: Unexpected token } in JSON at position 2
    at JSON.parse (<anonymous>)
    at fO (webviewer-core.min.js:2426:489)
    at n (webviewer-core.min.js:2429:323)
    at f.gO (webviewer-core.min.js:2430:30)
    at webviewer-core.min.js:2422:343
    at webviewer-core.min.js:2422:263
    at webviewer-core.min.js:1973:335
    at y (webviewer-core.min.js:1761:55)
    at ha (webviewer-core.min.js:1761:76)
    at aa (webviewer-core.min.js:1968:104)
fO @ webviewer-core.min.js:2426
n @ webviewer-core.min.js:2429
gO @ webviewer-core.min.js:2430
(anonymous) @ webviewer-core.min.js:2422
(anonymous) @ webviewer-core.min.js:2422
(anonymous) @ webviewer-core.min.js:1973
y @ webviewer-core.min.js:1761
ha @ webviewer-core.min.js:1761
aa @ webviewer-core.min.js:1968
(anonymous) @ webviewer-core.min.js:1965
h @ webviewer-core.min.js:189
(anonymous) @ webviewer-core.min.js:188
(anonymous) @ webviewer-core.min.js:188
ha @ webviewer-core.min.js:187
ba @ webviewer-core.min.js:1964
H0 @ webviewer-core.min.js:2421
n @ webviewer-core.min.js:2422
mY @ webviewer-core.min.js:2423
(anonymous) @ webviewer-core.min.js:410
QR @ webviewer-core.min.js:410
(anonymous) @ webviewer-core.min.js:285
ET @ webviewer-core.min.js:259
(anonymous) @ webviewer-core.min.js:285
h @ webviewer-core.min.js:189
(anonymous) @ webviewer-core.min.js:188
(anonymous) @ webviewer-core.min.js:188
ha @ webviewer-core.min.js:187
(anonymous) @ webviewer-core.min.js:285
(anonymous) @ webviewer-core.min.js:285
Promise.then (async)
(anonymous) @ webviewer-core.min.js:285
setTimeout (async)
ka.Y$ @ webviewer-core.min.js:284
ka.Dz @ webviewer-core.min.js:284
ka.kQ @ webviewer-core.min.js:283
(anonymous) @ webviewer-core.min.js:286
h @ webviewer-core.min.js:189
(anonymous) @ webviewer-core.min.js:188
(anonymous) @ webviewer-core.min.js:188
ha @ webviewer-core.min.js:187
(anonymous) @ webviewer-core.min.js:285
Promise.then (async)
(anonymous) @ webviewer-core.min.js:285
ET @ webviewer-core.min.js:259
(anonymous) @ webviewer-core.min.js:285
h @ webviewer-core.min.js:189
(anonymous) @ webviewer-core.min.js:188
(anonymous) @ webviewer-core.min.js:188
ha @ webviewer-core.min.js:187
(anonymous) @ webviewer-core.min.js:285
(anonymous) @ webviewer-core.min.js:285
Promise.then (async)
(anonymous) @ webviewer-core.min.js:285
setTimeout (async)
ka.Y$ @ webviewer-core.min.js:284
ka.Dz @ webviewer-core.min.js:284
ka.kQ @ webviewer-core.min.js:283
(anonymous) @ webviewer-core.min.js:286
h @ webviewer-core.min.js:189
(anonymous) @ webviewer-core.min.js:188
(anonymous) @ webviewer-core.min.js:188
ha @ webviewer-core.min.js:187
(anonymous) @ webviewer-core.min.js:285
Promise.then (async)
(anonymous) @ webviewer-core.min.js:285
ET @ webviewer-core.min.js:259
(anonymous) @ webviewer-core.min.js:285
h @ webviewer-core.min.js:189
(anonymous) @ webviewer-core.min.js:188
(anonymous) @ webviewer-core.min.js:188
ha @ webviewer-core.min.js:187
(anonymous) @ webviewer-core.min.js:285
(anonymous) @ webviewer-core.min.js:285
Promise.then (async)
(anonymous) @ webviewer-core.min.js:285
setTimeout (async)
ka.Y$ @ webviewer-core.min.js:284
ka.Dz @ webviewer-core.min.js:284
ka.kQ @ webviewer-core.min.js:283
(anonymous) @ webviewer-core.min.js:286
h @ webviewer-core.min.js:189
(anonymous) @ webviewer-core.min.js:188
(anonymous) @ webviewer-core.min.js:188
ha @ webviewer-core.min.js:187
(anonymous) @ webviewer-core.min.js:285
Promise.then (async)
(anonymous) @ webviewer-core.min.js:285
ET @ webviewer-core.min.js:259
(anonymous) @ webviewer-core.min.js:285
h @ webviewer-core.min.js:189
(anonymous) @ webviewer-core.min.js:188
(anonymous) @ webviewer-core.min.js:188
ha @ webviewer-core.min.js:187
(anonymous) @ webviewer-core.min.js:285
(anonymous) @ webviewer-core.min.js:285
Promise.then (async)
(anonymous) @ webviewer-core.min.js:285
setTimeout (async)
ka.Y$ @ webviewer-core.min.js:284
ka.Dz @ webviewer-core.min.js:284
ka.kQ @ webviewer-core.min.js:283
(anonymous) @ webviewer-core.min.js:286
h @ webviewer-core.min.js:189
(anonymous) @ webviewer-core.min.js:188
(anonymous) @ webviewer-core.min.js:188
ha @ webviewer-core.min.js:187
(anonymous) @ webviewer-core.min.js:285
Promise.then (async)
(anonymous) @ webviewer-core.min.js:285
ET @ webviewer-core.min.js:259
(anonymous) @ webviewer-core.min.js:285
h @ webviewer-core.min.js:189
(anonymous) @ webviewer-core.min.js:188
(anonymous) @ webviewer-core.min.js:188
ha @ webviewer-core.min.js:187
(anonymous) @ webviewer-core.min.js:285
(anonymous) @ webviewer-core.min.js:285
Promise.then (async)
(anonymous) @ webviewer-core.min.js:285
setTimeout (async)
ka.Y$ @ webviewer-core.min.js:284
ka.Dz @ webviewer-core.min.js:284
ka.kQ @ webviewer-core.min.js:283
(anonymous) @ webviewer-core.min.js:286
h @ webviewer-core.min.js:189
(anonymous) @ webviewer-core.min.js:188
(anonymous) @ webviewer-core.min.js:188
ha @ webviewer-core.min.js:187
(anonymous) @ webviewer-core.min.js:285
Promise.then (async)
(anonymous) @ webviewer-core.min.js:285
ET @ webviewer-core.min.js:259
(anonymous) @ webviewer-core.min.js:285
h @ webviewer-core.min.js:189
(anonymous) @ webviewer-core.min.js:188
(anonymous) @ webviewer-core.min.js:188
ha @ webviewer-core.min.js:187
(anonymous) @ webviewer-core.min.js:285
(anonymous) @ webviewer-core.min.js:285
Promise.then (async)
(anonymous) @ webviewer-core.min.js:285
setTimeout (async)
ka.Y$ @ webviewer-core.min.js:284
ka.Dz @ webviewer-core.min.js:284
ka.kQ @ webviewer-core.min.js:283
(anonymous) @ webviewer-core.min.js:286
h @ webviewer-core.min.js:189
(anonymous) @ webviewer-core.min.js:188
(anonymous) @ webviewer-core.min.js:188
ha @ webviewer-core.min.js:187
(anonymous) @ webviewer-core.min.js:285
Promise.then (async)
(anonymous) @ webviewer-core.min.js:285
ET @ webviewer-core.min.js:259
(anonymous) @ webviewer-core.min.js:285
h @ webviewer-core.min.js:189
(anonymous) @ webviewer-core.min.js:188
(anonymous) @ webviewer-core.min.js:188
ha @ webviewer-core.min.js:187
(anonymous) @ webviewer-core.min.js:285
(anonymous) @ webviewer-core.min.js:285
Promise.then (async)
(anonymous) @ webviewer-core.min.js:285
setTimeout (async)
ka.Y$ @ webviewer-core.min.js:284
ka.Dz @ webviewer-core.min.js:284
ka.kQ @ webviewer-core.min.js:283
(anonymous) @ webviewer-core.min.js:286
h @ webviewer-core.min.js:189
(anonymous) @ webviewer-core.min.js:188
(anonymous) @ webviewer-core.min.js:188
ha @ webviewer-core.min.js:187
(anonymous) @ webviewer-core.min.js:285
Promise.then (async)
(anonymous) @ webviewer-core.min.js:285
ET @ webviewer-core.min.js:259
(anonymous) @ webviewer-core.min.js:285
h @ webviewer-core.min.js:189
(anonymous) @ webviewer-core.min.js:188
(anonymous) @ webviewer-core.min.js:188
ha @ webviewer-core.min.js:187
(anonymous) @ webviewer-core.min.js:285
(anonymous) @ webviewer-core.min.js:285
Promise.then (async)
(anonymous) @ webviewer-core.min.js:285
setTimeout (async)
ka.Y$ @ webviewer-core.min.js:284
ka.Dz @ webviewer-core.min.js:284
ka.UR @ webviewer-core.min.js:292
(anonymous) @ webviewer-core.min.js:291
h @ webviewer-core.min.js:189
(anonymous) @ webviewer-core.min.js:188
r @ webviewer-core.min.js:187
Promise.then (async)
ja @ webviewer-core.min.js:188
r @ webviewer-core.min.js:187
Promise.then (async)
ja @ webviewer-core.min.js:188
r @ webviewer-core.min.js:187
Promise.then (async)
ja @ webviewer-core.min.js:188
(anonymous) @ webviewer-core.min.js:188
ha @ webviewer-core.min.js:187
ka.Kv @ webviewer-core.min.js:290
loadDocument @ loadDocument.js:1
$p @ loadDocument.js:29
(anonymous) @ loadDocument.js:34
(anonymous) @ bundle.min.js:2
(anonymous) @ bundle.min.js:2
(anonymous) @ bundle.min.js:2
(anonymous) @ bundle.min.js:2
s @ bundle.min.js:2
(anonymous) @ bundle.min.js:2
(anonymous) @ bundle.min.js:2
(anonymous) @ bundle.min.js:2
(anonymous) @ bundle.min.js:2
(anonymous) @ bundle.min.js:2
(anonymous) @ bundle.min.js:2
s @ bundle.min.js:2
(anonymous) @ bundle.min.js:2
(anonymous) @ bundle.min.js:2
(anonymous) @ bundle.min.js:2
(anonymous) @ bundle.min.js:2
(anonymous) @ bundle.min.js:2
s @ bundle.min.js:2
(anonymous) @ bundle.min.js:2
(anonymous) @ bundle.min.js:2
(anonymous) @ bundle.min.js:2
Promise.then (async)
(anonymous) @ bundle.min.js:2
(anonymous) @ bundle.min.js:2
(anonymous) @ bundle.min.js:2
Ge @ bundle.min.js:2
Je @ bundle.min.js:2
(anonymous) @ bundle.min.js:2
Tr @ bundle.min.js:2
Nr @ bundle.min.js:2
(anonymous) @ bundle.min.js:2
Le @ bundle.min.js:2
(anonymous) @ bundle.min.js:2
Rr @ bundle.min.js:2
$t @ bundle.min.js:2
Qt @ bundle.min.js:2
t.unstable_runWithPriority @ bundle.min.js:2
Un @ bundle.min.js:2
Re @ bundle.min.js:2
Zt @ bundle.min.js:2
i.__trace__ @ bundle.min.js:2

Please describe your issue and provide steps to reproduce it:
1.) Open https://www.pdftron.com/webviewer/demo/
2.) Select file
Pre-Existing ONLINE Markups AC WITHOUT STAMP.pdf (1.5 MB)
3.) Check error in console

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

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:APIs:Forums:

Hello,

Thanks for providing the sample file!

I was able to reproduce and identify the issue. The issue is that you have an annotation with invalid custom data from the XFDF:

<trn-custom-data xmlns=“http://ns.adobe.com/xfdf/” bytes="{}}"/>

There is one more } than expected which causes the JSON to be misread. I am not sure how this file was generated but correcting that should resolve the issue.