docker-selenium-lambda icon indicating copy to clipboard operation
docker-selenium-lambda copied to clipboard

SessionNotCreatedException running container in aws Lambda

Open jddreher opened this issue 1 year ago • 1 comments

I am pretty new to running python via container in AWS Lambda so this may be a configuration issue but running this container directly, no modification throws this error. Do you have any ideas as to what is causing it? Dockerfile is the example in this repo, main.py is also the same. No overrides in place.

{ "errorMessage": "Message: session not created: Chrome failed to start: exited normally.\n (chrome not reachable)\n (The process started from chrome location /opt/chrome/chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)\nStacktrace:\n#0 0x56333a109c7a \n#1 0x563339dece2c \n#2 0x563339e21d6a \n#3 0x563339e1e17b \n#4 0x563339e68c49 \n#5 0x563339e5c363 \n#6 0x563339e2c247 \n#7 0x563339e2cb9e \n#8 0x56333a0d024b \n#9 0x56333a0d42f1 \n#10 0x56333a0bbafe \n#11 0x56333a0d4e52 \n#12 0x56333a0a079f \n#13 0x56333a0f9638 \n#14 0x56333a0f9810 \n#15 0x56333a108dac \n#16 0x7fddc514f7f2 start_thread\n", "errorType": "SessionNotCreatedException", "requestId": "926f1a5e-9408-4469-a008-a9971739786f", "stackTrace": [ " File "/var/task/main.py", line 24, in handler\n chrome = webdriver.Chrome(options=options, service=service)\n", " File "/var/lang/lib/python3.12/site-packages/selenium/webdriver/chrome/webdriver.py", line 45, in init\n super().init(\n", " File "/var/lang/lib/python3.12/site-packages/selenium/webdriver/chromium/webdriver.py", line 66, in init\n super().init(command_executor=executor, options=options)\n", " File "/var/lang/lib/python3.12/site-packages/selenium/webdriver/remote/webdriver.py", line 212, in init\n self.start_session(capabilities)\n", " File "/var/lang/lib/python3.12/site-packages/selenium/webdriver/remote/webdriver.py", line 299, in start_session\n response = self.execute(Command.NEW_SESSION, caps)["value"]\n", " File "/var/lang/lib/python3.12/site-packages/selenium/webdriver/remote/webdriver.py", line 354, in execute\n self.error_handler.check_response(response)\n", " File "/var/lang/lib/python3.12/site-packages/selenium/webdriver/remote/errorhandler.py", line 229, in check_response\n raise exception_class(message, screen, stacktrace)\n" ] }

jddreher avatar Jul 13 '24 13:07 jddreher