Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught (in promise) Error: Index bigger than number of layers. #25

Open
BeebBenjamin opened this issue Nov 1, 2022 · 8 comments
Open
Assignees
Labels
priority: low Issue can be fixed after higher priority issues status: waiting to be addressed Fixing this issue hasn't started yet status: won't fix Issue will not be taken further type: bug Something isn't working

Comments

@BeebBenjamin
Copy link
Contributor

There is a bug somewhere that causes this to appear in the dev console in a browser:

Uncaught (in promise) Error: Index bigger than number of layers.

@BeebBenjamin BeebBenjamin added type: bug Something isn't working priority: low Issue can be fixed after higher priority issues labels Nov 1, 2022
@BeebBenjamin BeebBenjamin self-assigned this Nov 1, 2022
@BeebBenjamin BeebBenjamin added the status: waiting to be addressed Fixing this issue hasn't started yet label Nov 1, 2022
@BeebBenjamin
Copy link
Contributor Author

This is actually a bug in OpenSeaDragon: openseadragon/openseadragon#1843

@BeebBenjamin
Copy link
Contributor Author

BeebBenjamin commented Nov 2, 2022

To fix this, Mirador would have to update OpenSeaDragon to version 3.0.0, I think. Currently Mirador uses version 2.4.2.

@BeebBenjamin BeebBenjamin added the status: blocked Fixing this issue is blocked by something label Nov 2, 2022
@BeebBenjamin BeebBenjamin added status: won't fix Issue will not be taken further and removed status: won't fix Issue will not be taken further status: blocked Fixing this issue is blocked by something labels Nov 11, 2022
@BeebBenjamin
Copy link
Contributor Author

This requires a PR and update to Mirador, so this is won't fix for now.

@BeebBenjamin
Copy link
Contributor Author

Tested the newest version of OSD (4.0.1) locally and this does not resolve the issue.

@BeebBenjamin
Copy link
Contributor Author

BeebBenjamin commented Jan 19, 2024

I have found out the real reason overriding does nothing. It is because Mirador uses both the minified version of OSD and the package version of OSD. Overriding merely patches one part, so therefore some functions are unavailable. If I override the OSD package in the build, I can use the function by customising the code locally and injecting values into osdConfig. However trying to access the viewer in Mirador always points to the minified version, which is locked to version 2.x of OSD. Even then, Ian at OSD suggests that the function is only available by having access to the namespace of OSD in Mirador i.e. OpenSeadragon, which I do not even know is possible.

@BeebBenjamin
Copy link
Contributor Author

I was premature. Updating the minified version does nothing for this...

@BeebBenjamin
Copy link
Contributor Author

BeebBenjamin commented Apr 16, 2024

I can see clearly how this is happening. The number of layers in state at the beginning of rendering is 3, but the index property either doesn't exist or is higher than the number of layers. Eventually all the layers do get defined in state, but only when layers have been put onto state by something else. To me this indicates a bug in Mirador.

@BeebBenjamin
Copy link
Contributor Author

To fix this, maybe we add a saga that listens to the initiation of Mirador, and we put in the layers ourselves...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: low Issue can be fixed after higher priority issues status: waiting to be addressed Fixing this issue hasn't started yet status: won't fix Issue will not be taken further type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant