silx-kit / h5web

React components for data visualization and exploration
https://h5web.panosc.eu/
MIT License
189 stars 19 forks source link

Demo website failing #1247

Closed bmaranville closed 2 years ago

bmaranville commented 2 years ago

Describe the bug

Trying to load the grove demo results in a JS error

To Reproduce

  1. Go to https://h5web.panosc.eu/h5grove?file=grove.h5
  2. See error:
    index.cfc7ac8d.js:32 Error: Expected environment variable VITE_H5GROVE_URL to not be empty
    at Ks (index.cfc7ac8d.js:104:13558)
    at $lA (index.cfc7ac8d.js:3430:166)
    at QU (index.cfc7ac8d.js:30:52990)
    at R2 (index.cfc7ac8d.js:34:8819)
    at u2 (index.cfc7ac8d.js:34:951)
    at i3 (index.cfc7ac8d.js:34:879)
    at Wc (index.cfc7ac8d.js:34:732)
    at hR (index.cfc7ac8d.js:32:10912)
    at rn (index.cfc7ac8d.js:32:8441)
    at Sl (index.cfc7ac8d.js:34:15913)
    eR @ index.cfc7ac8d.js:32
    index.cfc7ac8d.js:104 Uncaught Error: Expected environment variable VITE_H5GROVE_URL to not be empty
    at Ks (index.cfc7ac8d.js:104:13558)
    at $lA (index.cfc7ac8d.js:3430:166)
    at QU (index.cfc7ac8d.js:30:52990)
    at R2 (index.cfc7ac8d.js:34:8819)
    at u2 (index.cfc7ac8d.js:34:951)
    at i3 (index.cfc7ac8d.js:34:879)
    at Wc (index.cfc7ac8d.js:34:732)
    at hR (index.cfc7ac8d.js:32:10912)
    at rn (index.cfc7ac8d.js:32:8441)
    at Sl (index.cfc7ac8d.js:34:15913)

Expected behaviour

Demo loads and shows file

Screenshots

image

Context

loichuder commented 2 years ago

Oh dear. @axelboc I think this is due to https://github.com/silx-kit/h5web/pull/1239. It also broke the HSDS demo.

Thanks for the heads-up @bmaranville

axelboc commented 2 years ago

Hmm weird, but I don't think it is. It was working fine; I remember using the production demo yesterday. I've checked on Netlify and the env vars are set properly. It looks like it's an issue with the Vite upgrade from this morning's PR #1245. Maybe try downgrading for now?

loichuder commented 2 years ago

Yup, downgrading Vite to 3.1.3 did the trick. The demo is back online

axelboc commented 2 years ago

They've just fixed it: https://github.com/vitejs/vite/pull/10684. Just waiting for the next release now.

axelboc commented 2 years ago

They've released the patch, so I've upgraded to it.

Those new env var assertions are proving themselves quite useful already 😆