Skip to content
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

Open
1 task done
tripleramis opened this issue Apr 30, 2024 · 2 comments
Open
1 task done

Can't export pdf #1879

tripleramis opened this issue Apr 30, 2024 · 2 comments
Assignees
Labels
bug Something isn't working needs triage Issues that need to be triaged v4 Issues related to the latest version

Comments

@tripleramis
Copy link

Is there an existing issue for this?

  • Yes, I have searched the existing issues and none of them match my problem.

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

@tripleramis tripleramis added bug Something isn't working needs triage Issues that need to be triaged v4 Issues related to the latest version labels Apr 30, 2024
@HarveyLijh
Copy link

HarveyLijh commented May 5, 2024

Same error here; everything works fine on my local machine but having this error while deploying on a Ubuntu 22 server.
I went though all other similar issues and associated solutions but none works.
My compose.yml is below:

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:

@polycarbdiet
Copy link

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:
I was originally choosing a font from the "Font Family" list. After changing the font to one of the fonts that are presented as a button (for example, "Open Sans") the PDF was successfully generated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage Issues that need to be triaged v4 Issues related to the latest version
Projects
None yet
Development

No branches or pull requests

4 participants