ProjectMirador / mirador-annotations

a Mirador 3 plugin that adds annotation creation tools to the user interface
https://mirador-annotations.netlify.app/
39 stars 38 forks source link

TypeError: e.annotationJson.resources is undefined #80

Open D-Groenewegen opened 1 year ago

D-Groenewegen commented 1 year ago

My use case

The problem

By and large, the setup seems to be working quite well: I can create annotations, edit the descriptions, download annotations to my computer, and refresh the page with annotations still intact. But every time I create a new annotation, there is an error in the console that worries me and makes me question if my setup is sound:

TypeError: e.annotationJson.resources is undefined

The variant with the log tells me that canvasid is retrieved correctly, although what's fetched at other times is just 'poke' (an API check I guess).

The other thing I noticed is that the window on the left shows a collection of all annotations from any canvas and does not change when changing canvases.

Cf. Netlify app

FWIW, It's probably unrelated but to compare behaviours, I had a look at the Netlify app (https://mirador-annotations.netlify.app/), which uses a different version of the Annotations plugin. The browser reveals the following error:

TypeError: c is undefined
    paperThing AnnotationDrawing.js:71
    render AnnotationDrawing.js:146
    React 8
    unstable_runWithPriority scheduler.production.min.js:18
    React 5