Skip to content

Firefox: Share dialog image generation fails with html-to-image #2

Description

@mvyleteljr

Bug

PNG download and image copy fail in Firefox with the error:

Failed to generate image: TypeError: can't access property "trim", e is undefined

Location

  • frontend/src/components/Playground/ShareDialog.tsx - generateImage() function
  • frontend/src/components/LogShareDialog.tsx - generateImage() function

Both use html-to-image's toPng() which has known Firefox compatibility issues.

Likely causes

  1. CSS properties Firefox doesn't handle well during canvas conversion
  2. Fonts not being loaded/embedded properly
  3. Certain SVG or pseudo-elements in ShareableCard

Possible solutions

  • Debug which element/style causes the issue
  • Try html2canvas as an alternative
  • Add Firefox-specific fallback or error messaging
  • Investigate ShareableCard for problematic elements

Workaround

Users can take a screenshot manually in Firefox.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions