Hi,Has anyone tried to run headless chrome inside aws lambda function? Would that be even possible?
--
You received this message because you are subscribed to the Google Groups "headless-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to headless-dev...@chromium.org.
To post to this group, send email to headle...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/headless-dev/099dee39-0a0f-4549-a543-f2eb59d0ef07%40chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/headless-dev/b18688cb-2452-4534-81fb-edecae97edc4%40chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/headless-dev/397ce471-1d9c-4908-b4d2-ccac03a752f4%40chromium.org.
--
You received this message because you are subscribed to the Google Groups "headless-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to headless-dev...@chromium.org.
To post to this group, send email to headle...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/headless-dev/9db11519-1830-4a92-84ce-19200992cc1e%40chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/headless-dev/5d545696-7daa-40e1-87ac-d685b3c75305%40chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/headless-dev/e75a8735-84da-4483-a4bb-a0c938817a16%40chromium.org.
On Tue, May 16, 2017, 13:59 Marco Lüthy <marco....@gmail.com> wrote:
Hello,So far, in the context of the AWS Lambda environment, I've only been able to get the headless shell to run with the --single-process flag. The problem with this is that, with the --single-process flag, it seems some metrics are disabled, which are used by reporting tools like Lighthouse (for example.) It's also slower..--single-process causes the following to be logged to stderr:[0516/112658.332373:WARNING:histograms.cc(40)] Started multiple compositor clients (Browser, Renderer) in one process. Some metrics will be disabled.
When running the headless shell without --single-process, the process crashes when I try to open a new tab. The following error is logged multiple times to stderr:prctl(PR_SET_NO_NEW_PRIVS) failedI assume this is somehow related to Chromium trying to sandbox itself. Is this assumption correct? However, adding the --no-sandbox flag doesn't seem to make a difference at addressing the prctl error. What could be causing the prctl error, and how can I work around it?
Without the --no-sandbox flag, the following is logged to stderr:[0516/113410.811078:FATAL:zygote_host_impl_linux.cc(107)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.However, the link in that log message seems to indicate that the linux suid sandbox has been mostly removed? Additionally, the --disable-setuid-sandbox doesn't seem to do anything.Any help, or direction are greatly appreciated. Unfortunately I've only been able to produce these issues within the Lambda execution environment, which is rather restrictive and doesn't let you do anything with setsuid. Is there a way to completely disable the sandboxing in the headless shell?
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/headless-dev/03ff0b20-8af5-4ae2-aa88-28f8f70e82b2%40chromium.org.
Hi guys,Thanks for your great efforts in making Chrome work in Lambda. Running a "real" headless browser in serverless opens a lot of unique possibilities of automating the web at crazy scale, which is generally not achievable with classic computation clusters in a cost-effective way.I've done my share of experiment as well and also managed to run it with /dev/shm hack and some combo of --no-sandbox, --single-process and a bunch of other flags. Since we run in isolated world anyway,
--
You received this message because you are subscribed to the Google Groups "headless-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to headless-dev+unsubscribe@chromium.org.
To post to this group, send email to headle...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/headless-dev/0a91d4d4-d51f-4335-9880-1c2f23773f24%40chromium.org.
Hi guys,Thanks for your great efforts in making Chrome work in Lambda. Running a "real" headless browser in serverless opens a lot of unique possibilities of automating the web at crazy scale, which is generally not achievable with classic computation clusters in a cost-effective way.I've done my share of experiment as well and also managed to run it with /dev/shm hack and some combo of --no-sandbox, --single-process and a bunch of other flags. Since we run in isolated world anyway, we most likely don't need any sandboxing, so I have no problem with --no-sandbox flag — but please correct me if my understanding is incomplete and it poses some serious security threat.
Further tracing has lead me to try running with --no-zygote flag — and to my surprise it worked, Chrome doesn't die anymore. But before celebrating I'd like to understand the consequences, what are the trade-offs and whether there are other alternatives. For example, if I don't intend to open new tab for every function invokation, then I don't need super-fast tab process spawning, right?
Anyway, I am very excited that people from Chrome team are starting to look into application scenarios of Headless. Keep up the good work!
--
You received this message because you are subscribed to the Google Groups "headless-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to headless-dev...@chromium.org.
'--disable-gpu',
'--remote-debugging-port=9222',
'--window-size=1000,800',
'--no-sandbox',
'--no-zygote',
'--user-data-dir=/tmp/user-data',
'--hide-scrollbars',
'--enable-logging',
'--log-level=0',
'--v=99',
'--single-process',
'--data-path=/tmp/data-path',
'--ignore-certificate-errors',
'--homedir=/tmp',
'--disk-cache-dir=/tmp/cache-dir'
{ "method": "Page.enable", "params": {} }
{ "method": "Network.enable", "params": {} }
{ "method": "Runtime.enable", "params": {} }
{ "method": "Page.setControlNavigations", "params": { "enabled": true } }
{ "method": "Page.navigate", "params": { "url": "https://google.com" } }
{ "method": "Page.processNavigation", "params": { "response": "Proceed", "navigationId": $int }
[0703/033315.949451:ERROR:bad_message.cc(23)] Terminating renderer for bad IPC message, reason 138
[0703/033315.949509:FATAL:browser_message_filter.cc(165)] Check failed: false.
#0 0x00000140d027 base::debug::StackTrace::StackTrace()
#1 0x00000141de0d logging::LogMessage::~LogMessage()
#2 0x000000462130 content::BrowserMessageFilter::ShutdownForBadMessage()
#3 0x000000809ad4 content::DOMStorageMessageFilter::OnOpenStorageArea()
#4 0x00000080998f _ZN3IPC8MessageTI38DOMStorageHostMsg_OpenStorageArea_MetaSt5tupleIJil4GURLEEvE8DispatchIN7content23DOMStorageMessageFilterES8_vMS8_FvilRKS3_EEEbPKNS_7MessageEPT_PT0_PT1_T2_
#5 0x000000809501 content::DOMStorageMessageFilter::OnMessageReceived()
#6 0x000001456483 base::SequencedWorkerPool::Inner::ThreadLoop()
#7 0x000001455ce1 base::SequencedWorkerPool::Worker::Run()
#8 0x000001458ec5 base::SimpleThread::ThreadMain()
#9 0x0000014552d3 base::(anonymous namespace)::ThreadFunc()
#10 0x7f5a85539dc5 start_thread
#11 0x7f5a835916ed __clone
Received signal 6
#0 0x00000140d027 base::debug::StackTrace::StackTrace()
#1 0x00000140cb9f base::debug::(anonymous namespace)::StackDumpSignalHandler()
#2 0x7f5a85541370 <unknown>
#3 0x7f5a834cf1d7 __GI_raise
#4 0x7f5a834d08c8 __GI_abort
#5 0x00000140bce2 base::debug::BreakDebugger()
#6 0x00000141e160 logging::LogMessage::~LogMessage()
#7 0x000000462130 content::BrowserMessageFilter::ShutdownForBadMessage()
#8 0x000000809ad4 content::DOMStorageMessageFilter::OnOpenStorageArea()
#9 0x00000080998f _ZN3IPC8MessageTI38DOMStorageHostMsg_OpenStorageArea_MetaSt5tupleIJil4GURLEEvE8DispatchIN7content23DOMStorageMessageFilterES8_vMS8_FvilRKS3_EEEbPKNS_7MessageEPT_PT0_PT1_T2_
#10 0x000000809501 content::DOMStorageMessageFilter::OnMessageReceived()
#11 0x000001456483 base::SequencedWorkerPool::Inner::ThreadLoop()
#12 0x000001455ce1 base::SequencedWorkerPool::Worker::Run()
#13 0x000001458ec5 base::SimpleThread::ThreadMain()
#14 0x0000014552d3 base::(anonymous namespace)::ThreadFunc()
#15 0x7f5a85539dc5 start_thread
{"id":469339106,"method":"Target.sendMessageToTarget","params":{"targetId":"b3be4d9d-68e3-453a-9328-7a0f664517e0","message":"{\"id\":1458323237,\"method\":\"Page.navigate\",\"params\":{\"url\":\"https://google.com\"}}"}}
--
You received this message because you are subscribed to the Google Groups "headless-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to headless-dev+unsubscribe@chromium.org.
To post to this group, send email to headle...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/headless-dev/4aab77ec-67ab-49c8-9818-19df3aa8e7de%40chromium.org.
{"id":1298498081,"method":"Target.createBrowserContext"}
{"id":1427131847,"method":"Target.createTarget","params":{"browserContextId":"6d6fbee5-024f-4512-bac1-ef3000d6a03a","height":500,"url":"about:blank","width":940}}
{"id":911902081,"method":"Target.attachToTarget","params":{"targetId":"b5e8db2f-2a90-46dd-ad9b-284466a0ba38"}}
{"id":336122540,"method":"Target.sendMessageToTarget","params":{"targetId":"b5e8db2f-2a90-46dd-ad9b-284466a0ba38","message":"{\"id\":140954425,\"method\":\"Page.enable\",\"params\":{}}"}}
{"id":1106410694,"method":"Target.sendMessageToTarget","params":{"targetId":"b5e8db2f-2a90-46dd-ad9b-284466a0ba38","message":"{\"id\":646203300,\"method\":\"Runtime.enable\",\"params\":{}}"}}
{"id":817455089,"method":"Target.sendMessageToTarget","params":{"targetId":"b5e8db2f-2a90-46dd-ad9b-284466a0ba38","message":"{\"id\":460128162,\"method\":\"DOM.enable\",\"params\":{}}"}}
{"id":607811211,"method":"Target.sendMessageToTarget","params":{"targetId":"b5e8db2f-2a90-46dd-ad9b-284466a0ba38","message":"{\"id\":1006933274,\"method\":\"Network.enable\",\"params\":{}}"}}
{"id":469339106,"method":"Target.sendMessageToTarget","params":{"targetId":"b5e8db2f-2a90-46dd-ad9b-284466a0ba38","message":"{\"id\":1458323237,\"method\":\"Page.setControlNavigations\",\"params\":{\"enabled\":true}}"}}
{"id":1225511528,"method":"Target.sendMessageToTarget","params":{"targetId":"b5e8db2f-2a90-46dd-ad9b-284466a0ba38","message":"{\"id\":774965466,\"method\":\"Emulation.setVisibleSize\",\"params\":{\"width\":1920,\"height\":951}}"}}
{"id":637979947,"method":"Target.sendMessageToTarget","params":{"targetId":"b5e8db2f-2a90-46dd-ad9b-284466a0ba38","message":"{\"id\":629458047,\"method\":\"Page.navigate\",\"params\":{\"url\":\"https://google.com\"}}"}}
{"id":1858292790,"method":"Target.sendMessageToTarget","params":{"targetId":"b5e8db2f-2a90-46dd-ad9b-284466a0ba38","message":"{\"id\":443632888,\"method\":\"Page.processNavigation\",\"params\":{\"response\":\"Proceed\",\"navigationId\":0}}"}}
{"id":1298498081,"method":"Target.createBrowserContext"}
{"id":1427131847,"method":"Target.createTarget","params":{"browserContextId":"6d6fbee5-024f-4512-bac1-ef3000d6a03a","height":500,"url":"about:blank","width":940}}
{"id":911902081,"method":"Target.attachToTarget","params":{"targetId":"b5e8db2f-2a90-46dd-ad9b-284466a0ba38"}}
{"id":637979947,"method":"Target.sendMessageToTarget","params":{"targetId":"b5e8db2f-2a90-46dd-ad9b-284466a0ba38","message":"{\"id\":629458047,\"method\":\"Page.navigate\",\"params\":{\"url\":\"https://google.com\"}}"}}
To unsubscribe from this group and stop receiving emails from it, send an email to headless-dev...@chromium.org.
To post to this group, send email to headle...@chromium.org.
{"id":911902081,"method":"Target.attachToTarget","params":{"targetId":"b5e8db2f-2a90-46dd-ad9b-284466a0ba38"}}
--
You received this message because you are subscribed to the Google Groups "headless-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to headless-dev+unsubscribe@chromium.org.
To post to this group, send email to headle...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/headless-dev/a00743b0-e91a-4891-8d67-7bf39a9f9dd7%40chromium.org.
+PavelThis sounds like a DevTools issue. I've filed a bug, could you please triage: https://bugs.chromium.org/p/chromium/issues/detail?id=739635
On 6 July 2017 at 04:58, Matthew Mueller <mattm...@gmail.com> wrote:
Just a heads up that this appears related to:
{"id":911902081,"method":"Target.attachToTarget","params":{"targetId":"b5e8db2f-2a90-46dd-ad9b-284466a0ba38"}}
I'm pretty sure I misunderstood what attachToTarget is meant for.
--
You received this message because you are subscribed to the Google Groups "headless-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to headless-dev...@chromium.org.
To post to this group, send email to headle...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/headless-dev/a00743b0-e91a-4891-8d67-7bf39a9f9dd7%40chromium.org.
--
You received this message because you are subscribed to the Google Groups "headless-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to headless-dev...@chromium.org.
To post to this group, send email to headle...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/headless-dev/CAPG_qM7Y_AbKawyzrsdwGWvaJapjgCk8LxABwu0hU9U-TgnzVQ%40mail.gmail.com.