Comments (6)
I believe I stumbled upon this before but I failed to create an issue, so thank you for doing that! As far as I remember, this is not an issue that was introduced with the MUI 5 or React 18 changes.
I can't reproduce the issue every time consistently; it seems to be caused by race conditions. In certain circumstances, the _items
in the OSD viewer object do only contain one item (or at least not one item for each Layer), while the CanvasWorld
uses all available image resources of the canvas to calculate the new index:
mirador/src/lib/CanvasWorld.js
Line 166 in 593e81b
mirador/src/lib/CanvasWorld.js
Line 186 in 593e81b
from mirador.
I think I have found two possible sources for race conditions. The first one has a lot more impact because it depends on network connections.
Image info responses that are added to viewer vs. number of image resources on the canvas according to the manifest
The props
that are provided to the OpenSeadragonViewer
component do only contain image infoResponses
that have already been successfully fetched.
mirador/src/containers/OpenSeadragonViewer.js
Lines 34 to 37 in 593e81b
On the other hand, the index
that is calculated for the OpenSedragonViewer
in CanvasWorld.getLayerMetadata()
mirador/src/lib/CanvasWorld.js
Lines 157 to 158 in 593e81b
uses the images resources as they are found in the manifest:
mirador/src/lib/MiradorCanvas.js
Lines 68 to 82 in 593e81b
I'm not sure what a quick fix would look like.
setTimeout() in OSD code
I believe there is another possible source for race conditions in how OSD itself handles the addition of tilesources to the world
object. While the viewer component waits for all Promises before it calls the function where the error manifests,
mirador/src/components/OpenSeadragonViewer.js
Lines 188 to 191 in 593e81b
OSD's world.addItem()
is called via setTimeout()
:
In this setTimeout()
, successCallback()
is either called directly or via waitUntilReady()
; successCallback
for getTileSourceImplementation()
in viewer.addTiledImage()
calls processReadyItems()
where world.addItem()
is called.
I'm not sure if the resolution of all promises is sufficient or if there might still be asynchronous code running to add those items.
Both issues seem neither easy to debug nor to resolve.
from mirador.
Hi @regisrob 👋 based on the findings @lutzhelm has shared above, it appears that the issue you identified has been present for some time, and deeply-seated at that, from before the mui5-react-18
branch was created.
I'm going to update the title of this issue, "Mirador fails to load Manifests with layers on mui5-react-18 branch," to remove the name of the branch specifically since it is not related to it, but also keep it open in the hope that progress can be made.
Apart from this, did you find any other bugs in the mui-react-18
branch?
from mirador.
👋 @enriquediaz thanks for that, and thanks @lutzhelm for the investigation on this bug (which I never noticed before with previous versions of Mirador 3). This one looks a bit tricky...
I did not find any other bugs in the mui-react-18
branch so far.
from mirador.
openseadragon/openseadragon#2457 seems to be related, but I'd assume that the cause is rather in Mirador than in OpenSeadragon.
from mirador.
That's my issue. It is caused by Mirador. I have had this error in the console for several years in Mirador 3. I previously thought it was an OSD issue (mistakenly).
from mirador.
Related Issues (20)
- Issue with loading multi-part AV on a single canvas for continuous playing HOT 1
- Window navigation controls sometimes overlaps canvas
- GET images using authorization token
- OSD v4.1.0 handling (impacts to M4, serverless) HOT 1
- Go directly to an image in a collection
- Error on choice in body of annotation
- Origin parameter should be parsed with query string library
- Window dropdown for plugins not keyboard navigable
- Redundant title read by screen reader
- New UI/UX report to review - UI/UX of Mirador in Mmmonk HOT 1
- Accessibility: indicate which thumbnail is selected, for screenreaders
- Mmmonk feedback: remove "__test__/integration" from demo URLs
- Mmmonk feedback: remove "-dev" from Netlify demo URL HOT 2
- Mmmonk feedback: Improve word choice for import/export flow
- WCAG Failure: Color contrast of thumbnail text on thumbnail is too low
- WCAG Failure: Selecting the Information, Copyrights, or Index Tabs screen reader focus is sent to the top of the page.
- WCAG Failure: The html language identifier is missing in the language option drop down menu
- WCAG Failure: When selecting the thumbnail or next page, focus does not move to the top of the new pages
- Tiled image loading when using AWS Origin Access Control (OAC) with Cloudfront HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mirador.