Closed nojaf closed 1 year ago
This looks to be a serious issue with esm.sh in general. Most of the libraries I am using are scrambled in the same way including back to version v89 (the oldest I use) through the latest. I thought the whole point of esm.sh was that any updates DO NOT affect older versions already in the CDN
example; https://esm.sh/v89/lodash@4.17.21
output
!�� W����s�O�
6�D,����e���9^�KĐ�=_+ЍY�V��e�+2
Qȯi\6�p|4Q�m��bk��e������(��Y�+��F~�
Additional note:
We reference the url's in the browser
yeah, i'm getting this too when fetching preact. seems to happen basically at random
sorry, a mistake i made broken the cache key of CF R2, i am going to revert the commit
the server is back to normal, @smcardle @nojaf @thatcher-gaming can you please try again
all good now :)
Thanks for the quick fix @ije Unfortunately it's still not fixed for me requesting this URL: https://esm.sh/react@18.2.0
same problems with these packages : https://esm.sh/@dagger.io/dagger@0.6.3 https://esm.sh/express@4.18.2 https://esm.sh/yaml@2.3.1
update: it appears to be broken again
This affects loads of the libraries for instance
I literary have dozens of libraries affected
still returns scrambled data
updated, can you please try again?
Every request for an esm.sh library from my code is now resulting in a 502
Seems to be working for me now, although required a force refresh. Thank you for your quick response 🙏
Definitely still NOT working for instance.... https://esm.sh/v89/preact@10.10.0
This is just one of about 50 libraries I use and in the first request NONE of the initial 6 libraries required from esm.sh are working
esm.sh/v89/preact@10.10.0/compat esm.sh/v89/preact@10.10.0 esm.sh/v89/htm@3.1.1 esm.sh/v89/uuid@8.3.2 esm.sh/v89/rxjs@7.5.6/webSocket?external=rxjs esm.sh/v89/rxjs@7.5.6/operators?external=rxjs
Definitely still NOT working
did you try to purge your browser/deno cache? seem it works for me now
OK. It is now working....
I have no reason to purge the cache as I run in dev tools mode with cache disabled
Anyway thanks for fixing and a bit of re-assurance this will not happen again would be good.
A discord server or something to report these types of issues and get a "conversation" going would be useful in the future. This kind of issue is a critical issue to some of us and knowing some of the devs are watching / online would be great.
Anyway, esm.sh is my favourite CDN but an explanation of what caused the issue so I can go back to my boss with a "why it happened" scenario would be great.
Also, why would this have affected older version i.e. v89 that were already available and cached ? I thought the whole point of the versioning is that older versions we depend on never get regenerated
Let me explain a bit what happened.
In latest update, I updated the stable build version from v118 to latest(v112) to fix some invalid source map (#668) for react.
The testing was passed in github CI env, but i made a mistake to use a different KV that is used to store esm.sh modules at edge. since the new KV is empty the worker need to fetch the module from origin server, but I have no idea why CF worker's fetch
get garbage content from the esm.sh origin server with correct headers. This doesn't happen in local/CI env.
To fix this, i have to added an isValidUTF8
function to check the content from origin server.
A discord server or something to report these types of issues and get a "conversation" going would be useful in the future. This kind of issue is a critical issue to some of us and knowing some of the devs are watching / online would be great.
Discord server: https://discord.gg/XDbjMeb7pb Status page: https://esm.instatus.com
Also, why would this have affected older version i.e. v89 that were already available and cached ? I thought the whole point of the versioning is that older versions we depend on never get regenerated
I agree, this is why the version exists. The issue was caused by the cache layer not the build server, i didn't handle it careflully. I should change the KV config seriously in feature updates!
Not sure if I'm also seeing a downstream effect due to these changes, but I'm now seeing Invalid Body
for some packages in addition to 502 responses.
For one of my transitive dependencies (e.g. he) there's no longer any valid output (i.e. https://esm.sh/he@1.2.0)
The problem is still ongoing for me in Europe. Getting 502's as well. It might be a caching problem at this point.
As a local workaround, I spun up a Docker container
docker run -p 9004:8080 -d --name esm ghcr.io/esm-dev/esm.sh:latest
http://localhost:9004/firebase@9.23.0/app
works like a charm.
Works again for me:
Thanks to everyone involved!
Failing module
Error message
After
onload
I got this:Additional info
128
I think (X-Esm-Deps: https://esm.sh/v128/@firebase/app@0.9.13/es2022/app.mjs
)This was working yesterday for me.