Skip to content

(Bug) Canonical Error on Builds with BASE_URL #732

@aque

Description

@aque

Description

I get this error with Dockerfile.nonroot building version 2.8.5 and --build-arg "BASE_URL=/bentopdf/". SIMPLE_MODE is enabled but I get the same error with it disabled. I also tried adding SITE_URL but it did not make any difference. Version 2.8.4 builds fine.

[ snip ]

85.27   [canonical] ar/pdf-to-markdown.html: canonical "https://www.bentopdf.com/bentopdf/pdf-to-markdown" != expected "https://www.bentopdf.com/pdf-to-markdown"
85.27   [canonical] ar/pdf-to-pdfa.html: canonical "https://www.bentopdf.com/bentopdf/pdf-to-pdfa" != expected "https://www.bentopdf.com/pdf-to-pdfa"
85.27   [canonical] ar/pdf-to-png.html: canonical "https://www.bentopdf.com/bentopdf/pdf-to-png" != expected "https://www.bentopdf.com/pdf-to-png"
85.27   [canonical] ar/pdf-to-svg.html: canonical "https://www.bentopdf.com/bentopdf/pdf-to-svg" != expected "https://www.bentopdf.com/pdf-to-svg"
85.27   [canonical] ar/pdf-to-text.html: canonical "https://www.bentopdf.com/bentopdf/pdf-to-text" != expected "https://www.bentopdf.com/pdf-to-text"
85.27   [canonical] ar/pdf-to-tiff.html: canonical "https://www.bentopdf.com/bentopdf/pdf-to-tiff" != expected "https://www.bentopdf.com/pdf-to-tiff"
85.27   [canonical] ar/pdf-to-webp.html: canonical "https://www.bentopdf.com/bentopdf/pdf-to-webp" != expected "https://www.bentopdf.com/pdf-to-webp"
85.27   [canonical] ar/pdf-to-zip.html: canonical "https://www.bentopdf.com/bentopdf/pdf-to-zip" != expected "https://www.bentopdf.com/pdf-to-zip"
85.27   [canonical] ar/pdf-workflow.html: canonical "https://www.bentopdf.com/bentopdf/pdf-workflow" != expected "https://www.bentopdf.com/pdf-workflow"
85.27   [canonical] ar/png-to-pdf.html: canonical "https://www.bentopdf.com/bentopdf/png-to-pdf" != expected "https://www.bentopdf.com/png-to-pdf"
85.27   ... and 2499 more failures
------
Dockerfile.nonroot:64
--------------------
  63 |
  64 | >>> RUN --mount=type=secret,id=VITE_CORS_PROXY_URL,required=false \
  65 | >>>     --mount=type=secret,id=VITE_CORS_PROXY_SECRET,required=false \
  66 | >>>     VITE_CORS_PROXY_URL=$(cat /run/secrets/VITE_CORS_PROXY_URL 2>/dev/null || echo "") \
  67 | >>>     VITE_CORS_PROXY_SECRET=$(cat /run/secrets/VITE_CORS_PROXY_SECRET 2>/dev/null || echo "") \
  68 | >>>     npm run build:with-docs
  69 |
--------------------
ERROR: failed to build: failed to solve: process "/bin/sh -c VITE_CORS_PROXY_URL=$(cat /run/secrets/VITE_CORS_PROXY_URL 2>/dev/null || echo \"\")     VITE_CORS_PROXY_SECRET=$(cat /run/secrets/VITE_CORS_PROXY_SECRET 2>/dev/null || echo \"\")     npm run build:with-docs" did not complete successfully: exit code: 1

Steps to Reproduce

docker build --tag "local/bentopdf:2.8.5" \
    --build-arg "BASE_URL=/bentopdf/" \
    --build-arg "SIMPLE_MODE=true" \
    --file ./Dockerfile.nonroot \
    .                                                     

Console Logs

N/A

Sample PDF or File

N/A

Browser

Safari

Browser Version

26.5 (20624.2.5.18.3)

Operating System

Linux

BentoPDF Version

2.8.5

Additional Context

No response

Pre-submission Checklist

  • I have included console logs from the browser DevTools
  • I have attached a sample file or described how to reproduce the issue
  • I have searched existing issues to ensure this is not a duplicate

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions