{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/9797","repository_url":"https://api.github.com/repos/facebook/react-native","labels_url":"https://api.github.com/repos/facebook/react-native/issues/9797/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/9797/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/9797/events","html_url":"https://github.com/facebook/react-native/pull/9797","id":175607541,"number":9797,"title":"Catch Throwable instead of Exception from loadLibrary","user":{"login":"felipecsl","id":190648,"avatar_url":"https://avatars.githubusercontent.com/u/190648?v=3","gravatar_id":"","url":"https://api.github.com/users/felipecsl","html_url":"https://github.com/felipecsl","followers_url":"https://api.github.com/users/felipecsl/followers","following_url":"https://api.github.com/users/felipecsl/following{/other_user}","gists_url":"https://api.github.com/users/felipecsl/gists{/gist_id}","starred_url":"https://api.github.com/users/felipecsl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felipecsl/subscriptions","organizations_url":"https://api.github.com/users/felipecsl/orgs","repos_url":"https://api.github.com/users/felipecsl/repos","events_url":"https://api.github.com/users/felipecsl/events{/privacy}","received_events_url":"https://api.github.com/users/felipecsl/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/react-native/labels/Android","name":"Android","color":"bfe5bf"},{"url":"https://api.github.com/repos/facebook/react-native/labels/CLA%20Signed","name":"CLA Signed","color":"e7e7e7"},{"url":"https://api.github.com/repos/facebook/react-native/labels/GH%20Review:%20needs-revision","name":"GH Review: needs-revision","color":"e11d21"},{"url":"https://api.github.com/repos/facebook/react-native/labels/Import%20Failed","name":"Import Failed","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":25,"created_at":"2016-09-07T21:11:29Z","updated_at":"2016-09-28T22:07:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/facebook/react-native/pulls/9797","html_url":"https://github.com/facebook/react-native/pull/9797","diff_url":"https://github.com/facebook/react-native/pull/9797.diff","patch_url":"https://github.com/facebook/react-native/pull/9797.patch"},"body":"**Summary**\r\n\r\nWe're seeing cases where RN initialization fails due to:\r\n`UnsatisfiedLinkError: could find DSO to load: libreactnativejni.so`\r\nWe're using `NativeModuleCallExceptionHandler` to catch initialization\r\nexceptions and prevent the app from crashing. However, since\r\n`UnsatisfiedLinkerError` is an `Error` instead of `Exception`, it is not\r\ncaught and thus the app crashes anyways.\r\nThis change fixes that by catching `Throwable` instead of `Exception`\r\nfrom `XReactInstanceManagerImpl.doInBackground()`. I also had to change\r\n`Result.of()` to take a `Throwable` as well, thus a few other places had\r\nto be updated as well.\r\n\r\n**Test plan**\r\n\r\nAll tests pass, throwing an `Error` from `SoLoader.loadLibrary()` is correctly caught\r\nand reported to `NativeModuleCallExceptionHandler`"},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/250315900","html_url":"https://github.com/facebook/react-native/pull/9797#issuecomment-250315900","issue_url":"https://api.github.com/repos/facebook/react-native/issues/9797","id":250315900,"user":{"login":"felipecsl","id":190648,"avatar_url":"https://avatars.githubusercontent.com/u/190648?v=3","gravatar_id":"","url":"https://api.github.com/users/felipecsl","html_url":"https://github.com/felipecsl","followers_url":"https://api.github.com/users/felipecsl/followers","following_url":"https://api.github.com/users/felipecsl/following{/other_user}","gists_url":"https://api.github.com/users/felipecsl/gists{/gist_id}","starred_url":"https://api.github.com/users/felipecsl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felipecsl/subscriptions","organizations_url":"https://api.github.com/users/felipecsl/orgs","repos_url":"https://api.github.com/users/felipecsl/repos","events_url":"https://api.github.com/users/felipecsl/events{/privacy}","received_events_url":"https://api.github.com/users/felipecsl/received_events","type":"User","site_admin":false},"created_at":"2016-09-28T22:07:28Z","updated_at":"2016-09-28T22:07:28Z","body":"Also we don't want to crash the app at startup because RN failed to initialize. Most of the app is still usable. While you won't be able to use the RN flows, the rest works fine and we want to gracefully recover from that"}}
{"actor":{"display_login":"felipecsl"}}