ERROR: Failed to download Chromium at AWS deployment.



  • Hello, I am trying to deploy my jsreport app to AWS, I am using elastic beanstalk. The issue is that every time npm install fails with the following error:

    ERROR: Failed to download Chromium r579032! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download.
    { Error: EACCES: permission denied, open '/tmp/deployment/application/node_modules/jsreport/node_modules/puppeteer/.local-chromium/download-linux-579032.zip'
    errno: -13,
    code: 'EACCES',
    syscall: 'open',
    path: '/tmp/deployment/application/node_modules/jsreport/node_modules/puppeteer/.local-chromium/download-linux-579032.zip' }
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! puppeteer@1.7.0 install: node install.js
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the puppeteer@1.7.0 install script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

    npm ERR! A complete log of this run can be found in:
    npm ERR! /tmp/.npm/_logs/2018-11-06T13_13_16_079Z-debug.log
    Running npm install: /opt/elasticbeanstalk/node-install/node-v8.12.0-linux-x64/bin/npm
    Setting npm config jobs to 1
    npm config jobs set to 1
    Running npm with --production flag
    Failed to run npm install. Snapshot logs for more details.
    Traceback (most recent call last):
    File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 695, in <module>
    main()
    File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 677, in main
    node_version_manager.run_npm_install(options.app_path)
    File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 136, in run_npm_install
    self.npm_install(bin_path, self.config_manager.get_container_config('app_staging_dir'))
    File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 180, in npm_install
    raise e
    subprocess.CalledProcessError: Command '['/opt/elasticbeanstalk/node-install/node-v8.12.0-linux-x64/bin/npm', '--production', 'rebuild']' returned non-zero exit status 1.
    Incorrect application version "abamatrix-reports" (deployment 4). Expected version "abamatrix-reports" (deployment 1).

    Any help will be much appreciated.



  • We have steps required for running chrome on amazon linux described here
    https://jsreport.net/learn/amazon-linux

    I guess you need to run those in your .ebextensions.

    You can also check these links which pops up on the first google search
    https://github.com/GoogleChrome/puppeteer/issues/765
    https://gist.github.com/chimmelb/6342504893b2b9fce0f4a8efd096ae60

    If you are just trying to set jsreport quickly up.
    I would recommend to use docker in elastic beanstalk, then it should be just about setting the jsreport official image.


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.