Closed justinearl closed 5 months ago
If the docker you're showing is just for client, it shouldn't be trying to launch chrome. Are you connecting to the core docker in the client constructor?
Thanks for the response @blakebyrnes ,
My initial question is wrong, It works if I run a separate ulixee/cloud
.
The issue was when I am using this guide https://ulixee.org/docs/hero/advanced-concepts/deployment#fullstack and run it inside the container.
If I run the image I always encounter the message "Please re-install the browser engine: . . . npm install @ulixee/chrome-117-0". Surprisingly if I go inside the container and install npm install @ulixee/chrome-117-0
again and run xvfb-run npm start
everything works properly.
I also observed that if I remove CMD [ "xvfb-run", "npm", "start"]
in dockerfile and run the image and go inside the container to manually run xvfb-run npm start
it works properly without reinstalling @ulixee/chrome-117-0
What are you installing with your package.json? Do you have any guesses what's going on here? It might be helpful to see what chrome(s) if any are installed from the npm install process.
Here is my package json
{
"scripts": {
"start": "node dist/index.js",
"build": "tsc",
"dev": "ts-node-dev src/index.ts"
},
"dependencies": {
"@ulixee/chrome-117-0": "^5938.150.8",
"@ulixee/cloud": "^2.0.0-alpha.25",
"@ulixee/hero": "^2.0.0-alpha.25",
"@ulixee/hero-core": "^2.0.0-alpha.25",
"buffer": "^6.0.3",
"dotenv": "^16.3.1",
"fs": "^0.0.1-security",
"ts-node": "^10.9.2"
},
"devDependencies": {
"@types/better-sqlite3": "^7.6.8",
"@types/ws": "^8.5.10"
}
}
Here is the dependencies installed on container
+-- @types/better-sqlite3@7.6.8
| `-- @types/node@20.10.7
| `-- undici-types@5.26.5
+-- @types/ws@8.5.10
| `-- @types/node@20.10.7 deduped
+-- @ulixee/chrome-117-0@5938.150.8
| `-- @ulixee/chrome-app@1.0.3
| +-- https-proxy-agent@5.0.1
| | +-- agent-base@6.0.2
| | | `-- debug@4.3.4 deduped
| | `-- debug@4.3.4
| | `-- ms@2.1.2
| +-- progress@2.0.3
| `-- tar@6.2.0
| +-- chownr@2.0.0
| +-- fs-minipass@2.1.0
| | `-- minipass@3.3.6
| | `-- yallist@4.0.0 deduped
| +-- minipass@5.0.0
| +-- minizlib@2.1.2
| | +-- minipass@3.3.6
| | | `-- yallist@4.0.0 deduped
| | `-- yallist@4.0.0 deduped
| +-- mkdirp@1.0.4
| `-- yallist@4.0.0
+-- @ulixee/cloud@2.0.0-alpha.25
| +-- @ulixee/commons@2.0.0-alpha.25
| | +-- @jridgewell/trace-mapping@0.3.20
| | | +-- @jridgewell/resolve-uri@3.1.1
| | | `-- @jridgewell/sourcemap-codec@1.4.15
| | +-- bech32@2.0.0
| | +-- devtools-protocol@0.0.1137505
| | +-- https-proxy-agent@5.0.1 deduped
| | `-- semver@7.5.4
| | `-- lru-cache@6.0.0
| | `-- yallist@4.0.0 deduped
| +-- @ulixee/crypto@2.0.0-alpha.25
| | +-- @ulixee/commons@2.0.0-alpha.25 deduped
| | +-- @ulixee/crypto@2.0.0-alpha.25 deduped
| | +-- @ulixee/specification@2.0.0-alpha.25 deduped
| | +-- bignumber.js@9.1.2
| | `-- commander@9.5.0 deduped
| +-- @ulixee/datastore-core@2.0.0-alpha.25
| | +-- @ulixee/commons@2.0.0-alpha.25 deduped
| | +-- @ulixee/crypto@2.0.0-alpha.25 deduped
| | +-- @ulixee/datastore-docpage@2.0.0-alpha.25
| | +-- @ulixee/datastore@2.0.0-alpha.25
| | | +-- @ulixee/commons@2.0.0-alpha.25 deduped
| | | +-- @ulixee/crypto@2.0.0-alpha.25 deduped
| | | +-- @ulixee/net@2.0.0-alpha.25 deduped
| | | +-- @ulixee/platform-specification@2.0.0-alpha.25 deduped
| | | +-- @ulixee/schema@2.0.0-alpha.25 deduped
| | | +-- @ulixee/sidechain@2.0.0-alpha.25 deduped
| | | +-- @ulixee/specification@2.0.0-alpha.25 deduped
| | | +-- @ulixee/sql-ast@2.0.0-alpha.25 deduped
| | | +-- @ulixee/sql-engine@2.0.0-alpha.25 deduped
| | | +-- better-sqlite3@8.7.0 deduped
| | | +-- commander@9.5.0 deduped
| | | `-- nanoid@3.3.7 deduped
| | +-- @ulixee/net@2.0.0-alpha.25 deduped
| | +-- @ulixee/platform-specification@2.0.0-alpha.25 deduped
| | +-- @ulixee/schema@2.0.0-alpha.25
| | | `-- moment@2.30.1 deduped
| | +-- @ulixee/sidechain@2.0.0-alpha.25
| | | +-- @ulixee/commons@2.0.0-alpha.25 deduped
| | | +-- @ulixee/crypto@2.0.0-alpha.25 deduped
| | | +-- @ulixee/net@2.0.0-alpha.25 deduped
| | | +-- @ulixee/specification@2.0.0-alpha.25 deduped
| | | `-- commander@9.5.0 deduped
| | +-- @ulixee/specification@2.0.0-alpha.25 deduped
| | +-- @ulixee/sql-ast@2.0.0-alpha.25
| | | +-- moo@0.5.2
| | | `-- nearley@2.20.1
| | | +-- commander@2.20.3
| | | +-- moo@0.5.2 deduped
| | | +-- railroad-diagrams@1.0.0
| | | `-- randexp@0.4.6
| | | +-- discontinuous-range@1.0.0
| | | `-- ret@0.1.15
| | +-- @ulixee/sql-engine@2.0.0-alpha.25
| | | +-- @ulixee/commons@2.0.0-alpha.25 deduped
| | | +-- @ulixee/datastore@2.0.0-alpha.25 deduped
| | | +-- @ulixee/schema@2.0.0-alpha.25 deduped
| | | +-- @ulixee/sql-ast@2.0.0-alpha.25 deduped
| | | `-- @ulixee/sql-engine@2.0.0-alpha.25 deduped
| | +-- better-sqlite3@8.7.0 deduped
| | +-- nanoid@3.3.7 deduped
| | `-- tar@6.2.0 deduped
| +-- @ulixee/datastore-plugins-hero-core@2.0.0-alpha.25
| | +-- @ulixee/commons@2.0.0-alpha.25 deduped
| | +-- @ulixee/datastore-core@2.0.0-alpha.25 deduped
| | +-- @ulixee/datastore-plugins-hero@2.0.0-alpha.25
| | | +-- @ulixee/commons@2.0.0-alpha.25 deduped
| | | +-- @ulixee/datastore@2.0.0-alpha.25 deduped
| | | `-- @ulixee/hero@2.0.0-alpha.25 deduped
| | +-- @ulixee/datastore@2.0.0-alpha.25 deduped
| | +-- @ulixee/execute-js-plugin@2.0.0-alpha.25
| | | +-- @ulixee/hero-interfaces@2.0.0-alpha.25 deduped
| | | `-- @ulixee/hero-plugin-utils@2.0.0-alpha.25 deduped
| | +-- @ulixee/hero-core@2.0.0-alpha.25 deduped
| | +-- @ulixee/hero@2.0.0-alpha.25 deduped
| | +-- @ulixee/net@2.0.0-alpha.25 deduped
| | +-- @ulixee/platform-specification@2.0.0-alpha.25 deduped
| | `-- nanoid@3.3.7 deduped
| +-- UNMET OPTIONAL DEPENDENCY @ulixee/desktop-core@2.0.0-alpha.24
| +-- @ulixee/hero-core@2.0.0-alpha.25 deduped
| +-- @ulixee/hero-interfaces@2.0.0-alpha.25
| | +-- @ulixee/awaited-dom@1.4.2 deduped
| | +-- @ulixee/commons@2.0.0-alpha.25 deduped
| | +-- @ulixee/js-path@2.0.0-alpha.25 deduped
| | +-- @ulixee/unblocked-specification@2.0.0-alpha.25 deduped
| | `-- devtools-protocol@0.0.1137505 deduped
| +-- @ulixee/kad@2.0.0-alpha.25
| | +-- @ulixee/commons@2.0.0-alpha.25 deduped
| | +-- @ulixee/crypto@2.0.0-alpha.25 deduped
| | +-- @ulixee/net@2.0.0-alpha.25 deduped
| | +-- @ulixee/platform-specification@2.0.0-alpha.25 deduped
| | +-- @ulixee/specification@2.0.0-alpha.25 deduped
| | +-- better-sqlite3@8.7.0 deduped
| | +-- k-bucket@5.1.0
| | | `-- randombytes@2.1.0
| | | `-- safe-buffer@5.2.1
| | `-- nanoid@3.3.7 deduped
| +-- @ulixee/net@2.0.0-alpha.25
| | +-- @ulixee/commons@2.0.0-alpha.25 deduped
| | `-- ws@7.5.9 deduped
| +-- @ulixee/platform-specification@2.0.0-alpha.25
| | `-- @ulixee/specification@2.0.0-alpha.25 deduped
| +-- @ulixee/specification@2.0.0-alpha.25
| | `-- zod@3.22.4
| +-- commander@9.5.0
| `-- ws@7.5.9
| +-- UNMET OPTIONAL DEPENDENCY bufferutil@^4.0.1
| `-- UNMET OPTIONAL DEPENDENCY utf-8-validate@^5.0.2
+-- @ulixee/hero-core@2.0.0-alpha.25
| +-- @ulixee/awaited-dom@1.4.2
| | `-- @ulixee/js-path@2.0.0-alpha.25 deduped
| +-- @ulixee/commons@2.0.0-alpha.25 deduped
| +-- @ulixee/default-browser-emulator@2.0.0-alpha.25
| | +-- @ulixee/chrome-app@1.0.3 deduped
| | +-- @ulixee/commons@2.0.0-alpha.25 deduped
| | +-- @ulixee/real-user-agents@2.0.0-alpha.25
| | | +-- @ulixee/commons@2.0.0-alpha.25 deduped
| | | +-- @ulixee/unblocked-specification@2.0.0-alpha.25 deduped
| | | +-- compare-versions@3.6.0 deduped
| | | `-- ua-parser-js@0.7.37 deduped
| | +-- @ulixee/unblocked-agent-mitm-socket@2.0.0-alpha.25
| | | +-- @ulixee/commons@2.0.0-alpha.25 deduped
| | | +-- @ulixee/unblocked-specification@2.0.0-alpha.25 deduped
| | | `-- nanoid@3.3.7 deduped
| | +-- @ulixee/unblocked-specification@2.0.0-alpha.25 deduped
| | +-- compare-versions@3.6.0
| | +-- nanoid@3.3.7 deduped
| | +-- tough-cookie@4.1.3
| | | +-- psl@1.9.0
| | | +-- punycode@2.3.1
| | | +-- universalify@0.2.0
| | | `-- url-parse@1.5.10
| | | +-- querystringify@2.2.0
| | | `-- requires-port@1.0.0
| | `-- ua-parser-js@0.7.37
| +-- @ulixee/default-human-emulator@2.0.0-alpha.25
| | +-- @ulixee/commons@2.0.0-alpha.25 deduped
| | `-- @ulixee/unblocked-specification@2.0.0-alpha.25 deduped
| +-- @ulixee/hero-interfaces@2.0.0-alpha.25 deduped
| +-- @ulixee/hero-plugin-utils@2.0.0-alpha.25
| | +-- @ulixee/commons@2.0.0-alpha.25 deduped
| | +-- @ulixee/hero-interfaces@2.0.0-alpha.25 deduped
| | `-- @ulixee/unblocked-specification@2.0.0-alpha.25 deduped
| +-- @ulixee/hero-timetravel@2.0.0-alpha.25
| | +-- @ulixee/commons@2.0.0-alpha.25 deduped
| | +-- @ulixee/hero-core@2.0.0-alpha.25 deduped
| | +-- @ulixee/hero-interfaces@2.0.0-alpha.25 deduped
| | +-- @ulixee/unblocked-agent@2.0.0-alpha.25 deduped
| | +-- @ulixee/unblocked-specification@2.0.0-alpha.25 deduped
| | `-- nanoid@3.3.7 deduped
| +-- @ulixee/js-path@2.0.0-alpha.25
| +-- @ulixee/net@2.0.0-alpha.25 deduped
| +-- @ulixee/unblocked-agent-mitm@2.0.0-alpha.25
| | +-- @ulixee/commons@2.0.0-alpha.25 deduped
| | +-- @ulixee/unblocked-agent-mitm-socket@2.0.0-alpha.25 deduped
| | +-- @ulixee/unblocked-specification@2.0.0-alpha.25 deduped
| | +-- dns-packet@5.6.1
| | | `-- @leichtgewicht/ip-codec@2.0.4
| | `-- moment@2.30.1 deduped
| +-- @ulixee/unblocked-agent@2.0.0-alpha.25
| | +-- @ulixee/chrome-117-0@5938.150.8 deduped
| | +-- @ulixee/chrome-app@1.0.3 deduped
| | +-- @ulixee/commons@2.0.0-alpha.25 deduped
| | +-- @ulixee/js-path@2.0.0-alpha.25 deduped
| | +-- @ulixee/unblocked-agent-mitm@2.0.0-alpha.25 deduped
| | +-- @ulixee/unblocked-specification@2.0.0-alpha.25 deduped
| | +-- devtools-protocol@0.0.1137505 deduped
| | +-- nanoid@3.3.7 deduped
| | `-- tough-cookie@4.1.3 deduped
| +-- @ulixee/unblocked-specification@2.0.0-alpha.25
| | +-- @ulixee/js-path@2.0.0-alpha.25 deduped
| | `-- devtools-protocol@0.0.1137505 deduped
| +-- better-sqlite3@8.7.0
| | +-- bindings@1.5.0
| | | `-- file-uri-to-path@1.0.0
| | `-- prebuild-install@7.1.1
| | +-- detect-libc@2.0.2
| | +-- expand-template@2.0.3
| | +-- github-from-package@0.0.0
| | +-- minimist@1.2.8
| | +-- mkdirp-classic@0.5.3
| | +-- napi-build-utils@1.0.2
| | +-- node-abi@3.54.0
| | | `-- semver@7.5.4 deduped
| | +-- pump@3.0.0
| | | +-- end-of-stream@1.4.4
| | | | `-- once@1.4.0 deduped
| | | `-- once@1.4.0
| | | `-- wrappy@1.0.2
| | +-- rc@1.2.8
| | | +-- deep-extend@0.6.0
| | | +-- ini@1.3.8
| | | +-- minimist@1.2.8 deduped
| | | `-- strip-json-comments@2.0.1
| | +-- simple-get@4.0.1
| | | +-- decompress-response@6.0.0
| | | | `-- mimic-response@3.1.0
| | | +-- once@1.4.0 deduped
| | | `-- simple-concat@1.0.1
| | +-- tar-fs@2.1.1
| | | +-- chownr@1.1.4
| | | +-- mkdirp-classic@0.5.3 deduped
| | | +-- pump@3.0.0 deduped
| | | `-- tar-stream@2.2.0
| | | +-- bl@4.1.0
| | | | +-- buffer@5.7.1
| | | | | +-- base64-js@1.5.1 deduped
| | | | | `-- ieee754@1.2.1 deduped
| | | | +-- inherits@2.0.4 deduped
| | | | `-- readable-stream@3.6.2 deduped
| | | +-- end-of-stream@1.4.4 deduped
| | | +-- fs-constants@1.0.0
| | | +-- inherits@2.0.4
| | | `-- readable-stream@3.6.2
| | | +-- inherits@2.0.4 deduped
| | | +-- string_decoder@1.3.0
| | | | `-- safe-buffer@5.2.1 deduped
| | | `-- util-deprecate@1.0.2
| | `-- tunnel-agent@0.6.0
| | `-- safe-buffer@5.2.1 deduped
| +-- moment@2.30.1
| +-- nanoid@3.3.7
| `-- ws@7.5.9 deduped
+-- @ulixee/hero@2.0.0-alpha.25
| +-- @ulixee/awaited-dom@1.4.2 deduped
| +-- @ulixee/commons@2.0.0-alpha.25 deduped
| +-- @ulixee/hero-interfaces@2.0.0-alpha.25 deduped
| +-- @ulixee/hero-plugin-utils@2.0.0-alpha.25 deduped
| +-- @ulixee/js-path@2.0.0-alpha.25 deduped
| +-- @ulixee/net@2.0.0-alpha.25 deduped
| +-- @ulixee/unblocked-specification@2.0.0-alpha.25 deduped
| `-- linkedom@0.14.26
| +-- css-select@5.1.0
| | +-- boolbase@1.0.0
| | +-- css-what@6.1.0
| | +-- domhandler@5.0.3
| | | `-- domelementtype@2.3.0 deduped
| | +-- domutils@3.1.0
| | | +-- dom-serializer@2.0.0
| | | | +-- domelementtype@2.3.0 deduped
| | | | +-- domhandler@5.0.3 deduped
| | | | `-- entities@4.5.0 deduped
| | | +-- domelementtype@2.3.0 deduped
| | | `-- domhandler@5.0.3 deduped
| | `-- nth-check@2.1.1
| | `-- boolbase@1.0.0 deduped
| +-- cssom@0.5.0
| +-- html-escaper@3.0.3
| +-- htmlparser2@8.0.2
| | +-- domelementtype@2.3.0
| | +-- domhandler@5.0.3 deduped
| | +-- domutils@3.1.0 deduped
| | `-- entities@4.5.0
| `-- uhyphen@0.2.0
+-- buffer@6.0.3
| +-- base64-js@1.5.1
| `-- ieee754@1.2.1
+-- dotenv@16.3.1
+-- fs@0.0.1-security
`-- ts-node@10.9.2
+-- @cspotcode/source-map-support@0.8.1
| `-- @jridgewell/trace-mapping@0.3.9
| +-- @jridgewell/resolve-uri@3.1.1 deduped
| `-- @jridgewell/sourcemap-codec@1.4.15 deduped
+-- UNMET OPTIONAL DEPENDENCY @swc/core@>=1.2.50
+-- UNMET OPTIONAL DEPENDENCY @swc/wasm@>=1.2.50
+-- @tsconfig/node10@1.0.9
+-- @tsconfig/node12@1.0.11
+-- @tsconfig/node14@1.0.3
+-- @tsconfig/node16@1.0.4
+-- @types/node@20.10.7 deduped
+-- acorn-walk@8.3.1
+-- acorn@8.11.3
+-- arg@4.1.3
+-- create-require@1.1.1
+-- diff@4.0.2
+-- make-error@1.3.6
+-- typescript@5.3.3
+-- v8-compile-cache-lib@3.0.1
`-- yn@3.1.1
I was able to resolve this now.
Based from here https://github.com/ulixee/platform/blob/main/cloud/tools/docker/Dockerfile, you need to set BROWSERS_DIR
since it is checked in verifyLaunchable
. Also other directories must be created with proper ownership for the app to start properly.
RUN mkdir -p /ulixee/browsers
ENV BROWSERS_DIR /ulixee/browsers
RUN groupadd -r john && useradd -r -g john -G audio,video john \
&& mkdir -p /home/john/Downloads \
&& mkdir -p /home/john/.cache/ulixee \
&& chown -R john:john /home/john \
&& chown -R john:john /ulixee \
&& chmod 777 /ulixee/browsers \
&& chmod -R 777 /home/john/.cache/ulixee
Oh, nice. Thanks for the follow up!
I was trying to run a Hero Client but got this error
Dockerfile
I am running ulixee/cloud in separate docker container