Menu

Post image 1
Post image 2
1 / 2
0

WebLLM Works in Dev But Fails on Vercel: The CSP Directive You're Missing

DEV Community·Michael Stelly·26 days ago
#QNug0znE
#webgpu#csp#vercel#wasm#worker#error
Reading 0:00
15s threshold

WebGPU was detected, the consent dialog appeared, the user granted consent, and the network tab showed a clean 200 OK on the WASM fetch. Then nothing. No console output, no progress events. The UI showed "Enhanced analysis unavailable. Try again." In npm run dev , against the same code on the same browser, everything worked. I almost spent an afternoon on the wrong theory. The reason I didn't is the reason for this post. When you're debugging, anomalies are easier to chase than absences. The 200 OK had a body of 0.3 KB, which is anomalous for a binary asset that should be a few megabytes. The console was silent, which is an absence. I led with the anomaly. That was the mistake. The Wrong Hypothesis The 0.3 KB number had a tidy explanation. A Git LFS pointer file is roughly 130 bytes plus HTTP overhead. raw.githubusercontent.com is well known for not serving LFS content from some repos: instead of redirecting to media.githubusercontent.com (which actually serves the binary), it returns the pointer text.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More