Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

149
Vistas
is there a way to avoid the dom-to-image error 'HTMLCanvasElement': Tainted canvases may not be exported

I'm taking a screenshot of a Chart using https://cdnjs.com/libraries/dom-to-image and then sending it to my backend server. The whole process works fine locally but on deploying to AWS ec2 instance I'm getting an error Uncaught (in promise) DOMException: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported.

The specific line of my code raising this is

    domtoimage.toBlob(chartDom)
      .then(function (blob) {         //This causes the error
        loader.style.display = 'flex'
        let formData = new FormData();

Reading a round shows a solution like setting crossOrigin="anonymous" but I'm not sure where I should set this in this case.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda