{"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:%20accepted","name":"GH Review: accepted","color":"009800"},{"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":8,"created_at":"2016-09-07T21:11:29Z","updated_at":"2016-09-12T20:48:22Z","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/246487785","html_url":"https://github.com/facebook/react-native/pull/9797#issuecomment-246487785","issue_url":"https://api.github.com/repos/facebook/react-native/issues/9797","id":246487785,"user":{"login":"facebook-github-bot","id":6422482,"avatar_url":"https://avatars.githubusercontent.com/u/6422482?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook-github-bot","html_url":"https://github.com/facebook-github-bot","followers_url":"https://api.github.com/users/facebook-github-bot/followers","following_url":"https://api.github.com/users/facebook-github-bot/following{/other_user}","gists_url":"https://api.github.com/users/facebook-github-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook-github-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook-github-bot/subscriptions","organizations_url":"https://api.github.com/users/facebook-github-bot/orgs","repos_url":"https://api.github.com/users/facebook-github-bot/repos","events_url":"https://api.github.com/users/facebook-github-bot/events{/privacy}","received_events_url":"https://api.github.com/users/facebook-github-bot/received_events","type":"User","site_admin":false},"created_at":"2016-09-12T20:48:22Z","updated_at":"2016-09-12T20:48:22Z","body":"Something went wrong when importing this pull request. Please cc someone from the team at fb to help with importing this."}}
{"actor":{"display_login":"facebook-github-bot"}}