Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with AWS Lambda and taiko #487

Closed
ricardoaxel opened this issue Apr 15, 2019 · 4 comments
Closed

Problem with AWS Lambda and taiko #487

ricardoaxel opened this issue Apr 15, 2019 · 4 comments

Comments

@ricardoaxel
Copy link

I tried to run a taiko program for an autologin function in a Lambda, I upload in S3 the project with all the node_modules that it requires but when i try to run a test it shows me on the cloudwatch registers:

START RequestId: c5614e48-968e-47aa-bf07-a6d99e8e1721 Version: $LATEST
2019-04-15T17:40:00.632Z	c5614e48-968e-47aa-bf07-a6d99e8e1721	TypeError: openBrowser is not a function
    at /var/task/index.js:9:19
    at revivirCentinela (/var/task/index.js:28:7)
    at exports.handler (/var/task/index.js:2:2)
END RequestId: c5614e48-968e-47aa-bf07-a6d99e8e1721
REPORT RequestId: c5614e48-968e-47aa-bf07-a6d99e8e1721	Duration: 126.55 ms	Billed Duration: 200 ms 	Memory Size: 256 MB	Max Memory Used: 65 MB	
@Apoorva-GA
Copy link
Contributor

@ricardoaxel Could you let us know how you are running the chromium instance?
One way is you can launch chrome remotely and connect to that port and host while opening browser. something like : openBrowser({host:'yourHost', port:'yourPort'})
Do let us know if this works.
We will try to spike this out and try to put up an example.

@Apoorva-GA
Copy link
Contributor

@ricardoaxel Just had a look at the code and currently giving a host and port wont work as we are spawning process and then fetching the host and port from that. This has to be changed in taiko.

@NivedhaSenthil
Copy link
Member

There are different ways to run scripts in lambda, one is we can install serverless-chrome and provide that as browser to taiko using TAIKO_BROWSER_PATH and another way is to spawn a browser remotely and connect to it which currently needs some change in taiko.

shubhamsc added a commit that referenced this issue Jun 20, 2019
BugDiver pushed a commit that referenced this issue Jun 21, 2019
@BugDiver
Copy link
Member

The required changes have been added to taiko. Here is the example project running taiko with AWS Lambda. https://github.com/shubhamsc/taiko-serverless-chrome

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

No branches or pull requests

5 participants