Artifacts not loading #8583
-
What happened?I'm running LibreChat through Docker on my local machine, and it was functioning properly until recently when artifacts stopped working. I saw that there is a new tutorial for creating a static browser server for sandpack to work. But as I'm running this locally and did have (until recently) it running well, I wonder if there's something else I'm missing before adding the overhead from the tutorial. All I seem to get from the network tab is a cancelled request to codesandbox.io and the error message in the sandpack ui.
Version Informationlibrechat latest d22a4b3749e3 2 hours ago 2.34GB Steps to Reproduce
What browsers are you seeing the problem on?Chrome Relevant log outputRequest URL
https://2-19-8-sandpack.codesandbox.io/
Referrer Policy
strict-origin-when-cross-originScreenshots
Code of Conduct
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 8 replies
-
|
If running sandpack locally, you would also need to run: https://github.com/LibreChat-AI/codesandbox-client Both that repo and the tutorial you shared are for learning/dev purposes. Ideally you would have your own HTTPS API acting as a CDN for the static files serving for both templates |
Beta Was this translation helpful? Give feedback.
-
|
@bubbaspaarx |
Beta Was this translation helpful? Give feedback.
-
|
Experiencing similar problem, possible to share config? |
Beta Was this translation helpful? Give feedback.
-
|
I finally got it working in localhost. The key point is that both the API and the sandpack must be served though HTTPS. Fortunately caddy makes serving HTTPS locally pretty easy. My setup is as follows:
services:
api:
ports: []
volumes:
- type: bind
source: ./librechat.yaml
target: /app/librechat.yaml
sandpack:
image: ghcr.io/librechat-ai/codesandbox-client/bundler:latest
container_name: sandpack-bundler
restart: always
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:80/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
caddy:
image: caddy:latest
container_name: caddy-proxy
restart: always
ports:
- "13080:3080"
- "8080:8080"
volumes:
- caddy_data:/data
configs:
- source: caddyfile
target: /etc/caddy/Caddyfile
depends_on:
- api
- sandpack
configs:
caddyfile:
content: |
{
local_certs
}
https://:3080 {
tls internal {
on_demand
}
reverse_proxy api:${PORT}
}
https://:8080 {
tls internal {
on_demand
}
reverse_proxy sandpack:80
}
volumes:
caddy_data:
|
Beta Was this translation helpful? Give feedback.


Thank you Danny,
I set this all up and got the same issues. After several hours of debugging I opened it in safari and all was fine. I had a chrome specific issue which was blocking the calls. Refreshed cache and all started working again.