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

321
Vistas
Error accessing "autoAllocateChunkSize" in PDFJS

i have a new problem after firefox 99 update. I have an extension that reads pdfs using PDFJS (version pdfjs-2.13.216). It always worked and after the last update it started to give: Error: Permission denied to access property "autoAllocateChunkSize" The same extension, with tiny changes, works in chrome normally. Below is the code:

function getAllTextPDF(urlPDF) {
    return new Promise(function (resolve , reject ) {
        var pdfjsLib = this['pdfjs-dist/build/pdf'];  //this because of firefox
        pdfjsLib.GlobalWorkerOptions.workerSrc = '//mozilla.github.io/pdf.js/build/pdf.worker.js';

        var loadingTask = pdfjsLib.getDocument(urlPDF);
        
        //** from that line it no longer enters and generates the mentioned error **
        loadingTask.promise.then(function(pdf) {
            var numPages = pdf._pdfInfo.numPages;
            var textoFinal = '';
            var pagesPromises = [];
          
            for (var i = 0; i < numPages; i++) {                
                (function (pageNumber) {
                    pagesPromises.push(getPageText(pageNumber, pdf));
                })(i + 1);
            }
                            
            Promise.all(pagesPromises).then(function (pagesText) {

                for (var i = 0; i < pagesText.length; i++) {
                    textoFinal += pagesText[i];
                }
                
                if(textoFinal.length > 0){
                    resolve({text: textoFinal});
                    
                    loadingTask.destroy();
                    delete pdfjsLib;
                    delete loadingTask;
                }                   
            });
        
        }, function (reason) {
            // PDF loading error
            reject({reason});
            return 0;
        });
        
    });          
}

example URL of file to read (worked normally):

blob:https://dominio.com/4db038e1-ae8d-4a15-a78f-0d9d0a182c7c

The idea of ​​the method is simple, go through the pdf file and return all the text. However now as mentioned the error is generated. Detail that did not generate the error in version 32bit firefox, I believe it started in the last update of firefox 99.

I appreciate your help.

about 4 years ago · Santiago Trujillo
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