Skip to content

Self-Signed Certificate #15

@SpacePurr

Description

@SpacePurr

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']
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions