vitessce / vitessceR

R API and htmlwidget for Vitessce
https://r-docs.vitessce.io
Other
38 stars 9 forks source link

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

Open jkh1 opened 2 years ago

jkh1 commented 2 years ago

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:

Expected behavior Widget should display the image

Environment:

jkh1 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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?