Skip to content

Comments

NSS#56

Merged
adieuadieu merged 2 commits intoadieuadieu:developfrom
qubyte:nss
Aug 29, 2017
Merged

NSS#56
adieuadieu merged 2 commits intoadieuadieu:developfrom
qubyte:nss

Conversation

@qubyte
Copy link
Contributor

@qubyte qubyte commented Aug 10, 2017

Closes #53.

This PR adds an NSS build (and instructions on how to reproduce it). I've got an analogue of this running in lambda now (hand built chromium 62 and our own library for wrapping it) and it does indeed get things running.

@adieuadieu
Copy link
Owner

adieuadieu commented Aug 10, 2017

@qubyte !!!! This is super awesome! Nice work! 🎉 💯 🥇

package.json Outdated
"config": {
"jsSrc": "src/"
"jsSrc": "src/",
"chromeZipFileName": "chrome-headless-lambda-linux-60.0.3095.0.zip",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might need to move chromeZipFileName and nssZipFileName into the package.json within the packages/lambda folder. Only the contents within the packages/lambda folder get published in the NPM package.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops! Good spot!

Copy link
Owner

@adieuadieu adieuadieu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again for working on this, @qubyte! I'm really excited that the project is unblocked from this NSS issue!

const DEVTOOLS_PORT = 9222
const DEVTOOLS_HOST = 'http://127.0.0.1'

const nssSubPath = fs.readFileSync(path.join(__dirname, 'nss', 'latest'), 'utf8').trim();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might need to scope this NSS setup within a if (process.env.AWS_EXECUTION_ENV) block, since we probably don't need to mess around with NSS locally, in a non-Lambda context.

@qubyte
Copy link
Contributor Author

qubyte commented Aug 11, 2017

I'm just picking this up again now. I'm hoping to have the PR completed and hand tested some time today.

@qubyte qubyte force-pushed the nss branch 5 times, most recently from 9f22849 to bc89d0d Compare August 11, 2017 10:07
@qubyte
Copy link
Contributor Author

qubyte commented Aug 11, 2017

Ok, I think this is good to go. To be completely honest I'm not 100% sure it'll work until it's all in the wild. Circle seems to be stuck too...

@qubyte
Copy link
Contributor Author

qubyte commented Aug 15, 2017

@adieuadieu Let me know if I've broken some tests. Happy to fix if I have.

@adieuadieu adieuadieu mentioned this pull request Aug 17, 2017
@qubyte
Copy link
Contributor Author

qubyte commented Aug 21, 2017

Bump. Happy to help if there's anything I can do to speed this along.

Copy link
Owner

@adieuadieu adieuadieu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @qubyte sorry for my late reply. I'm ready to merge this PR with one change: please remove the chrome binary .zip file.

The reason for this is that, the Chrome binary runs in a potentially privileged environment. Since people are trusting this project to not be packaging a version of headless-chrome which includes malicious code, it's best if, at this stage, all the binary zip files are built and committed by me. That's not to say that your binary is malicious! I know you meant well by including it.

@qubyte
Copy link
Contributor Author

qubyte commented Aug 28, 2017 via email

@qubyte
Copy link
Contributor Author

qubyte commented Aug 29, 2017

@adieuadieu I've rebased out the chrome build. I've left the NSS build in here, but as the final commit, so it's trivial for me to pop that out of this PR if you prefer to do that yourself. If there's anything unclear in the NSS readme, let me know!

@adieuadieu
Copy link
Owner

Thank you @qubyte! I'll merge this with the NSS binary included so that I have something to test with against my own build. It's also unlikely anyone will just grab the NSS build from this repository at this stage (which is not the case for the Chrome binary—it gets hot linked directly by a number of other projects..)

Thank you again for your help and contribution! I greatly appreciate it.

@adieuadieu adieuadieu merged commit 720947a into adieuadieu:develop Aug 29, 2017
@qubyte qubyte deleted the nss branch August 29, 2017 18:35
@qubyte
Copy link
Contributor Author

qubyte commented Aug 29, 2017

You're most welcome! Thanks for serverless-chrome and all the effort that goes in! :D

@qubyte
Copy link
Contributor Author

qubyte commented Sep 14, 2017

Would it be possible to get this published to npm please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants