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

_XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created. #10

Open
paulchill opened this issue Sep 3, 2019 · 7 comments

Comments

@paulchill
Copy link

When i execute the stock tutorial to start in a docker lambda image I get :

_XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.

Any help would be great. i can't get Xfvb to work!

@dimkir
Copy link
Owner

dimkir commented Sep 4, 2019

Hmm... Maybe discussion under this thread can give you some pointers: https://phabricator.wikimedia.org/T202710

Seems like problem may be related to mismatch of users when executing container...

@paulchill
Copy link
Author

Thanks, v much. I think that helps.

Can chrome extensions be added into electron with nightmare?

@dimkir
Copy link
Owner

dimkir commented Sep 6, 2019

If I paraphrase your question:

Can chrome extensions be added into electron using nightmare commands at runtime?

If I have to guess, my thoughts would be: essentially nightmare probably communicates with Chrome via some kind of 'webdriver/selenium protocol'. If that protocol allows adding extensions at runtime then it will, if it doesn't allow adding extensions at runtime - then it doesn't.

I found this link https://electronjs.org/docs/tutorial/devtools-extension which shows that there's some kind of API for adding some extensions at some moment of Electron lifecycle. Maybe it may help you.

Can chrome extensions be added into electron, so that when I test some pages via nightmare at runtime, the extension is enabled?

This question basically boils down to: can I create custom assembly/package of Electron with some chrome extensions bundled.

Again you may check the same page https://electronjs.org/docs/tutorial/devtools-extension to investigate whether "some API, some extensions, at some time" translates into "right API for my extension, in the right moment of Electron lifecycle". Hope this helps.

ps. Also if you have future questions, please post them as separate threads.
pps. Also if you have solved the original "_XSERVTransmkdir" issue, would be awesome if you describe what worked for you and why you were actually getting it.

@dzmitry-kankalovich
Copy link

dzmitry-kankalovich commented Jun 11, 2021

I hit the same problem.

Followed instructions here https://www.npmjs.com/package/aws-lambda-ric and made image which passes local test, per instruction.

However, deployed to actual lambda it fails with

_XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.

The problem seems to be in the fact that Xvfb - for whatever weird reason - wants root access to create that folder - it's not going to happen in Lambda.

Is there anything we can do about it? I wonder how it used to work before

@adatta02
Copy link

I hit this problem trying to use Xvfb on a different project (and hit this issue via Google). If you launch Xvfb with "-nolisten tcp -nolisten unix" I can confirm that does work on Lambda. My full entrypoint for a nodejs based Lambda is:

xvfb-run -e /dev/stdout -s "-screen 0 1280x1024x24 -ac -nolisten tcp -nolisten unix" /usr/bin/npx aws-lambda-ric app.handler

@DiMiTriFrog
Copy link

I hit this problem trying to use Xvfb on a different project (and hit this issue via Google). If you launch Xvfb with "-nolisten tcp -nolisten unix" I can confirm that does work on Lambda. My full entrypoint for a nodejs based Lambda is:

xvfb-run -e /dev/stdout -s "-screen 0 1280x1024x24 -ac -nolisten tcp -nolisten unix" /usr/bin/npx aws-lambda-ric app.handler

Could you share Dockerfile or code?

@adatta02
Copy link

adatta02 commented Jun 1, 2022

@DiMiTriFrog sure thing. This is specific to editly

I also added aws-lambda-ric via npm to the editly package.json

https://gist.github.com/adatta02/a2cebb9105051a526ce3f8b2c1cb16b5

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

No branches or pull requests

5 participants