Skip to content
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

Shows terminal window when auto-launch #61

Closed
MonFig opened this issue Jul 24, 2017 · 6 comments
Closed

Shows terminal window when auto-launch #61

MonFig opened this issue Jul 24, 2017 · 6 comments

Comments

@MonFig
Copy link

MonFig commented Jul 24, 2017

Hi there I met a issue that my Application shows Unix executable instead of Application in Users & Groups.

Therefore, when I login my Mac, a terminal window would open and shows

Last login: Mon Jul 24 10:20:14 on ttys000
~ /Applications/appName.app/Contents/MacOS/appName ; exit;
/Library/Caches/com.apple.xbs/Sources/AppleGVA/AppleGVA-10.1.16/Sources/Slices/Driver/AVD_loader.cpp: failed to get a service for display 3 
/Library/Caches/com.apple.xbs/Sources/AppleGVA/AppleGVA-10.1.16/Sources/Slices/Driver/AVD_loader.cpp: failed to get a service for display 4 
/Library/Caches/com.apple.xbs/Sources/AppleGVA/AppleGVA-10.1.16/Sources/Slices/Driver/AVD_loader.cpp: failed to get a service for display 5 
/Library/Caches/com.apple.xbs/Sources/AppleGVA/AppleGVA-10.1.16/Sources/Slices/Driver/AVD_loader.cpp: failed to get a service for display 6 

Once I stop the process, the application would quit.

and there is how I package the application:

"build": "concurrently \"npm run build-main\" \"npm run build-renderer\"",
build-main": "cross-env NODE_ENV=production node --trace-warnings -r babel-register ./node_modules/webpack/bin/webpack --config webpack.config.main.prod.js --colors",
    "build-renderer": "cross-env NODE_ENV=production node --trace-warnings -r babel-register ./node_modules/webpack/bin/webpack --config webpack.config.renderer.prod.js --colors",
"package": "npm run build && build --publish never",

Is there anything wrong with my code? Or is it how it supposed to be that way?

@MonFig MonFig closed this as completed Jul 26, 2017
@tahnik
Copy link

tahnik commented Oct 8, 2017

Could you please share the solution?

@benjcallaghan
Copy link

I'm having this same issue with my macOS Electron app. What was your solution?

@Eugeny
Copy link

Eugeny commented Nov 19, 2017

Apparently this is the same as #28. Trying out v 5.0.2

@MonFig
Copy link
Author

MonFig commented Nov 27, 2017

I used

  const appPath = app.getPath('exe').split('.app/Content')[0] + '.app';
  let appAutoLauncher = new AutoLaunch({
    name: 'AppName',
    path: appPath
  });

solve the problem.

@tahnik
@benjcallaghan

@MonFig
Copy link
Author

MonFig commented Nov 27, 2017

I think the origin code makes the executable file auto-lauch, and macOS wants the Application to auto-launch. So change the file's path to the application's path, because the file's path is so deep.

@benjcallaghan
Copy link

@MonFig Thank you for your response.

I upgraded to version 5.0.3 and this issue was fixed without the workaround posted above. The main window of my application opens without any terminal windows. Login Items properly shows "Application" instead of "Unix Executable".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants