{"action":"created","issue":{"url":"https://api.github.com/repos/jaruba/wcjs-player/issues/72","repository_url":"https://api.github.com/repos/jaruba/wcjs-player","labels_url":"https://api.github.com/repos/jaruba/wcjs-player/issues/72/labels{/name}","comments_url":"https://api.github.com/repos/jaruba/wcjs-player/issues/72/comments","events_url":"https://api.github.com/repos/jaruba/wcjs-player/issues/72/events","html_url":"https://github.com/jaruba/wcjs-player/issues/72","id":171628128,"number":72,"title":"Crash with Electron/React stack on OS X","user":{"login":"Haraldson","id":283535,"avatar_url":"https://avatars.githubusercontent.com/u/283535?v=3","gravatar_id":"","url":"https://api.github.com/users/Haraldson","html_url":"https://github.com/Haraldson","followers_url":"https://api.github.com/users/Haraldson/followers","following_url":"https://api.github.com/users/Haraldson/following{/other_user}","gists_url":"https://api.github.com/users/Haraldson/gists{/gist_id}","starred_url":"https://api.github.com/users/Haraldson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Haraldson/subscriptions","organizations_url":"https://api.github.com/users/Haraldson/orgs","repos_url":"https://api.github.com/users/Haraldson/repos","events_url":"https://api.github.com/users/Haraldson/events{/privacy}","received_events_url":"https://api.github.com/users/Haraldson/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":18,"created_at":"2016-08-17T10:48:21Z","updated_at":"2016-08-18T14:05:58Z","closed_at":"2016-08-18T12:47:06Z","body":"With the following [boiled down] code, I get a crash in Electron when the Stream component mounts;\r\n\r\n```javascript\r\nimport React, { PropTypes } from 'react'\r\nimport Player from 'wcjs-player'\r\nimport wcp from 'wcjs-prebuilt'\r\n\r\nvar Stream = React.createClass({\r\n    propTypes: {\r\n        stream: PropTypes.shape({\r\n            id: PropTypes.string.isRequired,\r\n            url: PropTypes.string.isRequired\r\n        })\r\n    },\r\n\r\n    addPlayer() {\r\n        this.player = new Player('#player-' + this.props.stream.id).addPlayer({\r\n            autoplay: true,\r\n            wcjs: wcp\r\n        })\r\n\r\n        this.player.vlc.play(this.props.stream.url) // Same result with this.player.addPlaylist(...)\r\n    },\r\n\r\n    componentDidMount() {\r\n        this.addPlayer()\r\n    },\r\n\r\n    render() {\r\n        return (\r\n            <div className='stream'>\r\n                <div id={'player-' + this.props.stream.id}></div>\r\n            </div>\r\n        )\r\n    }\r\n})\r\n\r\nexport default Stream\r\n```\r\n\r\nThe crash comes with no error messages, but the entire app disappears (only the Electron frame with white/no content is left) and ‘DevTools was disconnected from the page.’ As for that last DevTools error, I’ve read that this happens often with infinite loops, and if so, that infinite loop would be somewhere in the `wcjs-player` code as this doesn’t occur until the player is attempted initialized.\r\n\r\nIf I import jQuery and `console.log($('#player-' + this.props.stream.id'))` within the `componentDidMount` method, it finds the player element just fine.\r\n\r\nAny tips on this? I’ve been stuck for days and haven’t really found any helpful resources."},"comment":{"url":"https://api.github.com/repos/jaruba/wcjs-player/issues/comments/240733105","html_url":"https://github.com/jaruba/wcjs-player/issues/72#issuecomment-240733105","issue_url":"https://api.github.com/repos/jaruba/wcjs-player/issues/72","id":240733105,"user":{"login":"RSATom","id":1049634,"avatar_url":"https://avatars.githubusercontent.com/u/1049634?v=3","gravatar_id":"","url":"https://api.github.com/users/RSATom","html_url":"https://github.com/RSATom","followers_url":"https://api.github.com/users/RSATom/followers","following_url":"https://api.github.com/users/RSATom/following{/other_user}","gists_url":"https://api.github.com/users/RSATom/gists{/gist_id}","starred_url":"https://api.github.com/users/RSATom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RSATom/subscriptions","organizations_url":"https://api.github.com/users/RSATom/orgs","repos_url":"https://api.github.com/users/RSATom/repos","events_url":"https://api.github.com/users/RSATom/events{/privacy}","received_events_url":"https://api.github.com/users/RSATom/received_events","type":"User","site_admin":false},"created_at":"2016-08-18T14:05:58Z","updated_at":"2016-08-18T14:05:58Z","body":"I've added link to readme. Thanks!"}}
{"actor":{"display_login":"RSATom"}}