{"action":"created","issue":{"url":"https://api.github.com/repos/electron/electron/issues/8181","repository_url":"https://api.github.com/repos/electron/electron","labels_url":"https://api.github.com/repos/electron/electron/issues/8181/labels{/name}","comments_url":"https://api.github.com/repos/electron/electron/issues/8181/comments","events_url":"https://api.github.com/repos/electron/electron/issues/8181/events","html_url":"https://github.com/electron/electron/issues/8181","id":194822679,"number":8181,"title":"Setcookies throwing errors","user":{"login":"notanark","id":18622720,"avatar_url":"https://avatars.githubusercontent.com/u/18622720?v=3","gravatar_id":"","url":"https://api.github.com/users/notanark","html_url":"https://github.com/notanark","followers_url":"https://api.github.com/users/notanark/followers","following_url":"https://api.github.com/users/notanark/following{/other_user}","gists_url":"https://api.github.com/users/notanark/gists{/gist_id}","starred_url":"https://api.github.com/users/notanark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/notanark/subscriptions","organizations_url":"https://api.github.com/users/notanark/orgs","repos_url":"https://api.github.com/users/notanark/repos","events_url":"https://api.github.com/users/notanark/events{/privacy}","received_events_url":"https://api.github.com/users/notanark/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-12-11T09:47:38Z","updated_at":"2016-12-13T18:16:35Z","closed_at":"2016-12-13T18:14:54Z","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: 1.4\r\n* Operating system: windows\r\n\r\n### Expected behavior\r\nAfter taking from cookies.get I should be able to use the same output to cookies.set\r\n\r\n### Actual behavior\r\nError: Setting cookie failed\r\n    at Error (native)\r\n\r\n### How to reproduce\r\n\r\n\r\nWhen a browser window closes I want to nab it's cookies and store them. I don't want to use your system because the user might want to export the cookies and use them on another machine. I'm developing something to allow people to browse on multiple machines using the same cookies.\r\n```\r\n\r\nfunction ChildBrowserClose(e) {\r\nconsole.log(e.sender);\r\n    e\r\n        .sender\r\n        .webContents\r\n        .session\r\n        .cookies\r\n        .get({}, (error, cookies) => {\r\n            e.sender.CustomSession.Cookies = JSON.stringify(cookies);\r\n            var Sessions = app\r\n                .Session\r\n                .get('Sessions')\r\n            Sessions\r\n                .find({id: e.sender.CustomSession.id})\r\n                .assign(e.sender.CustomSession)\r\n                .value()\r\n            console.log(error, cookies)\r\n        });\r\n\r\n}\r\n```\r\n-----------------------\r\n\r\nlater I try to set with\r\n\r\n```\r\n  for(var i=0;i<Cookies.length;i++){ \r\n            NewBrowser\r\n                .webContents\r\n                .session\r\n                .cookies\r\n                .set(Cookies[i], (error) => {\r\n                    console.log(error);\r\n                });\r\n            }\r\n```\r\n\r\nError: Setting cookie failed\r\n    at Error (native)\r\n<!-- For bugs, provide sample code or a repo URL that demos the problem -->\r\n"},"comment":{"url":"https://api.github.com/repos/electron/electron/issues/comments/266817319","html_url":"https://github.com/electron/electron/issues/8181#issuecomment-266817319","issue_url":"https://api.github.com/repos/electron/electron/issues/8181","id":266817319,"user":{"login":"notanark","id":18622720,"avatar_url":"https://avatars.githubusercontent.com/u/18622720?v=3","gravatar_id":"","url":"https://api.github.com/users/notanark","html_url":"https://github.com/notanark","followers_url":"https://api.github.com/users/notanark/followers","following_url":"https://api.github.com/users/notanark/following{/other_user}","gists_url":"https://api.github.com/users/notanark/gists{/gist_id}","starred_url":"https://api.github.com/users/notanark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/notanark/subscriptions","organizations_url":"https://api.github.com/users/notanark/orgs","repos_url":"https://api.github.com/users/notanark/repos","events_url":"https://api.github.com/users/notanark/events{/privacy}","received_events_url":"https://api.github.com/users/notanark/received_events","type":"User","site_admin":false},"created_at":"2016-12-13T18:16:35Z","updated_at":"2016-12-13T18:16:35Z","body":"Probably is, but if someone finds this and wants the answer: parse url from domain it works fine.  You may close"}}
{"actor":{"display_login":"notanark"}}