Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Self-Signed Certificate #15

Open
SpacePurr opened this issue Apr 12, 2024 · 0 comments
Open

Self-Signed Certificate #15

SpacePurr opened this issue Apr 12, 2024 · 0 comments

Comments

@SpacePurr
Copy link

Hi all.

Please tell me how puppeteer.js can solve the problem with a self-signed certificate for the address that points to DRAWIO_BASE_URL.

image-export:
        build:
           dockerfile: Dockerfile
           context: ./export        
        expose:
            - "8000"
        networks:
         - drawionet
        restart: always
        environment: 
          - WORKER_POOL_SIZE=1
          - DRAWIO_BASE_URL=https://local.space.d.net

ca-cartificate-update only solves the problem for curl.

warn: Handled exception: net::ERR_CERT_AUTHORITY_INVALID at https://local.space.d.net/export3.html req=ip=::ffff:172.25.0.3 format=pdf w=0 h=0 bg=%23ffffff {"stack":"Error: net::ERR_CERT_AUTHORITY_INVALID at https://local.space.d.net/export3.html\n at navigate (/home/pptruser/draw-image-export2/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Frame.js:171:27)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async Deferred.race (/home/pptruser/draw-image-export2/node_modules/puppeteer-core/lib/cjs/puppeteer/util/Deferred.js:36:20)\n at async CdpFrame.goto (/home/pptruser/draw-image-export2/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Frame.js:137:25)\n at async CdpPage.goto (/home/pptruser/draw-image-export2/node_modules/puppeteer-core/lib/cjs/puppeteer/api/Page.js:590:20)\n at async renderPage (/home/pptruser/draw-image-export2/export.js:569:8)\n at async handleRequest (/home/pptruser/draw-image-export2/export.js:711:20)"}

I found a solution by putting the '--ignore-certificate-errors' flag in puppeteer.launch, but I'm not completely satisfied with it

browser = await puppeteer.launch({
	headless: 'new',
	args: ['--disable-gpu', '--no-sandbox', '--disable-setuid-sandbox', '--disable-dev-shm-usage', '--ignore-certificate-errors']
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant