Error after installing puppeteer-core. libuuid.so.1

After installing puppeteer core and deploying my application, my app crashed with this error:
Error: libuuid.so.1: cannot open shared object file: No such file or directory
at Object.Module._extensions..node (node:internal/modules/cjs/loader:1239:18)
at Module.load (node:internal/modules/cjs/loader:1033:32)
at Function.Module._load (node:internal/modules/cjs/loader:868:12)
at Module.require (node:internal/modules/cjs/loader:1057:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (/app/node_modules/canvas/lib/bindings.js:3:18)
at Module._compile (node:internal/modules/cjs/loader:1155:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
at Module.load (node:internal/modules/cjs/loader:1033:32)
at Function.Module._load (node:internal/modules/cjs/loader:868:12)
at Module.require (node:internal/modules/cjs/loader:1057:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (/app/node_modules/canvas/lib/canvas.js:9:18)
at Module._compile (node:internal/modules/cjs/loader:1155:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
at Module.load (node:internal/modules/cjs/loader:1033:32)
at Function.Module._load (node:internal/modules/cjs/loader:868:12)
at Module.require (node:internal/modules/cjs/loader:1057:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (/app/node_modules/canvas/index.js:1:16)
at Module._compile (node:internal/modules/cjs/loader:1155:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10) {
code: 'ERR_DLOPEN_FAILED'
}
Error: libuuid.so.1: cannot open shared object file: No such file or directory
at Object.Module._extensions..node (node:internal/modules/cjs/loader:1239:18)
at Module.load (node:internal/modules/cjs/loader:1033:32)
at Function.Module._load (node:internal/modules/cjs/loader:868:12)
at Module.require (node:internal/modules/cjs/loader:1057:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (/app/node_modules/canvas/lib/bindings.js:3:18)
at Module._compile (node:internal/modules/cjs/loader:1155:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
at Module.load (node:internal/modules/cjs/loader:1033:32)
at Function.Module._load (node:internal/modules/cjs/loader:868:12)
at Module.require (node:internal/modules/cjs/loader:1057:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (/app/node_modules/canvas/lib/canvas.js:9:18)
at Module._compile (node:internal/modules/cjs/loader:1155:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
at Module.load (node:internal/modules/cjs/loader:1033:32)
at Function.Module._load (node:internal/modules/cjs/loader:868:12)
at Module.require (node:internal/modules/cjs/loader:1057:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (/app/node_modules/canvas/index.js:1:16)
at Module._compile (node:internal/modules/cjs/loader:1155:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10) {
code: 'ERR_DLOPEN_FAILED'
}
This issue appeared after I installed puppeteer-core. I've read all similar issues on discord and github looking for a solution, but I found nothing.
22 Replies
Percy
Percy2y ago
Project ID: 045e21af-ff58-4d2c-a95a-4147dea211c9
WilsonSquared
WilsonSquared2y ago
045e21af-ff58-4d2c-a95a-4147dea211c9 My package.json
{
"name": "@senja/curator",
"version": "1.0.0",
"description": "Curator for Senja",
"main": "dist/index.js",
"private": true,
"scripts": {
"start": "node ./dist/index.js",
"start:watch": "nodemon ./dist/index.js",
"build": "node esbuild.config.js",
"build:watch": "yarn build --watch",
"dev": "NODE_ENV=development run-p start:watch build:watch"
},
"author": "Wilson Wilson",
"license": "ISC",
"dependencies": {
"@senja/shared": "1.0.0",
"@types/cors": "^2.8.12",
"@urql/core": "^2.3.6",
"any-date-parser": "^1.5.3",
"aws-sdk": "^2.1295.0",
"axios": "^0.27.2",
"body-parser": "^1.20.0",
"cheerio": "^1.0.0-rc.11",
"chrono-node": "^2.5.0",
"cors": "^2.8.5",
"cross-fetch": "^3.1.4",
"date-fns": "^2.28.0",
"dotenv": "^11.0.0",
"express": "^4.17.2",
"firebase-admin": "^10.0.1",
"fs": "^0.0.1-security",
"graphql": "^16.5.0",
"https": "^1.0.0",
"https-proxy-agent": "^5.0.1",
"jsdom": "^20.0.2",
"mime": "^3.0.0",
"nanoid": "^3.0.0",
"node-fetch": "^3.3.0",
"outscraper": "^2.0.0",
"promise-retry": "^2.0.1",
"puppeteer-core": "^19.7.5",
"request": "^2.88.2",
"request-promise": "^4.2.6",
"scrapingbee": "^1.6.1",
"twitter-api-v2": "^1.12.2",
"uuid": "^8.3.2"
},
"devDependencies": {
"@chialab/esbuild-plugin-require-resolve": "^0.17.1",
"@firebase/app-types": "^0.9.0",
"@sveltejs/kit": "1.0.0-next.581",
"@types/body-parser": "^1.19.2",
"@types/express": "^4.17.13",
"@types/jsdom": "^20.0.0",
"@types/mime": "^3.0.1",
"@types/promise-retry": "^1.1.3",
"@types/request-promise": "^4.1.48",
"@types/uuid": "^8.3.4",
"@types/ws": "^8.5.3",
"module-alias": "^2.2.2",
"nodemon": "^2.0.15",
"ts-node": "^10.5.0",
"tslint": "^6.1.3",
"typescript": "^4.5.4"
},
"peerDependencies": {
"@firebase/app-types": "^0.7.0"
}
}
{
"name": "@senja/curator",
"version": "1.0.0",
"description": "Curator for Senja",
"main": "dist/index.js",
"private": true,
"scripts": {
"start": "node ./dist/index.js",
"start:watch": "nodemon ./dist/index.js",
"build": "node esbuild.config.js",
"build:watch": "yarn build --watch",
"dev": "NODE_ENV=development run-p start:watch build:watch"
},
"author": "Wilson Wilson",
"license": "ISC",
"dependencies": {
"@senja/shared": "1.0.0",
"@types/cors": "^2.8.12",
"@urql/core": "^2.3.6",
"any-date-parser": "^1.5.3",
"aws-sdk": "^2.1295.0",
"axios": "^0.27.2",
"body-parser": "^1.20.0",
"cheerio": "^1.0.0-rc.11",
"chrono-node": "^2.5.0",
"cors": "^2.8.5",
"cross-fetch": "^3.1.4",
"date-fns": "^2.28.0",
"dotenv": "^11.0.0",
"express": "^4.17.2",
"firebase-admin": "^10.0.1",
"fs": "^0.0.1-security",
"graphql": "^16.5.0",
"https": "^1.0.0",
"https-proxy-agent": "^5.0.1",
"jsdom": "^20.0.2",
"mime": "^3.0.0",
"nanoid": "^3.0.0",
"node-fetch": "^3.3.0",
"outscraper": "^2.0.0",
"promise-retry": "^2.0.1",
"puppeteer-core": "^19.7.5",
"request": "^2.88.2",
"request-promise": "^4.2.6",
"scrapingbee": "^1.6.1",
"twitter-api-v2": "^1.12.2",
"uuid": "^8.3.2"
},
"devDependencies": {
"@chialab/esbuild-plugin-require-resolve": "^0.17.1",
"@firebase/app-types": "^0.9.0",
"@sveltejs/kit": "1.0.0-next.581",
"@types/body-parser": "^1.19.2",
"@types/express": "^4.17.13",
"@types/jsdom": "^20.0.0",
"@types/mime": "^3.0.1",
"@types/promise-retry": "^1.1.3",
"@types/request-promise": "^4.1.48",
"@types/uuid": "^8.3.4",
"@types/ws": "^8.5.3",
"module-alias": "^2.2.2",
"nodemon": "^2.0.15",
"ts-node": "^10.5.0",
"tslint": "^6.1.3",
"typescript": "^4.5.4"
},
"peerDependencies": {
"@firebase/app-types": "^0.7.0"
}
}
Brody
Brody2y ago
puppeteer-core does not install chrome
WilsonSquared
WilsonSquared2y ago
I know that. I'm using a headless browser instead. That doesn't explain why I'm getting this error though
Brody
Brody2y ago
add this to a nixpacks.toml file in your project folder
[phases.setup]
aptPkgs = ['...', 'libuuid1']
[phases.setup]
aptPkgs = ['...', 'libuuid1']
WilsonSquared
WilsonSquared2y ago
I added this line to my env NIXPACKS_APT_PKGS=...,libuuid1 But the issue still persists I removed the comma in my variable, and now it's giving a different error
$ yarn curator:build && yarn workspace @senja/curator run start
$ turbo run build --scope=*curator*
WARNING cannot find a .git folder. Falling back to manual file hashing (which may be slower). If you are running this build in a pruned directory, you can ignore this message. Otherwise, please initialize a git repository in the root of your monorepo
• Packages in scope: @senja/curator
• Running build in 1 packages
• Remote caching disabled
@senja/curator:build: cache miss, executing 045b584daec6ea8f
@senja/curator:build: $ node esbuild.config.js
@senja/curator:build: runtime: failed to create new OS thread (have 6 already; errno=11)
$ yarn curator:build && yarn workspace @senja/curator run start
$ turbo run build --scope=*curator*
WARNING cannot find a .git folder. Falling back to manual file hashing (which may be slower). If you are running this build in a pruned directory, you can ignore this message. Otherwise, please initialize a git repository in the root of your monorepo
• Packages in scope: @senja/curator
• Running build in 1 packages
• Remote caching disabled
@senja/curator:build: cache miss, executing 045b584daec6ea8f
@senja/curator:build: $ node esbuild.config.js
@senja/curator:build: runtime: failed to create new OS thread (have 6 already; errno=11)
Brody
Brody2y ago
that is not what i told you to do
WilsonSquared
WilsonSquared2y ago
I don't have a nixpacks.toml file. I'll have to redo my setup with it. Will update once I do then
Brody
Brody2y ago
bruh make a nixpacks.toml file and put only that in it
WilsonSquared
WilsonSquared2y ago
Gotcha. Will do now
Brody
Brody2y ago
then show me a screenshot of the contents of the nixpacks.toml file
WilsonSquared
WilsonSquared2y ago
I'm working in a monorepo. Shall I add it to the root of the file or my package?
Brody
Brody2y ago
add it to whatever service needs it ...whatever service needs libuuid1
WilsonSquared
WilsonSquared2y ago
I've added it. It didn't fix it
Brody
Brody2y ago
^
WilsonSquared
WilsonSquared2y ago
Brody
Brody2y ago
have you removed NIXPACKS_APT_PKGS from your service variables
WilsonSquared
WilsonSquared2y ago
Whoops 🤦 Rebuilding now
#9 7.800 libuuid1 is already the newest version (2.37.2-4ubuntu3).
#9 7.800 libuuid1 is already the newest version (2.37.2-4ubuntu3).
Still rebuilding, but I noticed this log. Still broken.
Error: libuuid.so.1: cannot open shared object file: No such file or directory
Error: libuuid.so.1: cannot open shared object file: No such file or directory
Brody
Brody2y ago
dont know, but im willing to debug it on my own further if you can get me a minimal reproducible example that will throw that error
WilsonSquared
WilsonSquared2y ago
Will share one in a few hours.
Brody
Brody2y ago
okay then ill look in the morning (2:40am here)
WilsonSquared
WilsonSquared2y ago
Removing puppeteer-core fixes the issue. I still need it though Playwright works. I'll just use this instead.
Want results from more Discord servers?
Add your server