{"action":"created","issue":{"url":"https://api.github.com/repos/syncthing/syncthing-android/issues/1157","repository_url":"https://api.github.com/repos/syncthing/syncthing-android","labels_url":"https://api.github.com/repos/syncthing/syncthing-android/issues/1157/labels{/name}","comments_url":"https://api.github.com/repos/syncthing/syncthing-android/issues/1157/comments","events_url":"https://api.github.com/repos/syncthing/syncthing-android/issues/1157/events","html_url":"https://github.com/syncthing/syncthing-android/pull/1157","id":333096576,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1Mzk3NDc5","number":1157,"title":"Show meaningful error message if config file is missing (fixes #1156)","user":{"login":"Catfriend1","id":16361913,"node_id":"MDQ6VXNlcjE2MzYxOTEz","avatar_url":"https://avatars1.githubusercontent.com/u/16361913?v=4","gravatar_id":"","url":"https://api.github.com/users/Catfriend1","html_url":"https://github.com/Catfriend1","followers_url":"https://api.github.com/users/Catfriend1/followers","following_url":"https://api.github.com/users/Catfriend1/following{/other_user}","gists_url":"https://api.github.com/users/Catfriend1/gists{/gist_id}","starred_url":"https://api.github.com/users/Catfriend1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Catfriend1/subscriptions","organizations_url":"https://api.github.com/users/Catfriend1/orgs","repos_url":"https://api.github.com/users/Catfriend1/repos","events_url":"https://api.github.com/users/Catfriend1/events{/privacy}","received_events_url":"https://api.github.com/users/Catfriend1/received_events","type":"User","site_admin":false},"labels":[{"id":82100195,"node_id":"MDU6TGFiZWw4MjEwMDE5NQ==","url":"https://api.github.com/repos/syncthing/syncthing-android/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":{"login":"Catfriend1","id":16361913,"node_id":"MDQ6VXNlcjE2MzYxOTEz","avatar_url":"https://avatars1.githubusercontent.com/u/16361913?v=4","gravatar_id":"","url":"https://api.github.com/users/Catfriend1","html_url":"https://github.com/Catfriend1","followers_url":"https://api.github.com/users/Catfriend1/followers","following_url":"https://api.github.com/users/Catfriend1/following{/other_user}","gists_url":"https://api.github.com/users/Catfriend1/gists{/gist_id}","starred_url":"https://api.github.com/users/Catfriend1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Catfriend1/subscriptions","organizations_url":"https://api.github.com/users/Catfriend1/orgs","repos_url":"https://api.github.com/users/Catfriend1/repos","events_url":"https://api.github.com/users/Catfriend1/events{/privacy}","received_events_url":"https://api.github.com/users/Catfriend1/received_events","type":"User","site_admin":false},"assignees":[{"login":"Catfriend1","id":16361913,"node_id":"MDQ6VXNlcjE2MzYxOTEz","avatar_url":"https://avatars1.githubusercontent.com/u/16361913?v=4","gravatar_id":"","url":"https://api.github.com/users/Catfriend1","html_url":"https://github.com/Catfriend1","followers_url":"https://api.github.com/users/Catfriend1/followers","following_url":"https://api.github.com/users/Catfriend1/following{/other_user}","gists_url":"https://api.github.com/users/Catfriend1/gists{/gist_id}","starred_url":"https://api.github.com/users/Catfriend1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Catfriend1/subscriptions","organizations_url":"https://api.github.com/users/Catfriend1/orgs","repos_url":"https://api.github.com/users/Catfriend1/repos","events_url":"https://api.github.com/users/Catfriend1/events{/privacy}","received_events_url":"https://api.github.com/users/Catfriend1/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-06-17T22:03:46Z","updated_at":"2018-06-17T23:03:58Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/syncthing/syncthing-android/pulls/1157","html_url":"https://github.com/syncthing/syncthing-android/pull/1157","diff_url":"https://github.com/syncthing/syncthing-android/pull/1157.diff","patch_url":"https://github.com/syncthing/syncthing-android/pull/1157.patch"},"body":"in WebGuiActivity#loadCaCert\r\n\r\nPurpose\r\nIssue #1156 should be rare to occur. I can only imagine it occuring after a manual permission change on the /data/data/com.nutomic.syncthingandroid/files folder took place or the config got corrupted somehow. Root cause of the FileNotFoundException is a config file missing that is crucial for syncthing's operation. So this PR is about catching the error and displaying a meaningful error message to the user instead of bailing out of the app with android's default \"app crashed\" dialog.\r\n\r\nMentioned in the list of issues in #1146.\r\n\r\nTesting\r\nVerified working at commit https://github.com/syncthing/syncthing-android/pull/1157/commits/68a6a3878ffd130512f28ac1fc0248c026db8620 on device lg-h815 running Android 7.1.2. I simulated the root cause of the FNF error by deleting https-cert.pem from syncthing's \"files\" subfolder on the data partition with root explorer."},"comment":{"url":"https://api.github.com/repos/syncthing/syncthing-android/issues/comments/397912421","html_url":"https://github.com/syncthing/syncthing-android/pull/1157#issuecomment-397912421","issue_url":"https://api.github.com/repos/syncthing/syncthing-android/issues/1157","id":397912421,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NzkxMjQyMQ==","user":{"login":"Catfriend1","id":16361913,"node_id":"MDQ6VXNlcjE2MzYxOTEz","avatar_url":"https://avatars1.githubusercontent.com/u/16361913?v=4","gravatar_id":"","url":"https://api.github.com/users/Catfriend1","html_url":"https://github.com/Catfriend1","followers_url":"https://api.github.com/users/Catfriend1/followers","following_url":"https://api.github.com/users/Catfriend1/following{/other_user}","gists_url":"https://api.github.com/users/Catfriend1/gists{/gist_id}","starred_url":"https://api.github.com/users/Catfriend1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Catfriend1/subscriptions","organizations_url":"https://api.github.com/users/Catfriend1/orgs","repos_url":"https://api.github.com/users/Catfriend1/repos","events_url":"https://api.github.com/users/Catfriend1/events{/privacy}","received_events_url":"https://api.github.com/users/Catfriend1/received_events","type":"User","site_admin":false},"created_at":"2018-06-17T23:03:58Z","updated_at":"2018-06-17T23:03:58Z","author_association":"CONTRIBUTOR","body":"Verified working at commit https://github.com/syncthing/syncthing-android/pull/1157/commits/68a6a3878ffd130512f28ac1fc0248c026db8620 on device lg-h815 running Android 7.1.2. I simulated the root cause of the FNF error by deleting https-cert.pem from syncthing's \"files\" subfolder on the data partition with root explorer.\r\n\r\nScreenshots\r\n![image](https://user-images.githubusercontent.com/16361913/41512913-44e2c366-7293-11e8-948b-4393d04c70ea.png)\r\n\r\nAfter manually exiting the app gracefully from the Drawer UI and launching it again, syncthing binary regenerated the missing file and the app works correctly. WebGuiActivity UI can then be openend without error.\r\n\r\n![image](https://user-images.githubusercontent.com/16361913/41512938-79d6b122-7293-11e8-91b2-92b89dab54cd.png)\r\n"}}
{"actor":{"display_login":"Catfriend1"}}