speckle-server icon indicating copy to clipboard operation
speckle-server copied to clipboard

fix(preview-service): install chromium browser as a dependency

Open iainsproat opened this issue 1 year ago • 1 comments

Description & motivation

Changes:

To-do before merge:

Screenshots:

Validation of changes:

Checklist:

  • [ ] My pull request follows the guidelines in the Contributing guide?
  • [ ] My pull request does not duplicate any other open Pull Requests for the same update/change?
  • [ ] My commits are related to the pull request and do not amend unrelated code or documentation.
  • [ ] My code follows a similar style to existing code.
  • [ ] I have added appropriate tests.
  • [ ] I have updated or added relevant documentation.

References

iainsproat avatar Feb 06 '24 17:02 iainsproat

Fails on arm64 apple with

/speckle-server/node_modules/@puppeteer/browsers/lib/cjs/launch.js:267
                reject(new Error([
                       ^

Error: Failed to launch the browser process!
The hardware on this system lacks support for the sse3 instruction set.
The upstream chromium project no longer supports this configuration.
For more information, please read and possibly provide input to their
bug tracking system at http://crbug.com/1123353


TROUBLESHOOTING: https://pptr.dev/troubleshooting

    at Interface.onClose (/speckle-server/node_modules/@puppeteer/browsers/lib/cjs/launch.js:267:24)
    at Interface.emit (node:events:529:35)
    at Interface.close (node:internal/readline/interface:534:10)
    at Socket.onend (node:internal/readline/interface:260:10)
    at Socket.emit (node:events:529:35)
    at endReadableNT (node:internal/streams/readable:1400:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

Node.js v18.19.0

iainsproat avatar Feb 06 '24 21:02 iainsproat

Fails on arm64 apple

Works with:

docker build -f ./packages/preview-service/Dockerfile -t preview-service .
docker run --rm -p 3001:3001 -e PG_CONNECTION_STRING=postgres://speckle:[email protected]/speckle preview-service

Executing into the running container, the executable works at /usr/bin/chromium.

iainsproat avatar Jun 18 '24 19:06 iainsproat