Jenkins: Uncaught NetworkError for 'worker.min.js' from Tesseract.js, but no explicit script...

Discussão em 'Angular' iniciado por Cam, Outubro 2, 2024.

  1. Cam

    Cam Guest

    I have a website that uses Tesseract.js for ID and Proof of Residence checks.

    I'm writing tests for an Angular website in Cypress, The tests work in my local environments but when I push the code to Jenkins to execute my cypress tests, I get the following error:

    (uncaught exception) Error: Uncaught NetworkError: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'https://cdn.jsdelivr.net/npm/tesseract.js@v5.1.1/dist/worker.min.js' failed to load.

    I can't see any workers in my network tab when running my web app locally or even even when running the tests through Cypress Studio.

    I don't know if the error is specific Tesseract.js being in the project but nothing I have done so far has worked.

    I haven't found a way to disable it for dev as It is needed for the production build. What should I do from here?

    So Far I have:

    1. Added the script Locally
    2. Added the script as a dev dependency

    I was hoping I could disable it for the dev build for when running the tests or if there was a way to have the script run locally

    Continue reading...

Compartilhe esta Página