-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
[BUG] Unable to Execute Binary File in Local Development #42
Comments
I believe this is the same issue raised in #27, but the identified root cause there isn't applicable since I'm already using x64. Any help would be greatly appreciated! |
Having the same issue, did you manage to find any workaround? |
@kaykhan I was not, unfortunately 😞 I ended up switching over to playwright-aws-lambda and have had much better luck! It worked right out of the box |
Does sls offline run a docker container similar to how aws sam does their testing? If so, you might need to make the binaries available to the container, whether that's making them production dependencies, or layers, etc.. You can also try the @sparticuz/chromium-min package and provide a location for the files. If you don't need a newer version of chromium, playwright-aws-lamda looks extremely similar to chrome-aws-lambda. The main difference being that chromium is over two years old! |
Just to clarify but this problem does not only just exists with |
If you specify the package as a production dependency does it work? |
@Sparticuz @kaykhan For further clarification to my posts above, Using this package as a production dependency, everything works perfectly in deployed environments! But I'm still seeing the same error described above in which my local environment seems unable to run the inflated executable file. Would you mind sharing where you're sourcing these binaries @Sparticuz? I don't know if there are any OS-related gotchas here, but my hunch is that there might be. I'm also going to try running my project on my Linux machine this weekend to see if this local dev issue is still present there |
Ive been installing via |
https://github.com/Sparticuz/chromium/tree/master/_/ansible |
Im still experiecing this problem locally running package.json
code
node v18 is there anything obvious you can see im doing wrong?
|
Environment
chromium
Version: 109puppeteer
/puppeteer-core
Version: 19.5.2Expected Behavior
The chromium binary should execute
Current Behavior
Steps to Reproduce
Lambda function code example:
The console logs confirm that my lambda is running is node 16 and that the chromium.exectubalePath() is pointing to /tmp/chromium.
The function blows up when I try to launch the browser:
const browser = await puppeteer.launch({
When I open /tmp/chromium and attempt to execute the file, I also get
zsh: exec format error: ./chromium
. This leads me to believe there may be an issue with the chromium binary filePossible Solution
The text was updated successfully, but these errors were encountered: