forcedotcom / LightningTestingService

Apache License 2.0
122 stars 35 forks source link

Executing force:lightning:test:run from Docker container results in Unknown Error (13) #32

Closed dancinllama closed 7 years ago

dancinllama commented 7 years ago

I'm currently getting bitbucket pipelines set up and running in a CD environment, and using LightningTestService to run lightning component tests. Bitbucket pipelines runs in a docker container.

My script fails at the following:

sfdx force:lightning:test:run -a jasmineTests.app Waiting to resolve the Lightning Experience-enabled custom domain........ ERROR running force:lightning:test:run: An error occurred when running Lightning tests. An unknown server-side error occurred while processing the command. (UnknownError:13)

I'm using the default jasmineTests.app that comes with the "LTSExamples" package, and when I issue that same command from my local machine, it works fine.

Is it possible that since the script requires a browser to open, that this won't work from a "headless flow" or container?

esalman-sfdc commented 7 years ago

I am guessing that such an error could either be due to domain resolution issues (e.g. network firewalls/proxies) or due to web-driver config issues (e.g. inability to launch a browser properly in an environment) which seems more likely based on the error message.

One of the community members had reported similar (not same) error on Travis but they were able to get around it by copying relevant pieces from .travis.yml file of the repo to their repo,

export DISPLAY=:99.0
sh -e /etc/init.d/xvfb start
sleep 3 # give xvfb some time to start

Wondering if you need something similar given this repo uses Travis/CircleCI environments to showcase CI flow and those are headless environments as well :)

By the way, the command also allows some additional webdriver controls via "-f" option. See, https://github.com/forcedotcom/LightningTestingService/issues/28

esalman-sfdc commented 6 years ago

Cross Posting (for future visitors): Possible answer for this question shared here by another user.