Timeout exceeded when trying to follow quick start example
See original GitHub issueI have a working Electron app, and I just tried getting started with spectron following the example:
const Application = require('spectron').Application
const assert = require('assert')
const electronPath = require('electron')
const path = require('path')
let settingsPath = null
describe('Application launch', function () {
this.timeout(10000)
beforeEach(function () {
this.app = new Application({
path: electronPath,
args: [path.join(__dirname, '..')]
})
return this.app.start()
})
afterEach(function () {
if (this.app && this.app.isRunning()) {
return this.app.stop()
}
})
it('spawns the tray', function () {
return this.app.client.getWindowCount().then(function (count) {
assert.equal(count, 0)
})
})
})
npm test
starts the app, and then after the timeout elapses, it prints:
$ npm test
> radiamagent@0.0.1 test path
> mocha
Application launch
1) "before each" hook for "spawns the tray"
0 passing (10s)
1 failing
1) Application launch
"before each" hook for "spawns the tray":
Error: Timeout of 10000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (path\test\spec.js)
This happens no matter how long I set the timeout. I’ve noticed that console.log()
functions will fire if I add them to the beforeEach()
block, but not it()
. And this happens on Windows and Mac. Any ideas?
Issue Analytics
- State:
- Created 5 years ago
- Comments:13
Top Results From Across the Web
Troubleshooting Timeout exceeded for HTTPS POST?
The system API that is being used is experiencing "timeout exceeded" errors when connecting to a SugarCRM REST API using HTTPS. The errors...
Read more >How to Fix a Lock Wait Timeout Exceeded Error in MySQL
This blog post covers the implications of a MySQL InnoDB lock wait timeout error, how to deal with it, and how to track...
Read more >mysql - Getting "Lock wait timeout exceeded; try restarting ...
To keep with the example of the OP, this should have worked: mysql> set autocommit=0;. mysql> update customer set account_import_id = 1; commit;....
Read more >A Complete Guide to Timeouts in Node.js
The above example sets the server timeout to 5 seconds so that inactive connections (when no data is being transferred in either direction) ......
Read more >How to Get to the Bottom of Network Timeout Issues
That concept is that this kind of problem occurs because the request exceeds the set timeout time, and this setting may come from...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
After hours of tests, this is the configuration worked for me, exactly this part
chromeDriverArgs: ['remote-debugging-port=9222']
:downgrade to “spectron”: “^6.0.0” fix myproblem