Could someone help me with this, I'm running an AWS Lambda using Chromeless and Serverless, I keep getting the same error.
My code:
import Chromeless from 'chromeless'
export default async () => {
const chromeless = new Chromeless({
remote: {
endpointUrl: 'https://xxx.execute-api.eu-west-2.amazonaws.com/staging',
apiKey: 'xxx'
},
})
const screenshot = await chromeless
.goto('https://www.google.com')
.type('chromeless', 'input[name="q"]')
.screenshot()
console.log(screenshot)
await chromeless.end()
}
The error:
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Unknown command: protocol
I cant find anything online that could help, so I ran this code as a test and it still fails, it seems to fail as soon as I try and pass anything into screenshot, it doesn't work with .evaluate()
or .html()
either. If anyone could help that would be greatly appreciated I can provide any other files needed!