-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't export pdf #1879
Comments
Same error here; everything works fine on my local machine but having this error while deploying on a Ubuntu 22 server. version: "3.8"
# In this Docker Compose example, it assumes that you maintain a reverse proxy externally (or chose not to).
# The only two exposed ports here are from minio (:9000) and the app itself (:3000).
# If these ports are changed, ensure that the env vars passed to the app are also changed accordingly.
services:
# Database (Postgres)
# postgres:
# image: postgres:15-alpine
# restart: unless-stopped
# volumes:
# - postgres_data:/var/lib/postgresql/data
# environment:
# POSTGRES_DB: postgres
# POSTGRES_USER: postgres
# POSTGRES_PASSWORD: postgres
# healthcheck:
# test: ["CMD-SHELL", "pg_isready -U postgres -d postgres"]
# interval: 10s
# timeout: 5s
# retries: 5
# Storage (for image uploads)
minio:
image: minio/minio
restart: unless-stopped
command: server /data
ports:
- 9000:9000
volumes:
- minio_data:/data
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
# Chrome Browser (for printing and previews)
chrome:
image: ghcr.io/browserless/chromium:latest
restart: unless-stopped
extra_hosts:
- host.docker.internal:host-gateway
environment:
TIMEOUT: 10000
CONCURRENT: 10
TOKEN: chrome_token
EXIT_ON_HEALTH_FAILURE: true
PRE_REQUEST_HEALTH_CHECK: true
# Redis (for cache & server session management)
redis:
image: redis:alpine
restart: unless-stopped
command: redis-server --requirepass password
app:
build: ./
restart: unless-stopped
ports:
- 3000:3000
depends_on:
- minio
- redis
- chrome
environment:
# -- Environment Variables --
PORT: 3000
NODE_ENV: production
# -- URLs --
PUBLIC_URL: http://localhost:3000
STORAGE_URL: http://localhost:9000/default
# -- Printer (Chrome) --
CHROME_TOKEN: chrome_token
CHROME_URL: ws://chrome:3000
# -- Database (Mysql) --
DATABASE_URL: ${DATABASE_URL}
# -- Auth --
ACCESS_TOKEN_SECRET: access_token_secret
REFRESH_TOKEN_SECRET: refresh_token_secret
# -- Emails --
MAIL_FROM: noreply@localhost
# SMTP_URL: smtp://user:pass@smtp:587 # Optional
# -- Storage (Minio) --
STORAGE_ENDPOINT: minio
STORAGE_PORT: 9000
STORAGE_REGION: us-east-1 # Optional
STORAGE_BUCKET: default
STORAGE_ACCESS_KEY: minioadmin
STORAGE_SECRET_KEY: minioadmin
STORAGE_USE_SSL: false
# -- Cache (Redis) --
REDIS_URL: redis://default:password@redis:6379
# -- Sentry --
# VITE_SENTRY_DSN: https://id.sentry.io # Optional
# -- Crowdin (Optional) --
# CROWDIN_PROJECT_ID:
# CROWDIN_PERSONAL_TOKEN:
# -- Email (Optional) --
# DISABLE_EMAIL_AUTH: true
# VITE_DISABLE_SIGNUPS: true
# -- GitHub (Optional) --
GITHUB_CLIENT_ID: github_client_id
GITHUB_CLIENT_SECRET: github_client_secret
GITHUB_CALLBACK_URL: http://localhost:3000/api/auth/github/callback
# -- Google (Optional) --
GOOGLE_CLIENT_ID: google_client_id
GOOGLE_CLIENT_SECRET: google_client_secret
GOOGLE_CALLBACK_URL: http://localhost:3000/api/auth/google/callback
volumes:
minio_data: |
I was having a similar PDF exporting issue. Cloud user on Chrome and Edge. The issue persisted as well when trying to download a PDF using the public link. Work around: |
When generating PDFs, headless Chrome needs to download and import fonts from the internet. If the network environment is poor and loading times out, it can cause the PDF export to fail. I think it might be better to store the font files as static files in MinIO or on a server. |
This resolved the issue I had as well, by implementing the change to add |
Is there an existing issue for this?
Product Variant
Cloud (http://rxresu.me)
Current Behavior
The pdf export returns a 404 error
Expected Behavior
Pdf should be downloaded
Steps To Reproduce
No response
What browsers are you seeing the problem on?
Firefox, Microsoft Edge
What template are you using?
None
Anything else?
No response
The text was updated successfully, but these errors were encountered: