nchrome_crashpad_handler: --database is required



  • Hello Guys,

    Please help to identify how to fix the following error:

    {"id":"oitn9evv0t544l1","level":"error","message":"Error when processing render request 2\n(because) failed to launch the browser process!\nchrome_crashpad_handler: --database is required\nTry 'chrome_crashpad_handler --help' for more information.\n\n\nTROUBLESHOOTING: https://pptr.dev/troubleshooting\n\nError: Failed to launch the browser process!\nchrome_crashpad_handler: --database is required\nTry 'chrome_crashpad_handler --help' for more information.\n\n\nTROUBLESHOOTING: https://pptr.dev/troubleshooting\n\n at Interface.onClose (/app/node_modules/@puppeteer/browsers/lib/cjs/launch.js:310:24)\n at Interface.emit (node:events:529:35)\n at Interface.close (node:internal/readline/interface:534:10)\n at Socket.onend (node:internal/readline/interface:260:10)\n at Socket.emit (node:events:529:35)\n at endReadableNT (node:internal/streams/readable:1400:12)\n at process.processTicksAndRejections (node:internal/process/task_queues:82:21)","rootId":"oitn9evv0t544l1","timestamp":1729074685584}

    Are there any configurations missed?



  • jsreport docker version: 4.6.0-full

    Example of config file:

      jsreport.config.json: |
        {
            "httpPort": 5488,
            "store": {
                "provider": "postgres"
            },
            "logger": {
                "console": {
                    "transport": "console",
                    "level": "{{ .Values.deployment.jsreport.logger.console | default "debug" }}"
                },
                "file": {
                    "transport": "file",
                    "level": "{{ .Values.deployment.jsreport.logger.file | default "debug" }}",
                    "filename": "logs/log.txt",
                    "silent": true
                },
                "error": {
                    "transport": "console",
                    "level": "error",
                    "filename": "logs/error.txt",
                    "silent": true
                }
            },
            "trustUserCode": true,
            "reportTimeout": {{ .Values.deployment.jsreport.reportTimeout }},
            "workers": {
                "numberOfWorkers": {{ .Values.deployment.jsreport.workers.numberOfWorkers }}
            },
            "templatingEngines": {
                "timeout": 1200000
            },
            "chrome": {
                "timeout": 1200000,
                "launchOptions": {
                    "args": ["--no-sandbox"]
                }
            },
            "extensions": {
                "scripts": {
                    "timeout": 1200000
                },
                "postgres-store": {
                    "host": "{{ .Values.deployment.jsreport.extensions.postgresStore.host }}",
                    "port": {{ .Values.deployment.jsreport.extensions.postgresStore.port }},
                    "database": "{{ .Values.deployment.jsreport.extensions.postgresStore.database }}",
                    "user": "{{ .Values.deployment.jsreport.extensions.postgresStore.username }}",
                    "password": "{{ .Values.deployment.jsreport.extensions.postgresStore.password }}",
                    "ssl": {
                        "rejectUnauthorized": false,
                        "ca": "/app/global-bundle.pem"
                    }
                }
            }
        }
    


  • I've tried the jsreport/jsreport:4.6.0-full image on Windows docker desktop and it renders the chrome-pdf recipe without issues. I've also tried to run the image on a brand new Ubuntu server with docker, and it also works.

    Does the render fail for you every time, also on a simple "hello world" template? Do you apply anything specific on your server and when running docker?

    The error pops up when running with--read-only flag. Isn't this the case? To fix it you need to add additional envs like in this command.

    ENV XDG_CONFIG_HOME=/tmp/.chromium
    ENV XDG_CACHE_HOME=/tmp/.chromium
    

    This command should work for testing

    docker run -p 5488:5488 --read-only --tmpfs=/tmp -e store_provider=memory -e blobStorage_provider=memory -e logger_file_filename=/tmp/reporter.log -e logger_error_filename=/tmp/error.log -e XDG_CONFIG_HOME=/tmp/.chromium -e XDG_CACHE_HOME=/tmp/.chromium jsreport/jsreport:4.6.0
    


  • Hello,

    Added 2 params as an environment variables for Kubernetes and our issue is fixed:

                - name: XDG_CONFIG_HOME
                  value: "/tmp/.chromium"
                - name: XDG_CACHE_HOME
                  value: "/tmp/.chromium"
    

    Thanks


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.