OiO.lk Blog pdf Symbol Lookup Error When Launching Chromium with Puppeteer on Ubuntu Server
pdf

Symbol Lookup Error When Launching Chromium with Puppeteer on Ubuntu Server


I’m encountering an issue while trying to generate PDFs using Puppeteer on my Ubuntu server. The code seems to be executing without problems, but I keep running into a symbol lookup error when attempting to launch the Chromium browser.

Here’s the relevant error message I’m receiving:

Error: Failed to launch the browser process!
/root/.cache/puppeteer/chrome/linux-130.0.6723.58/chrome-linux64/chrome: symbol lookup error: /root/.cache/puppeteer/chrome/linux-130.0.6723.58/chrome-linux64/chrome: undefined symbol: snd_device_name_get_hint

This is the code for browser init

 browser = await puppeteer.launch({
      headless: true,
      args: [
        '--disable-gpu',
        '--disable-features=IsolateOrigins',
        '--disable-site-isolation-trials',
        '--autoplay-policy=user-gesture-required',
        '--disable-background-networking',
        '--disable-background-timer-throttling',
        '--disable-backgrounding-occluded-windows',
        '--disable-breakpad',
        '--disable-client-side-phishing-detection',
        '--disable-component-update',
        '--disable-default-apps',
        '--disable-dev-shm-usage',
        '--disable-domain-reliability',
        '--disable-features=AudioServiceOutOfProcess',
        '--disable-hang-monitor',
        '--disable-ipc-flooding-protection',
        '--disable-notifications',
        '--disable-offer-store-unmasked-wallet-cards',
        '--disable-popup-blocking',
        '--disable-print-preview',
        '--disable-prompt-on-repost',
        '--disable-renderer-backgrounding',
        '--disable-setuid-sandbox',
        '--disable-speech-api',
        '--disable-sync',
        '--hide-scrollbars',
        '--ignore-gpu-blacklist',
        '--metrics-recording-only',
        '--mute-audio',
        '--no-default-browser-check',
        '--no-first-run',
        '--no-pings',
        '--no-sandbox',
        '--no-zygote',
        '--password-store=basic',
        '--use-gl=swiftshader',
        '--use-mock-keychain',
      ],
      ignoreDefaultArgs: ['--disable-extensions'],
      userDataDir: './tmp',
    });
  1. Cleared the Puppeteer cache (/root/.cache/puppeteer).
  2. Reinstalled Puppeteer.
  3. Ensured that all necessary libraries for Chromium are installed (e.g., libatk1.0-0, libasound2, etc.).
  4. Checked for conflicting library versions and installed the correct version of libasound2.
  5. Updated the system packages and rebooted the server.

Despite these efforts, the issue persists. I’m looking for insights or solutions from the community. Has anyone encountered a similar problem or can you suggest any additional steps I might take to resolve this?

Thank you in advance for your help!



You need to sign in to view this answers

Exit mobile version