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

ome-tiff examples failing with "Promise.allSettled is not a function" #68

Open
jkh1 opened this issue Aug 28, 2022 · 3 comments · May be fixed by #69
Open

ome-tiff examples failing with "Promise.allSettled is not a function" #68

jkh1 opened this issue Aug 28, 2022 · 3 comments · May be fixed by #69
Labels
bug Something isn't working

Comments

@jkh1
Copy link

jkh1 commented Aug 28, 2022

Describe the bug
The ome_tiff_remote.Rmd and ome_tiff_local.Rmd fail to load the image, the loading indicators in all panels keep spinning, except for the Status panel which reports "Promise.allSettled is not a function".

Not sure if related to #65 since in this case there seems to be an error message.

To Reproduce
Steps to reproduce the behavior:

  • Install vitessceR with devtools::install_github("vitessce/vitessceR")
  • Run ome_tiff_remote.Rmd or ome_tiff_local.Rmd (with path to suitable local image) in RStudio

Expected behavior
Widget should display the image

Environment:

  • Release or git hash: 5e76c31
  • Operating system: Ubuntu 20.04
  • R version: 4.2.1, all packages updated to the latest version available
  • RStudio version: 2022.07.1 Build 554
@jkh1 jkh1 added the bug Something isn't working label Aug 28, 2022
@jkh1 jkh1 changed the title ome-tiff examples failing: ome-tiff examples failing with "Promise.allSettled is not a function" Aug 28, 2022
@jkh1
Copy link
Author

jkh1 commented Aug 28, 2022

The web console shows the following error before the message "Promise.allSettled is not a function" (which seems to be a warning):
Failed to load resource: the server responded with a status of 404 (Not Found) and this is associated with lib/vitessceR-0.99.1/index.css

I can't find any file named index.css in the package installed by devtools::install_github("vitessce/vitessceR"). However, adding it makes the error message about it go away but still no image, only the spinners and no error message.

The warning "Promise.allSettled is not a function" comes from index.js line 1344 which seems to be implementing a shader so might be related to rendering of the image.

@keller-mark
Copy link
Member

This is because the rstudio viewer pane is using an old version of JavaScript. The promise.allsettled API is supported in every major web browser https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/allSettled#browser_compatibility I will try adding a polyfill for Promise.allSettled but if it does not work I can try adding a warning message in the console to explain when the viewer_pane query parameter is detected https://search.r-project.org/CRAN/refmans/rstudioapi/html/viewer.html In the meantime, you can try clicking the "Show in new window" button to run in a standalone web browser.

@jkh1
Copy link
Author

jkh1 commented Aug 29, 2022

you can try clicking the "Show in new window" button to run in a standalone web browser.

This is what I did and how I could get to the web console. In the meantime, running it as a shiny app also fails with no error message with a warning for the same line of index.js (1344) but with a different message: "GeoTIFF source is missing offsets proxy."

With the mention of offset, could this be related to this avivator issue hms-dbmi/viv#634 where it failed when it couldn't find an offset.json file?

@keller-mark keller-mark linked a pull request Aug 29, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants