{"action":"created","issue":{"url":"https://api.github.com/repos/PeerioTechnologies/peerio-desktop/issues/264","repository_url":"https://api.github.com/repos/PeerioTechnologies/peerio-desktop","labels_url":"https://api.github.com/repos/PeerioTechnologies/peerio-desktop/issues/264/labels{/name}","comments_url":"https://api.github.com/repos/PeerioTechnologies/peerio-desktop/issues/264/comments","events_url":"https://api.github.com/repos/PeerioTechnologies/peerio-desktop/issues/264/events","html_url":"https://github.com/PeerioTechnologies/peerio-desktop/pull/264","id":308657657,"number":264,"title":"feat: handle update failures","user":{"login":"dchest","id":52677,"avatar_url":"https://avatars2.githubusercontent.com/u/52677?v=4","gravatar_id":"","url":"https://api.github.com/users/dchest","html_url":"https://github.com/dchest","followers_url":"https://api.github.com/users/dchest/followers","following_url":"https://api.github.com/users/dchest/following{/other_user}","gists_url":"https://api.github.com/users/dchest/gists{/gist_id}","starred_url":"https://api.github.com/users/dchest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dchest/subscriptions","organizations_url":"https://api.github.com/users/dchest/orgs","repos_url":"https://api.github.com/users/dchest/repos","events_url":"https://api.github.com/users/dchest/events{/privacy}","received_events_url":"https://api.github.com/users/dchest/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-26T17:04:34Z","updated_at":"2018-05-09T16:56:27Z","closed_at":"2018-05-09T16:56:27Z","author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/PeerioTechnologies/peerio-desktop/pulls/264","html_url":"https://github.com/PeerioTechnologies/peerio-desktop/pull/264","diff_url":"https://github.com/PeerioTechnologies/peerio-desktop/pull/264.diff","patch_url":"https://github.com/PeerioTechnologies/peerio-desktop/pull/264.patch"},"body":"#### Relevant info and issue\r\n\r\nWhen starting, Peerio checks if the last update failed (this is designed\r\nto happen when starting a new version right after the update), and if\r\nso, it will show the error to the user and ask them to try the update\r\nagain, download the new version manually, or continue use the current\r\n(older) version.\r\n\r\nThis also changes the \"update is ready to install\" dialog from alert()\r\nto PeerUI Dialog and introduces another dialog to indicate that the\r\nupdate is in progress.\r\n\r\nLanguages are now loaded before mounting the root component to avoid\r\nrace condition when something may have been showed before translations\r\nare initialized.\r\n\r\n#### PR links \r\n\r\nCopy: https://github.com/PeerioTechnologies/peerio-icebear/pull/169\r\n\r\n#### Screenshots\r\n\r\nWhen update fails and Peerio launches, the user is presented this dialog (also, autologin is not performed):\r\n\r\n![screen shot 2018-03-26 at 17 27 17](https://user-images.githubusercontent.com/52677/37920161-6a43836a-3126-11e8-95c3-36d9b39d07a1.png)\r\n\r\n* When clicking on \"Continue using older version\", the dialog disappears and update info cleanup is performed, so that this dialog won't be shown again.\r\n* When clicking on \"Download manually\", Peerio opens a web browser with the download page, performs cleanup, and quits.\r\n* When clicking \"Try again\", Peerio will try to install the update again (this may involve re-downloading it) and shows the following status dialog permanently until it quits:\r\n\r\n<img width=\"1062\" alt=\"screen shot 2018-03-26 at 14 50 14\" src=\"https://user-images.githubusercontent.com/52677/37920291-c37134f0-3126-11e8-9feb-b66387f6368f.png\">\r\n\r\n(in case of error, it will restart and will again show the failed update dialog).\r\n\r\n---\r\n\r\nUnrelated to update failures, there's also a new dialog asking to install update instead of `alert()` that was shown before.  This dialog is temporary, just retaining the current behavior, until a better update workflow is implemented from this user story https://app.clubhouse.io/peerio/story/2097/desktop-auto-download-and-install-update-on-app-reload:\r\n\r\n![screen shot 2018-03-26 at 18 33 19](https://user-images.githubusercontent.com/52677/37920366-f723ef9a-3126-11e8-92ef-2dec51e4dbb7.png)\r\n\r\nClicking on OK now shows the same update status as in the screenshot above so that users aren't kept guessing what's going on.\r\n \r\n#### Testing instructions  \r\n\r\nThe whole update flow needs re-testing, so please 2 staging releases again.\r\n\r\nXXX: need to figure out how to test failures.\r\n\r\n----\r\n### Repository owner\r\n\r\n- [ ] Was tested and can be merged.\r\n- [ ] PR name follows conventional changelog format.\r\n\r\n[PR guideline](https://github.com/PeerioTechnologies/peerio-icebear/blob/dev/docs/CONTRIBUTING.md)\r\n"},"comment":{"url":"https://api.github.com/repos/PeerioTechnologies/peerio-desktop/issues/comments/387805296","html_url":"https://github.com/PeerioTechnologies/peerio-desktop/pull/264#issuecomment-387805296","issue_url":"https://api.github.com/repos/PeerioTechnologies/peerio-desktop/issues/264","id":387805296,"user":{"login":"dchest","id":52677,"avatar_url":"https://avatars2.githubusercontent.com/u/52677?v=4","gravatar_id":"","url":"https://api.github.com/users/dchest","html_url":"https://github.com/dchest","followers_url":"https://api.github.com/users/dchest/followers","following_url":"https://api.github.com/users/dchest/following{/other_user}","gists_url":"https://api.github.com/users/dchest/gists{/gist_id}","starred_url":"https://api.github.com/users/dchest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dchest/subscriptions","organizations_url":"https://api.github.com/users/dchest/orgs","repos_url":"https://api.github.com/users/dchest/repos","events_url":"https://api.github.com/users/dchest/events{/privacy}","received_events_url":"https://api.github.com/users/dchest/received_events","type":"User","site_admin":false},"created_at":"2018-05-09T16:56:27Z","updated_at":"2018-05-09T16:56:27Z","author_association":"MEMBER","body":"Closing in favor of https://github.com/PeerioTechnologies/peerio-desktop/pull/287"}}
{"actor":{"display_login":"dchest"}}