henryboldi / felony

🔑🔥📈 Next Level PGP
MIT License
3.47k stars 130 forks source link

failed application start-up "npm run package" #41

Closed achekroud closed 8 years ago

achekroud commented 8 years ago

Hey again

I'm trying to run felony in Mac OSX. When, as instructed, I type:

adamchekroud $ npm run package

I get the following output (but no application popping up):

felony@0.10.3 package /Users/adamchekroud/felony cross-env NODE_ENV=production node -r babel-register package.js

{ default: 
   { module: { loaders: [Object] },
     output: { path: '/Users/adamchekroud/felony', filename: './main.js' },
     resolve: { extensions: [Object], packageMains: [Object] },
     plugins: [ [Object], [Object], [Object] ],
     externals: [ 'keytar', 'openpgp', 'font-awesome', 'source-map-support' ],
     devtool: 'source-map',
     entry: [ './main.development' ],
     target: 'electron-renderer',
     node: { __dirname: false, __filename: false } } }
start pack...
opts { dir: './',
  name: 'Felony',
  asar: false,
  ignore: 
   [ '/test($|/)',
     '/tools($|/)',
     '/release($|/)',
     '/main.development.js',
     '/node_modules/asar($|/)',
     '/node_modules/babel-core($|/)',
     '/node_modules/babel-eslint($|/)',
     '/node_modules/babel-loader($|/)',
     '/node_modules/babel-plugin-add-module-exports($|/)',
     '/node_modules/babel-plugin-webpack-loaders($|/)',
     '/node_modules/babel-polyfill($|/)',
     '/node_modules/babel-preset-es2015($|/)',
     '/node_modules/babel-preset-es2015-rollup($|/)',
     '/node_modules/babel-preset-react($|/)',
     '/node_modules/babel-preset-react-hmre($|/)',
     '/node_modules/babel-preset-stage-0($|/)',
     '/node_modules/babel-register($|/)',
     '/node_modules/chai($|/)',
     '/node_modules/chromedriver($|/)',
     '/node_modules/co-mocha($|/)',
     '/node_modules/concurrently($|/)',
     '/node_modules/cross-env($|/)',
     '/node_modules/css-loader($|/)',
     '/node_modules/del($|/)',
     '/node_modules/electron-packager($|/)',
     '/node_modules/electron-prebuilt($|/)',
     '/node_modules/electron-rebuild($|/)',
     '/node_modules/electron-winstaller($|/)',
     '/node_modules/eslint($|/)',
     '/node_modules/eslint-config-airbnb($|/)',
     '/node_modules/eslint-plugin-jsx-a11y($|/)',
     '/node_modules/eslint-plugin-react($|/)',
     '/node_modules/express($|/)',
     '/node_modules/extract-text-webpack-plugin($|/)',
     '/node_modules/fbjs-scripts($|/)',
     '/node_modules/file-loader($|/)',
     '/node_modules/jsdom($|/)',
     '/node_modules/json-loader($|/)',
     '/node_modules/minimist($|/)',
     '/node_modules/mocha($|/)',
     '/node_modules/node-libs-browser($|/)',
     '/node_modules/react-addons-test-utils($|/)',
     '/node_modules/redux-devtools($|/)',
     '/node_modules/redux-devtools-dock-monitor($|/)',
     '/node_modules/redux-devtools-log-monitor($|/)',
     '/node_modules/redux-logger($|/)',
     '/node_modules/rollup-plugin-babel($|/)',
     '/node_modules/selenium-webdriver($|/)',
     '/node_modules/sinon($|/)',
     '/node_modules/style-loader($|/)',
     '/node_modules/webpack($|/)',
     '/node_modules/webpack-dev-middleware($|/)',
     '/node_modules/webpack-hot-middleware($|/)',
     '/node_modules/webpack-node-externals($|/)',
     '/node_modules/babel-plugin-transform-runtime($|/)',
     '/node_modules/body-parser($|/)',
     '/node_modules/classnames($|/)',
     '/node_modules/css-modules-require-hook($|/)',
     '/node_modules/dynamics.js($|/)',
     '/node_modules/electron-debug($|/)',
     '/node_modules/immutable($|/)',
     '/node_modules/isomorphic-fetch($|/)',
     '/node_modules/lodash($|/)',
     '/node_modules/lowdb($|/)',
     '/node_modules/merge($|/)',
     '/node_modules/node-notifier($|/)',
     '/node_modules/normalize.css($|/)',
     '/node_modules/open($|/)',
     '/node_modules/os($|/)',
     '/node_modules/react($|/)',
     '/node_modules/react-copy-to-clipboard($|/)',
     '/node_modules/react-dom($|/)',
     '/node_modules/react-ladda($|/)',
     '/node_modules/react-redux($|/)',
     '/node_modules/react-router($|/)',
     '/node_modules/react-router-redux($|/)',
     '/node_modules/reactcss($|/)',
     '/node_modules/redux($|/)',
     '/node_modules/redux-thunk($|/)',
     '/node_modules/underscore-db($|/)',
     '/node_modules/url-loader($|/)',
     '/node_modules/uuid($|/)' ],
  icon: 'app/app.icns',
  version: '0.37.8',
  platform: 'darwin',
  arch: 'x64',
  prune: true,
  'app-version': '0.10.3',
  out: 'release/darwin-x64',
  'osx-sign': 
   { app: '/release/darwin-x64/Felony-darwin-x64/Felony.app',
     identity: 'xxxxxxxxx' } }
Packaging app for platform darwin x64 using electron v0.37.8
WARNING: osx-sign.app will be inferred from the main options
Code sign failed; please retry manually. { Error: Command failed: codesign --sign xxxxxxxxx -fv /var/folders/fr/2n4p2gb5233c5c810m38_jnm0000gn/T/electron-packager/darwin-x64/Felony-darwin-x64/Felony.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework
xxxxxxxxx: no identity found

    at ChildProcess.exithandler (child_process.js:207:12)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:852:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
  killed: false,
  code: 1,
  signal: null,
  cmd: 'codesign --sign xxxxxxxxx -fv /var/folders/fr/2n4p2gb5233c5c810m38_jnm0000gn/T/electron-packager/darwin-x64/Felony-darwin-x64/Felony.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework' }
darwin-x64 finished
achekroud commented 8 years ago

tagging @ameesme just in case he can solve this issue also!

ameesme commented 8 years ago

I think I can! By running that command, you're trying to create a new build including one for OSX. This requires the package to be signed with an app-id you create with your development account.

https://github.com/henryboldi/felony/blob/master/package.js#L127 Check this line.

achekroud commented 8 years ago

Hmm.. I think I'm a little lost still. If I call "npm run dev" I get this error in a popup Electron window. I'm not sure how I would make an app-id. I think this is still really aimed at people who are a lot more familiar with js and cryptography, perhaps not yet ready for people a bit out of the loop. Thanks a lot for your help though @ameesme - much appreciated.

Uncaught Exception:
TypeError: Cannot read property 'start' of undefined
    at Object.<anonymous> (main.development.js:9:1)
    at Module._compile (module.js:413:34)
    at loader (/Users/adamchekroud/felony/node_modules/babel-register/lib/node.js:158:5)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/adamchekroud/felony/node_modules/babel-register/lib/node.js:168:7)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at loadApplicationPackage (/Users/adamchekroud/felony/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/default_app.asar/main.js:253:23)
    at Object.<anonymous> (/Users/adamchekroud/felony/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/default_app.asar/main.js:293:5)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
adamkeim-pwr commented 8 years ago

@achekroud I am very familiar with JS and crypto, and am having this same problem. I'm still looking into electron, but even following the README.md, I haven't been able to get anything working

EDIT: Figured it out, if you set that ID that @ameesme mentioned to '-', you'll run it in ad-hoc signing mode, which at least for me gets the application to open...

achekroud commented 8 years ago

@tobycyanide-pwr haha, that makes me feel better. I made the edit you suggested, but the app still doensn't open for me. What command am I supposed to be inferring? npm run package executes fine and then says:

Packaging app for platform darwin x64 using electron v0.37.8
WARNING: osx-sign.app will be inferred from the main options
darwin-x64 finished

but not clear how you're supposed to start the application :s

adamkeim-pwr commented 8 years ago

@achekroud in the directory of the project, there should be a directory called release, and in there there should be a directory, which contains another directory, which contains a Felony.app file. ~/felony/release/darwin-x64/Felony-darwin-x64/Felony.app

adam-keim commented 8 years ago

At least, that's where mine is. The app doesn't start and still has a white screen, but it opens a little window, which is better than npm run dev

achekroud commented 8 years ago

@tobycyanide ok, thx, we are in identical positions then. mine does exact same.

ameesme commented 8 years ago

Funny. The same now happens for me. Not sure what is up. I'm gonna take a look at this tomorrow.

frankcash commented 8 years ago

Hello,

npm run package is to generate the package and then run as an application (i.e. Felony.app on OSX).

If you wish to just run the application you can npm run dev.

If you have more questions or concerns please feel free to comment on here and I'll re-open the issue!