question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cannot start application

See original GitHub issue

Hello.

I started working with spectron, and to get me feet wet I wrote the following script:

var Application = require("spectron").Application;
var myapp = new Application({ path: "C:\\Users\\ben\\AppData\\Local\\app\\app.exe" });

myapp.start();
console.log("app now running");
myapp.stop();
console.log("app now closed");

However, when I run the script, I get the following result: (node:13764) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Application not running

I have a feeling this has something to do with how I input the application path. What am I doing wrong? Has anyone else had this issue?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
HairyMaclarycommented, Jan 30, 2018

I took your code and managed to get the same error. I fixed it by placing it inside a test suite and running with my testing framework, which for me is Jest.

var Application = require("spectron").Application;
describe('Application launch', () => {

   beforeEach(() => {
      this.app = new Application({
         path: '/Applications/AppName/Contents/MacOS/App'
      });
      return this.app.start();
   });

   afterEach(() => {
      if(this.app && this.app.isRunning()) { 
         return this.app.stop(); 
      }
   });

   test('true is true', async () => {
      expect.assertions(1);
   
      expect(true).toBe(true);
   });
})

This is adapted from here.

I ran:

npm run test-ui-singleFile

which relates to this command in my package.json:

"test-ui-singleFile": "jest testDoc"

0reactions
karthik1407scommented, Jun 29, 2018

@theBenRaskin Hi, I am having the same issue with starting the application. can you elaborate on applications running in the background and usage of taskkill to kill the opened instances of the application…/

Thanks in advance, Karthik

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix Cannot Start the Application (CE-30005-8) Error on PS4
Cannot start the application CE-30005-8 means that either the game's disc is corrupt or your PS4 console “thinks” that its hard disk drive...
Read more >
How To Fix PS4 CE-30005-8 Error (Cannot Start Application)
Ensure that software is fully updated. · Get rid of mods. · Clean game disc. · Delete game data from hard drive. ·...
Read more >
Fix PS4 Cannot Start The Application (CE-30005-8) Error
Fix PS4 Cannot Start The Application (CE-30005-8) Error ; 1.1 Clean The Disc ; 1.2 Restart The PS4 Console ; 1.3 Reinstall Game...
Read more >
"Cannot start Application Installer" - Brother
"Cannot start Application Installer" ... This issue may occur if the downloaded software installer's directory can't be accessed. To resolve this issue, you...
Read more >
Cannot Start the Application (CE-30005-8) | Fixed by Experts
When you see the error message: Cannot Start the Application (CE-30005-8), it means there's a hardware failure that has occurred. If none of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found