{"action":"created","issue":{"url":"https://api.github.com/repos/testfairy/react-native-testfairy/issues/18","repository_url":"https://api.github.com/repos/testfairy/react-native-testfairy","labels_url":"https://api.github.com/repos/testfairy/react-native-testfairy/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/testfairy/react-native-testfairy/issues/18/comments","events_url":"https://api.github.com/repos/testfairy/react-native-testfairy/issues/18/events","html_url":"https://github.com/testfairy/react-native-testfairy/issues/18","id":314626077,"number":18,"title":"hideView() doesn't always work on Android","user":{"login":"dmitryn","id":23836,"avatar_url":"https://avatars2.githubusercontent.com/u/23836?v=4","gravatar_id":"","url":"https://api.github.com/users/dmitryn","html_url":"https://github.com/dmitryn","followers_url":"https://api.github.com/users/dmitryn/followers","following_url":"https://api.github.com/users/dmitryn/following{/other_user}","gists_url":"https://api.github.com/users/dmitryn/gists{/gist_id}","starred_url":"https://api.github.com/users/dmitryn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmitryn/subscriptions","organizations_url":"https://api.github.com/users/dmitryn/orgs","repos_url":"https://api.github.com/users/dmitryn/repos","events_url":"https://api.github.com/users/dmitryn/events{/privacy}","received_events_url":"https://api.github.com/users/dmitryn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-04-16T12:21:12Z","updated_at":"2018-04-24T13:30:52Z","closed_at":null,"author_association":"NONE","body":"`TestFairy.hideView()` doesn't always hide view on Android when you call it from `componentDidMount` like described in example code https://docs.testfairy.com/SDK/Hiding_Sensitive_Data.html#react-native\r\n\r\n```\r\nconst TestFairy = require('react-native-testfairy');\r\nvar MyComponent = React.createClass({\r\n\r\n    componentDidMount: function() {\r\n        TestFairyBridge.hideView(this.refs.instructions);\r\n    },\r\n\r\n    render: function() {\r\n        return (<Text ref=\"instructions\">This will be hidden</Text>);\r\n    }\r\n});\r\n```\r\n\r\nIt happens because `activity.findViewById()`  returns null sometimes https://github.com/testfairy/react-native-testfairy/blob/64acb8734b89cf12e9eca2028afdd607b1117d7b/android/src/main/java/com/testfairy/react/TestFairyModule.java#L223\r\n\r\nVersions:\r\n\"react-native: \"0.53.3\"\r\n\"react-native-testfairy\": \"2.8.0\""},"comment":{"url":"https://api.github.com/repos/testfairy/react-native-testfairy/issues/comments/383931094","html_url":"https://github.com/testfairy/react-native-testfairy/issues/18#issuecomment-383931094","issue_url":"https://api.github.com/repos/testfairy/react-native-testfairy/issues/18","id":383931094,"user":{"login":"vijaysharm","id":1824094,"avatar_url":"https://avatars3.githubusercontent.com/u/1824094?v=4","gravatar_id":"","url":"https://api.github.com/users/vijaysharm","html_url":"https://github.com/vijaysharm","followers_url":"https://api.github.com/users/vijaysharm/followers","following_url":"https://api.github.com/users/vijaysharm/following{/other_user}","gists_url":"https://api.github.com/users/vijaysharm/gists{/gist_id}","starred_url":"https://api.github.com/users/vijaysharm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vijaysharm/subscriptions","organizations_url":"https://api.github.com/users/vijaysharm/orgs","repos_url":"https://api.github.com/users/vijaysharm/repos","events_url":"https://api.github.com/users/vijaysharm/events{/privacy}","received_events_url":"https://api.github.com/users/vijaysharm/received_events","type":"User","site_admin":false},"created_at":"2018-04-24T13:30:52Z","updated_at":"2018-04-24T13:30:52Z","author_association":"MEMBER","body":"After working with @dmitryn, we discovered that there was a bug that has since been resolved in version [2.9.0](https://github.com/testfairy/react-native-testfairy/releases/tag/2.9.0) with [this](https://github.com/testfairy/react-native-testfairy/commit/eefa6fc27bffc8511af2861904d8094ede46d4e3#diff-d065ca42a85ed777a30038ea12e63e35) commit"}}
{"actor":{"display_login":"vijaysharm"}}