-
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
RequestError: connect ECONNREFUSED 127.0.0.1:9515 #862
Comments
The same error in github actions platform Windows this happened after update spectron from v12 to v13
but I think that error is comming from WDIO updates in new spectron. Its have the same error in the same test testing with wdio without spectron.
|
I can reproduce the same error on my app. I'm struggling to make it pass without getting the Here's my spec file: import path from 'path';
import os from 'os';
import { Application, SpectronClient } from 'spectron';
import { BrowserWindow } from 'electron';
import NavBarPage from './pages/navbar';
import FirstRunPage from './pages/firstrun';
import * as TestUtils from './utils/TestUtils';
const electronPath = require('electron');
TestUtils.setupJestTimeout();
let app: Application;
let client: SpectronClient;
let browserWindow: BrowserWindow;
let navBarPage: NavBarPage;
let firstRunPage: FirstRunPage;
beforeAll(async() => {
app = new Application({
path: electronPath as any,
args: [path.dirname(__dirname)],
chromeDriverArgs: [
'--no-sandbox',
'--whitelisted-ips=',
'--disable-dev-shm-usage',
],
webdriverLogPath: './',
});
await app.start();
client = app.client;
browserWindow = app.browserWindow;
navBarPage = new NavBarPage(app);
firstRunPage = new FirstRunPage(app);
});
beforeEach(async() => {
await app.client.waitUntilWindowLoaded();
});
afterAll(async() => {
if (app && app.isRunning()) {
await app.stop();
}
});
describe('Test App Desktop - Fist Run', () => {
if (process.env.CI) {
it('should open settings page - First Run', async() => {
const k8sSettings = await firstRunPage.getK8sVersionHeaderText();
const acceptBtnSelector = '[data-test="accept-btn"]';
expect(k8sSettings).toBe('Welcome to App Desktop');
(await client.$(acceptBtnSelector)).waitForExist();
(await client.$(acceptBtnSelector)).click();
});
} else {
it('should open General the main window', async() => {
const title = await browserWindow.getTitle();
expect(title).toBe('App Desktop');
});
}
});
describe('App Desktop - Main Pages', () => {
it('should display welcome message in general tab', async() => {
const title = await browserWindow.getTitle();
await client.waitUntilTextExists(title, 'App Desktop', 10000);
const generalPage = await navBarPage.getGeneralPage();
expect(generalPage).not.toBeNull();
expect(await generalPage?.getTitle()).toBe('Welcome to App Desktop');
});
}); Versions: Spectron: v14.0.0
Electron: v12.0.18
jest: v24.9.0
webdriverio: v6.9.1 Any insights will be very appreciated. |
I am also facing the same issue. Any help is appreciated. Thanks |
My 2 cents... move to Playwright. |
A node change did it for me, I installed |
I suddenly started getting this error in some mocha tests that had been running just fine. The code is something like this:
and the full error is
I put some logging in and it seems to be happening on the first line, which is weird because I use the exact same syntax in a previous test and it works just fine. I have double-checked that #blah does, in fact, exist in the DOM. My instinct is that something I did is causing the socket to hang up, but the "socket hang up" message is the only hint I have.
This same error occurs on both Mac and Windows. I am using Spectron ^11.1.0 with Electron ^9.1.1.
Elsewhere (in the Webdriver issues, I think) I have found something about a problem with the version of "got" that is used, but I didn't have any luck going down that road.
I can't, for the life of me, find anything in a diff that would have caused this.
Thanks in advance for any help.
The text was updated successfully, but these errors were encountered: