{"action":"created","issue":{"url":"https://api.github.com/repos/nodegit/nodegit/issues/1066","repository_url":"https://api.github.com/repos/nodegit/nodegit","labels_url":"https://api.github.com/repos/nodegit/nodegit/issues/1066/labels{/name}","comments_url":"https://api.github.com/repos/nodegit/nodegit/issues/1066/comments","events_url":"https://api.github.com/repos/nodegit/nodegit/issues/1066/events","html_url":"https://github.com/nodegit/nodegit/issues/1066","id":164655436,"number":1066,"title":"Electron Builder asar error","user":{"login":"jojobyte","id":184880,"avatar_url":"https://avatars.githubusercontent.com/u/184880?v=3","gravatar_id":"","url":"https://api.github.com/users/jojobyte","html_url":"https://github.com/jojobyte","followers_url":"https://api.github.com/users/jojobyte/followers","following_url":"https://api.github.com/users/jojobyte/following{/other_user}","gists_url":"https://api.github.com/users/jojobyte/gists{/gist_id}","starred_url":"https://api.github.com/users/jojobyte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jojobyte/subscriptions","organizations_url":"https://api.github.com/users/jojobyte/orgs","repos_url":"https://api.github.com/users/jojobyte/repos","events_url":"https://api.github.com/users/jojobyte/events{/privacy}","received_events_url":"https://api.github.com/users/jojobyte/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":16,"created_at":"2016-07-09T07:37:42Z","updated_at":"2016-07-19T22:49:20Z","closed_at":null,"body":"Been spawning child processes for git and wanted to switch to nodegit, but keep getting this error after installing then trying to build the Dist.\r\n\r\n```sh\r\nPackaging for platform mac x64 using electron 1.2.6 to dist/mac\r\n\r\nError: File \"~/workspace/repos/electron-app/dist/mac/electron_app.app/Contents/Resources/app.asar\" is corrupted: SyntaxError: Unexpected end of JSON input\r\n    at Object.<anonymous> (~/workspace/repos/electron-app/node_modules/electron-builder/src/asarUtil.ts:66:13)\r\nFrom previous event:\r\n    at tsAwaiter (~/workspace/repos/electron-app/node_modules/electron-builder/src/util/awaiter.ts:10:47)\r\n    at Object.build (~/workspace/repos/electron-app/node_modules/electron-builder/src/builder.ts:190:52)\r\n    at Object.<anonymous> (~/workspace/repos/electron-app/node_modules/electron-builder/src/build-cli.ts:27:28)\r\n    at Module._compile (module.js:541:32)\r\n    at Object.Module._extensions..js (module.js:550:10)\r\n    at Module.load (module.js:458:32)\r\n    at tryModuleLoad (module.js:417:12)\r\n    at Function.Module._load (module.js:409:3)\r\n    at Module.runMain (module.js:575:10)\r\n    at run (node.js:348:7)\r\n    at startup (node.js:140:9)\r\n    at node.js:463:3\r\n\r\nnpm ERR! Darwin 15.5.0\r\nnpm ERR! argv \"/usr/local/bin/node\" \"~/.npm-global/bin/npm\" \"run\" \"dist\"\r\nnpm ERR! node v6.2.2\r\nnpm ERR! npm  v3.10.5\r\nnpm ERR! code ELIFECYCLE\r\nnpm ERR! electron_app@0.0.1 dist: `build`\r\nnpm ERR! Exit status 255\r\nnpm ERR! \r\nnpm ERR! Failed at the electron_app@0.0.1 dist script 'build'.\r\nnpm ERR! Make sure you have the latest version of node.js and npm installed.\r\nnpm ERR! If you do, this is most likely a problem with the electron_app package,\r\nnpm ERR! not with npm itself.\r\nnpm ERR! Tell the author that this fails on your system:\r\nnpm ERR!     build\r\nnpm ERR! You can get information on how to open an issue for this project with:\r\nnpm ERR!     npm bugs electron_app\r\nnpm ERR! Or if that isn't available, you can get their info via:\r\nnpm ERR!     npm owner ls electron_app\r\nnpm ERR! There is likely additional logging output above.\r\n\r\nnpm ERR! Please include the following file with any support request:\r\nnpm ERR!     ~/workspace/repos/electron-app/npm-debug.log\r\n```\r\n\r\nIf I remove nodegit it builds correctly. If I disable asar it also builds correctly.\r\n\r\n```sh\r\n# .npmrc\r\nruntime = electron\r\ntarget = 1.2.6\r\ntarget_arch = x64\r\ndisturl = https://atom.io/download/atom-shell\r\nprogress = true\r\nbuild_from_source = true\r\n```\r\n\r\nWhile this log is from OSX, this same error happens on Windows 10.\r\n\r\nAny ideas? Need more info?"},"comment":{"url":"https://api.github.com/repos/nodegit/nodegit/issues/comments/233789996","html_url":"https://github.com/nodegit/nodegit/issues/1066#issuecomment-233789996","issue_url":"https://api.github.com/repos/nodegit/nodegit/issues/1066","id":233789996,"user":{"login":"jojobyte","id":184880,"avatar_url":"https://avatars.githubusercontent.com/u/184880?v=3","gravatar_id":"","url":"https://api.github.com/users/jojobyte","html_url":"https://github.com/jojobyte","followers_url":"https://api.github.com/users/jojobyte/followers","following_url":"https://api.github.com/users/jojobyte/following{/other_user}","gists_url":"https://api.github.com/users/jojobyte/gists{/gist_id}","starred_url":"https://api.github.com/users/jojobyte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jojobyte/subscriptions","organizations_url":"https://api.github.com/users/jojobyte/orgs","repos_url":"https://api.github.com/users/jojobyte/repos","events_url":"https://api.github.com/users/jojobyte/events{/privacy}","received_events_url":"https://api.github.com/users/jojobyte/received_events","type":"User","site_admin":false},"created_at":"2016-07-19T22:49:20Z","updated_at":"2016-07-19T22:49:20Z","body":"Okay, it worked on my windows laptop as is, but if you set `build.asar` to `true` in package.json in the project root you get the original error I was reporting."}}
{"actor":{"display_login":"jojobyte"}}