{"action":"created","issue":{"url":"https://api.github.com/repos/atom/electron/issues/2488","labels_url":"https://api.github.com/repos/atom/electron/issues/2488/labels{/name}","comments_url":"https://api.github.com/repos/atom/electron/issues/2488/comments","events_url":"https://api.github.com/repos/atom/electron/issues/2488/events","html_url":"https://github.com/atom/electron/issues/2488","id":100620756,"number":2488,"title":"Error on quit","user":{"login":"frozeman","id":232662,"avatar_url":"https://avatars.githubusercontent.com/u/232662?v=3","gravatar_id":"","url":"https://api.github.com/users/frozeman","html_url":"https://github.com/frozeman","followers_url":"https://api.github.com/users/frozeman/followers","following_url":"https://api.github.com/users/frozeman/following{/other_user}","gists_url":"https://api.github.com/users/frozeman/gists{/gist_id}","starred_url":"https://api.github.com/users/frozeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frozeman/subscriptions","organizations_url":"https://api.github.com/users/frozeman/orgs","repos_url":"https://api.github.com/users/frozeman/repos","events_url":"https://api.github.com/users/frozeman/events{/privacy}","received_events_url":"https://api.github.com/users/frozeman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-12T19:49:00Z","updated_at":"2015-08-14T20:16:55Z","closed_at":null,"body":"If i quit the application using `cmd+Q` sometimes i get the following error:\r\n\r\n```\r\n[30224:0813/105526:WARNING:proxy_message_pipe_endpoint.cc(50)] Failed to write enqueue message to channel\r\n[30224:0813/105526:WARNING:channel.cc(315)] RawChannel write error\r\nmodule.js:336\r\n    throw err;\r\n          ^\r\nError: Cannot find module 'dialog'\r\n    at Function.Module._resolveFilename (module.js:334:15)\r\n    at Function.Module._load (module.js:284:25)\r\n    at Module.require (module.js:363:17)\r\n    at require (module.js:382:17)\r\n    at process.<anonymous> (/usr/local/lib/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/atom.asar/browser/lib/init.js:45:12)\r\n    at emitOne (events.js:77:13)\r\n    at process.emit (events.js:169:7)\r\n    at process._fatalException (node.js:219:26)\r\n```\r\n\r\nThe main problem is that, when the app is killed with an error, chromium doesnt write the changes of the localstorage to disk and therefor loose them!"},"comment":{"url":"https://api.github.com/repos/atom/electron/issues/comments/131228706","html_url":"https://github.com/atom/electron/issues/2488#issuecomment-131228706","issue_url":"https://api.github.com/repos/atom/electron/issues/2488","id":131228706,"user":{"login":"etiktin","id":4381579,"avatar_url":"https://avatars.githubusercontent.com/u/4381579?v=3","gravatar_id":"","url":"https://api.github.com/users/etiktin","html_url":"https://github.com/etiktin","followers_url":"https://api.github.com/users/etiktin/followers","following_url":"https://api.github.com/users/etiktin/following{/other_user}","gists_url":"https://api.github.com/users/etiktin/gists{/gist_id}","starred_url":"https://api.github.com/users/etiktin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etiktin/subscriptions","organizations_url":"https://api.github.com/users/etiktin/orgs","repos_url":"https://api.github.com/users/etiktin/repos","events_url":"https://api.github.com/users/etiktin/events{/privacy}","received_events_url":"https://api.github.com/users/etiktin/received_events","type":"User","site_admin":false},"created_at":"2015-08-14T20:16:55Z","updated_at":"2015-08-14T20:16:55Z","body":"From the stack trace it seems that closing the app caused an exception which was caught by electron's default `uncaughtException` handler. Then the handler tried to show and error dialog, but it failed to require the `dialog` module.\r\nIt will be interesting to know why it failed to load the `dialog` module, but for the time being you might be able to circumvent it. If you set you'r own handler for `uncaughtException`, the default handler won't try to show the error message, so if you're not going to show it in your handler, the exit should proceed successfully. Another thing you might want to try, is to require the dialog module in your main process. Once you require it, it should be cached, so the next time it's requested it should be served from the cache, which might solve the issue as well."}}