puppeteer: freebsd Unsupported platform
Steps to reproduce
Tell us about your environment:
-
Puppeteer version: puppeteer@0.12.0 or puppeteer@0.13.0-alpha
-
Platform / OS version: $ freebsd-version 10.3-RELEASE-p16
-
URLs (if applicable):
What steps will reproduce the problem?
Please include code that reproduces the issue.
- $
npm install puppeteer
What is the expected result? installed puppeteer
What happens instead?
puppeteer@0.12.0 install /usr/home/majkelo/node_modules/puppeteer node install.js
assert.js:43 throw new errors.AssertionError({ ^
AssertionError [ERR_ASSERTION]: Unsupported platform: at Console.assert (console.js:171:23) at Object.revisionInfo (/usr/home/majkelo/node_modules/puppeteer/utils/ChromiumDownloader.js:139:13) at Object.<anonymous> (/usr/home/majkelo/node_modules/puppeteer/install.js:31:33) at Module._compile (module.js:573:30) at Object.Module._extensions…js (module.js:584:10) at Module.load (module.js:507:32) at tryModuleLoad (module.js:470:12) at Function.Module._load (module.js:462:3) at Function.Module.runMain (module.js:609:10) at startup (bootstrap_node.js:158:16) npm WARN enoent ENOENT: no such file or directory, open ‘/usr/home/majkelo/package.json’ npm WARN majkelo No description npm WARN majkelo No repository field. npm WARN majkelo No README data npm WARN majkelo No license field. npm ERR! FreeBSD 10.3-STABLE npm ERR! argv “/usr/local/devil/node8/bin/node” “/usr/local/bin/npm” “install” “puppeteer” npm ERR! node v8.4.0 npm ERR! npm v4.0.5 npm ERR! code ELIFECYCLE
npm ERR! puppeteer@0.12.0 install:
node install.js
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the puppeteer@0.12.0 install script ‘node install.js’.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 5
- Comments: 26 (3 by maintainers)
Commits related to this issue
- FreeBSD changes. See https://github.com/GoogleChrome/puppeteer/issues/1049 — committed to SyncronTech/grafana-image-renderer by ASunc 5 years ago
FYI, Chomium FreeBSD port has reached the same revision as
puppeteer@1.0.0
, and, from my testing, works as intended. (as of now, v65.0.3325.181)Steps to make it work:
chromium
in the host OS:sudo pkg install chromium
puppeteer@1.0.0
withPUPPETEER_SKIP_CHROMIUM_DOWNLOAD
set:PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true npm install puppeteer@1.0.0
puppeteer
withexecutablePath: '/usr/local/bin/chrome'
:This worked fine on
FreeBSD 10.3-RELEASE-p9
@hbowden like @saboya mentioned, we unfortunately don’t have CI to build freebsd binaries.
@saboya yes, I’d try using some old version of pptr, e.g. v0.9.0. Alternatively, you can build chromium from source on the freebsd.
We don’t have any immediate plans and resources to add freebsd builds. Closing this for now; we might revisit this later if there’s a bigger demand.
Last I checked, FreeBSD was POSIX-compliant and still is. This means very little work is required to add FreeBSD under “compatible platforms”. We’ve gone as far to support OSX (derived from FreeBSD, imagine that!) so why not respectfully include the parent OS that will most likely power the application on the server side?
The requirements have been met at this point; it’s time to stop treating FreeBSD as a third-world OS.
+1
For people coming from google, the above no longer worked for me… it seems the platform option gets ignored and reset to os.platform in various places.
Couldn’t really be arsed trying to work around that so I just modified the if statement (or switch depending on version) that validates the platform to include “freebsd” case/else. This is in the BrowserFetcher constructor. I just copied the code from the linux case/if into the new freebsd one. Check the stack trace to see where you need to modify.
You still need the env vars.
Works fine on BSD after this change.🤷
Indeed this does work fine.
setenv PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true && npm install
This is a lot of nonsense to go through to use something that “just works” if it wasn’t for puppeteer itself actively working against it.
Bizarre to add an explicit check when the workaround was working for FreeBSD users.
v1.20.0 puppeteer/lib/BrowserFetcher.js: …
freebsd is not supported
Chromium exists in standard ports collection. /usr/ports/www/chromium/
[ /usr/ports/www/chromium ] # cat pkg-descr Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The Chromium website contains design documents, architecture overviews, testing information, and more to help you learn to build and work with the Chromium source code.
WWW: https://www.chromium.org/Home
On Fri, Dec 25, 2020 at 12:54 PM Alexander Povolotsky < notifications@github.com> wrote:
–
Yours sincerely, Igor
You can run
npm install
withPUPPETEER_SKIP_CHROMIUM_DOWNLOAD
to avoid the download problem.When using puppeteer, you can set the
executablePath
option to point puppeteer to the right direction:This should work, but actually doesn’t. I guess it’s because the latest
www/chromium
in ports is too old. Puppeteer 0.13 uses v64.0.3264.0 while the latest version on ports is v61.0.3163.100. Puppeteer can’t connect to chromium. But it does launch it.