-
Notifications
You must be signed in to change notification settings - Fork 228
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
Error: DevToolsActivePort file doesn't exist #929
Comments
I'm having the same issue. The app needs some time to show the screen. Might this be the issue? |
@bsherman-better can I see how you are instantiating your spectron's |
Same issue here. This happens on my MacOS dev machine. When I reboot the computer I can successfully run the tests with Spectron once after reboot. But then all following test runs (until I reboot) produce the error for every test in the suite. I can see the app opening in the desktop environment and the GUI shows up (and even the tests are executed before my eyes). What's also happening is that a second instance of the app opens up in the dock and immediately closes again about 10 times. Jest also doesn't exist properly once all the tests have failed:
Versions:
I create the app like this:
|
After some digging I found a possible cause for my issue, maybe it will also help others: The Node process of the electron app remained open after the tests were terminated. The result was that the normal app startup was disrupted and WebDriver couldn't connect to Electron's Chrome instance. I already had these lines to terminate Spectron after the tests were finished:
I added |
I still have this problem. I can run headless in the terminal not in the docker container. Can you show me your Dockerfile? |
It's been really weird the spectron behaviour on Docker containers. FROM ubuntu:20.04
ARG GITHUB_CLONE_KEY
ENV GITHUB_CLONE_KEY=$GITHUB_CLONE_KEY \
WORKDIRAPP=/opt/rd/rancher-desktop \
BRANCH=main \
NODE_VER=16
##
## Set up install
##
RUN apt update && apt upgrade -y && apt dist-upgrade -y && apt install software-properties-common wget curl -y \
&& apt update -y \
&& curl -fsSL https://deb.nodesource.com/setup_${NODE_VER}.x | bash - \
&& apt install --no-install-recommends --no-upgrade \
git nodejs unzip g++ make gnupg2 debconf-utils vim -y
##
## Installing deps for xvfb server
##
RUN apt install xvfb libxtst6 libxss1 libgtk2.0-0 libnss3 libasound2 libgconf-2-4 -y
##
## Pre test image setup
##
WORKDIR $WORKDIRAPP
RUN git clone --depth=1 --branch $BRANCH https://${GITHUB_CLONE_KEY}@github.com/xpto/xpto.git $WORKDIRAPP \
&& npm install || true
WORKDIR $WORKDIRAPP |
I'm having the same issue.
|
Hi @stephanieraymos |
Use Playwright. Don't use this anymore. |
This is a work application and the tests are running fine for others. So getting the whole team on board to switch soon is unlikely. Hoping to find a solution of some kind for now. |
I'm attempting to build and run a docker container for end to end testing of my electron app. I'm receiving the following error:
Has anyone run into this and found a solution?
The text was updated successfully, but these errors were encountered: