{"action":"created","issue":{"url":"https://api.github.com/repos/electron/spectron/issues/41","repository_url":"https://api.github.com/repos/electron/spectron","labels_url":"https://api.github.com/repos/electron/spectron/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/electron/spectron/issues/41/comments","events_url":"https://api.github.com/repos/electron/spectron/issues/41/events","html_url":"https://github.com/electron/spectron/issues/41","id":156161487,"number":41,"title":"Error when running demo - \"self.client.init if not a function\"","user":{"login":"DinisCruz","id":656739,"avatar_url":"https://avatars.githubusercontent.com/u/656739?v=3","gravatar_id":"","url":"https://api.github.com/users/DinisCruz","html_url":"https://github.com/DinisCruz","followers_url":"https://api.github.com/users/DinisCruz/followers","following_url":"https://api.github.com/users/DinisCruz/following{/other_user}","gists_url":"https://api.github.com/users/DinisCruz/gists{/gist_id}","starred_url":"https://api.github.com/users/DinisCruz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DinisCruz/subscriptions","organizations_url":"https://api.github.com/users/DinisCruz/orgs","repos_url":"https://api.github.com/users/DinisCruz/repos","events_url":"https://api.github.com/users/DinisCruz/events{/privacy}","received_events_url":"https://api.github.com/users/DinisCruz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-05-22T16:59:16Z","updated_at":"2016-05-22T22:45:14Z","closed_at":null,"body":"I'm trying to run the basic demo and am receiving this error\r\n![image](https://cloud.githubusercontent.com/assets/656739/15455244/9ffa8e38-2046-11e6-8f11-cc63452dd795.png)\r\n\r\nI tracked it to here where the ```self.client.init().``` value is not defined (in https://github.com/electron/spectron/blob/db2d66733dbd79c3d8aeed5427e591ac579a89fc/lib/application.js#L153) \r\n\r\n![image](https://cloud.githubusercontent.com/assets/656739/15455228/67d1a38e-2046-11e6-99cb-3f061273115d.png)\r\n\r\nIt is caused by the fact that the object returned from https://github.com/electron/spectron/blob/db2d66733dbd79c3d8aeed5427e591ac579a89fc/lib/application.js#L141 does not have an ```.init() function\r\n\r\nHere is the code (which is based on the main example):\r\n\r\n```\r\nelectron_Prebuild = require('electron-prebuilt')\r\n\r\nelectronPath = '/Users/diniscruz/GitHub_REPOS/BSIMM-Graphs/node_modules/electron-prebuilt/dist/Electron.app/Contents/MacOS/Electron'\r\nappPath      = '/Users/diniscruz/GitHub_REPOS/BSIMM-Graphs/test-spectron/electron-apps/web-view'\r\n\r\nvar Application = require('spectron').Application\r\nvar assert = require('assert')\r\n\r\ndescribe('application launch 2', function () {\r\n    this.timeout(10000)\r\n\r\n    beforeEach(function () {\r\n        this.app = new Application({\r\n            path: electronPath,\r\n            args: [appPath]\r\n        })\r\n        return this.app.start()\r\n    })\r\n\r\n    afterEach(function () {\r\n        if (this.app && this.app.isRunning()) {\r\n            return this.app.stop()\r\n        }\r\n    })\r\n\r\n    it('shows an initial window', function () {\r\n        return this.app.client.getWindowCount().then(function (count) {\r\n            assert.equal(count, 1)\r\n        })\r\n    })\r\n})\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/electron/spectron/issues/comments/220861254","html_url":"https://github.com/electron/spectron/issues/41#issuecomment-220861254","issue_url":"https://api.github.com/repos/electron/spectron/issues/41","id":220861254,"user":{"login":"DinisCruz","id":656739,"avatar_url":"https://avatars.githubusercontent.com/u/656739?v=3","gravatar_id":"","url":"https://api.github.com/users/DinisCruz","html_url":"https://github.com/DinisCruz","followers_url":"https://api.github.com/users/DinisCruz/followers","following_url":"https://api.github.com/users/DinisCruz/following{/other_user}","gists_url":"https://api.github.com/users/DinisCruz/gists{/gist_id}","starred_url":"https://api.github.com/users/DinisCruz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DinisCruz/subscriptions","organizations_url":"https://api.github.com/users/DinisCruz/orgs","repos_url":"https://api.github.com/users/DinisCruz/repos","events_url":"https://api.github.com/users/DinisCruz/events{/privacy}","received_events_url":"https://api.github.com/users/DinisCruz/received_events","type":"User","site_admin":false},"created_at":"2016-05-22T22:45:14Z","updated_at":"2016-05-22T22:45:14Z","body":"And the travis execution is at https://travis-ci.org/DinisCruz/BSIMM-Graphs-QA \r\n\r\n![image](https://cloud.githubusercontent.com/assets/656739/15456938/37e56e5e-2077-11e6-88ef-54e55474e64d.png)\r\n"}}
{"actor":{"display_login":"DinisCruz"}}