{"action":"created","issue":{"url":"https://api.github.com/repos/electron/electron/issues/8212","repository_url":"https://api.github.com/repos/electron/electron","labels_url":"https://api.github.com/repos/electron/electron/issues/8212/labels{/name}","comments_url":"https://api.github.com/repos/electron/electron/issues/8212/comments","events_url":"https://api.github.com/repos/electron/electron/issues/8212/events","html_url":"https://github.com/electron/electron/issues/8212","id":195974932,"number":8212,"title":"Electron leaking GOOGLE_API_KEY env variable","user":{"login":"jkup","id":490294,"avatar_url":"https://avatars.githubusercontent.com/u/490294?v=3","gravatar_id":"","url":"https://api.github.com/users/jkup","html_url":"https://github.com/jkup","followers_url":"https://api.github.com/users/jkup/followers","following_url":"https://api.github.com/users/jkup/following{/other_user}","gists_url":"https://api.github.com/users/jkup/gists{/gist_id}","starred_url":"https://api.github.com/users/jkup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkup/subscriptions","organizations_url":"https://api.github.com/users/jkup/orgs","repos_url":"https://api.github.com/users/jkup/repos","events_url":"https://api.github.com/users/jkup/events{/privacy}","received_events_url":"https://api.github.com/users/jkup/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-16T03:46:18Z","updated_at":"2016-12-19T18:44:47Z","closed_at":null,"body":"<!--\r\nThanks for opening an issue! A few things to keep in mind:\r\n\r\n- The issue tracker is only for bugs and feature requests.\r\n- Before reporting a bug, please try reproducing your issue against\r\n  the latest version of Electron.\r\n- If you need general advice, join our Slack: http://atom-slack.herokuapp.com\r\n-->\r\n\r\n* Electron version: v1.4.12\r\n* Operating system: macOS Sierra\r\n\r\n### Expected behavior\r\n\r\nYou should be able to use an electron-based terminal to build an electron-based application.\r\n\r\n<!-- What do you think should happen? -->\r\n\r\n### Actual behavior\r\n\r\nUsing an electron-based terminal to build an electron-based application results in an error because of the GOOGLE_API_KEY env var.\r\n\r\n<!-- What actually happens? -->\r\n\r\n### How to reproduce\r\n\r\n<!-- For bugs, provide sample code or a repo URL that demos the problem -->\r\n\r\nTo be honest, I'm not 100% sure what's going on here or what the fix is. If you download an Electron terminal like https://github.com/zeit/hyper and try to use it to launch a dev build of another electron app like https://github.com/brave/browser-laptop you run into an error like this:\r\n\r\n```\r\nUncaught ReferenceError: AIzaSyAQfxPJiounkhOjODEO5ZieffeBv6yft2Q is not defined browser.js:148\r\n````\r\n\r\nIt turns out this is caused by Electron (and therefore Hyper) setting an env var GOOGLE_API_KEY that Brave also uses. I saw a similar issue filed against the Hyper repo (https://github.com/zeit/hyper/issues/696) but it appears that you can fix it by simply unsetting the GOOGLE_API_KEY env var.\r\n\r\nAnyway, I work at Brave and we had this issue which generated a good conversation (https://github.com/brave/browser-laptop/issues/5534#issuecomment-267507717) so I talked with @zeke about filing one here!\r\n\r\nSorry that I'm not 100% sure what's going on but please ping me if I can provide any other details!"},"comment":{"url":"https://api.github.com/repos/electron/electron/issues/comments/268044000","html_url":"https://github.com/electron/electron/issues/8212#issuecomment-268044000","issue_url":"https://api.github.com/repos/electron/electron/issues/8212","id":268044000,"user":{"login":"kevinsawicki","id":671378,"avatar_url":"https://avatars.githubusercontent.com/u/671378?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinsawicki","html_url":"https://github.com/kevinsawicki","followers_url":"https://api.github.com/users/kevinsawicki/followers","following_url":"https://api.github.com/users/kevinsawicki/following{/other_user}","gists_url":"https://api.github.com/users/kevinsawicki/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinsawicki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinsawicki/subscriptions","organizations_url":"https://api.github.com/users/kevinsawicki/orgs","repos_url":"https://api.github.com/users/kevinsawicki/repos","events_url":"https://api.github.com/users/kevinsawicki/events{/privacy}","received_events_url":"https://api.github.com/users/kevinsawicki/received_events","type":"User","site_admin":true},"created_at":"2016-12-19T18:44:47Z","updated_at":"2016-12-19T18:44:47Z","body":"> To be honest, I'm not 100% sure what's going on here\r\n\r\nIt would be great to know how/why this is breaking Brave.\r\n\r\nHow is the Brave build using/incorporating this env var such that it can lead to an uncaught `ReferenceError`?\r\n\r\nEven if Electron no longer sets it, would the Brave build still fail if the person building Brave happen to have it set via some other way like a `.bashrc` file?"}}
{"actor":{"display_login":"kevinsawicki"}}