Conversation
|
@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", |
There was a problem hiding this comment.
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.
adieuadieu
left a comment
There was a problem hiding this comment.
Thanks again for working on this, @qubyte! I'm really excited that the project is unblocked from this NSS issue!
packages/lambda/src/index.js
Outdated
| const DEVTOOLS_PORT = 9222 | ||
| const DEVTOOLS_HOST = 'http://127.0.0.1' | ||
|
|
||
| const nssSubPath = fs.readFileSync(path.join(__dirname, 'nss', 'latest'), 'utf8').trim(); |
There was a problem hiding this comment.
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.
|
I'm just picking this up again now. I'm hoping to have the PR completed and hand tested some time today. |
9f22849 to
bc89d0d
Compare
|
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... |
|
@adieuadieu Let me know if I've broken some tests. Happy to fix if I have. |
|
Bump. Happy to help if there's anything I can do to speed this along. |
adieuadieu
left a comment
There was a problem hiding this comment.
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.
|
No problem. It's a public holiday here today, so I'll update this tonight or tomorrow morning BST. Do you want me to remove the NSS build too?
… On 28 Aug 2017, at 09:49, Marco Lüthy ***@***.***> wrote:
@adieuadieu requested changes on this pull request.
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.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
|
@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! |
|
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. |
|
You're most welcome! Thanks for serverless-chrome and all the effort that goes in! :D |
|
Would it be possible to get this published to npm please? |
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.