garris / BackstopJS

Catch CSS curve balls.
http://backstopjs.org
MIT License
6.78k stars 603 forks source link

Failed to download Chromium r555668 #767

Closed tyler36 closed 6 years ago

tyler36 commented 6 years ago

I went to upgrade BackstopJS from 3.1.21 to 3.2.16 but am getting errors.

ERROR: Failed to download Chromium r555668! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download.
{ Error: self signed certificate in certificate chain

At this point, it seems to be an issue with NPM & Yarn although I could be wrong. It's preventing me from using puppeteer so I thought I'd see if there is a current solution.

I've tried multiple versions of NPM (5.7.1, 5.8.0), and Yarn (1.5.1, 1.6.0) but without success.

I've tried turning off SSL with

yarn config set strict-ssl false

... but that didn't work.

Is there a page that will let me manually download it? And if so, which files are needed and where?

OS: Win10 x64 NPM: 5.7.1, 5.8.0 YARN: 1.5.1, 1.6.0

tyler36 commented 6 years ago

OK ... seems binaries can be manually downloaded here

https://storage.googleapis.com/chromium-browser-snapshots/Win_x64/%VERSION%/chrome-win32.zip

where %VERSION% => 555668

tyler36 commented 6 years ago

Managed to get it upgrade with a workaround script

cross-env NODE_TLS_REJECT_UNAUTHORIZED=0 yarn upgrade backstopjs

Not really a solution but ...

garris commented 6 years ago

Is this an issue for all windows users?

aliu145 commented 6 years ago

I am running into this issue too (on windows).. @tyler36 , I downloaded the file you linked and copied into node_modules folder but I'm still running into same error. was there something else you had to do?

tyler36 commented 6 years ago

@aliu145, no. I wasn't sure what to do it with. I went with temporarily adding a new script command in my package.json

    "scripts": {
...
        "bypass": "cross-env NODE_TLS_REJECT_UNAUTHORIZED=0 yarn upgrade backstopjs",
...
}

Running this command ( yarn bypass), allowed me to install it. Then I removed the command since NODE_TLS_REJECT_UNAUTHORIZED=0 basically turns off protection.

garris commented 6 years ago

Is this an issue with puppeteer’s install or with backstop?

aliu145 commented 6 years ago

Hmm I am able to directly install puppeteer into a different directory:

image

So perhaps it's an issue with backstop?

garris commented 6 years ago

Ok let me try.

garris commented 6 years ago

Ok. I just successfully ran the backstopjs sanity test from scratch on windows 10...

From the docs... image

It installed backstop on the desktop and ran in win10 without issues...

screen shot 2018-05-18 at 4 51 28 pm

QUESTION: Are you guys on node version 8 or above?

tyler36 commented 6 years ago
node -v
v9.11.1
garris commented 6 years ago

Did you try running the backstop sanity test script from the troubleshooting section of the docs?

tyler36 commented 6 years ago

Just ran sanity check in PowerShell (5.1.17134.48)

...
Writing location.js file
Done. Phantomjs binary available at I:\temp\backstopSanityTest\node_modules\phantomjs-prebuilt\lib\phantom\bin\phantomjs.exe

> puppeteer@1.4.0 install I:\temp\backstopSanityTest\node_modules\puppeteer
> node install.js

ERROR: Failed to download Chromium r555668! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download.
{ Error: self signed certificate in certificate chain
    at TLSSocket.onConnectSecure (_tls_wrap.js:1046:34)
    at TLSSocket.emit (events.js:180:13)
    at TLSSocket._finishInit (_tls_wrap.js:633:8) code: 'SELF_SIGNED_CERT_IN_CHAIN' }
npm WARN enoent ENOENT: no such file or directory, open 'I:\temp\backstopSanityTest\package.json'
npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN backstopSanityTest No description
npm WARN backstopSanityTest No repository field.
npm WARN backstopSanityTest No README data
npm WARN backstopSanityTest No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! puppeteer@1.4.0 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the puppeteer@1.4.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!     C:\Users\testuser\AppData\Roaming\npm-cache\_logs\2018-05-21T00_22_36_708Z-debug.log
internal/modules/cjs/loader.js:550
    throw err;
    ^

Error: Cannot find module 'I:\temp\backstopSanityTest\node_modules\backstopjs\cli\index.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:548:15)
    at Function.Module._load (internal/modules/cjs/loader.js:475:25)
    at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)
    at startup (internal/bootstrap/node.js:201:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:516:3)
tyler36 commented 6 years ago

In my case, I am unable install puppeteer via npm. So for me, it seems to be a puppeteer issue and NOT a backstopjs issue.

λ  **npm install puppeteer**

> puppeteer@1.4.0 install I:\temp\pup\node_modules\puppeteer
> node install.js

ERROR: Failed to download Chromium r555668! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download.
{ Error: self signed certificate in certificate chain
    at TLSSocket.onConnectSecure (_tls_wrap.js:1046:34)
    at TLSSocket.emit (events.js:180:13)
    at TLSSocket._finishInit (_tls_wrap.js:633:8) code: 'SELF_SIGNED_CERT_IN_CHAIN' }
npm WARN enoent ENOENT: no such file or directory, open 'I:\temp\pup\package.json'
garris commented 6 years ago

@tyler36 Ok -- got it -- thank you for following up!

FWIW: this looks like an unusual condition...

Error: self signed certificate in certificate chain

tyler36 commented 6 years ago

@garris, no problems :)

Thanks for the great software!

cesar-bedoya commented 6 years ago

Close your antivirus

tyler36 commented 6 years ago

@cesar-bedoya Thanks. With Kaspersky protection running, it fails. Disabled the software and it worked.

I still think disabling security is not a solution but since the problem is with an external package ( Puppeteer) and the installed security suite, I suspect there's nothing @garris can do.

Thank you both for your time and help!