{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/issues/52","labels_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/issues/52/labels{/name}","comments_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/issues/52/comments","events_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/issues/52/events","html_url":"https://github.com/facebook/ios-snapshot-test-case/issues/52","id":44661942,"number":52,"title":"Empty view snapshots","user":{"login":"ashfurrow","id":498212,"avatar_url":"https://avatars.githubusercontent.com/u/498212?v=3","gravatar_id":"","url":"https://api.github.com/users/ashfurrow","html_url":"https://github.com/ashfurrow","followers_url":"https://api.github.com/users/ashfurrow/followers","following_url":"https://api.github.com/users/ashfurrow/following{/other_user}","gists_url":"https://api.github.com/users/ashfurrow/gists{/gist_id}","starred_url":"https://api.github.com/users/ashfurrow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashfurrow/subscriptions","organizations_url":"https://api.github.com/users/ashfurrow/orgs","repos_url":"https://api.github.com/users/ashfurrow/repos","events_url":"https://api.github.com/users/ashfurrow/events{/privacy}","received_events_url":"https://api.github.com/users/ashfurrow/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2014-10-02T08:28:22Z","updated_at":"2015-01-16T01:55:12Z","closed_at":null,"body":"Hey all. I'm having a really weird, intermittent problem when I try and snapshot a view belonging to a controller that's been loaded from a Storyboard in iOS 8. Lots of details of what I've tried so far are [here](http://stackoverflow.com/questions/26156660/empty-uiview-snapshots-from-view-controller-loaded-from-storyboard-in-xctest-tes), but the gist of it is that the image rendered from `drawViewHierarchyInRect` is empty – the correct size, but transparent. \r\n\r\nHas anyone else seen this?"},"comment":{"url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/issues/comments/70196997","html_url":"https://github.com/facebook/ios-snapshot-test-case/issues/52#issuecomment-70196997","issue_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/issues/52","id":70196997,"user":{"login":"toddlee","id":169621,"avatar_url":"https://avatars.githubusercontent.com/u/169621?v=3","gravatar_id":"","url":"https://api.github.com/users/toddlee","html_url":"https://github.com/toddlee","followers_url":"https://api.github.com/users/toddlee/followers","following_url":"https://api.github.com/users/toddlee/following{/other_user}","gists_url":"https://api.github.com/users/toddlee/gists{/gist_id}","starred_url":"https://api.github.com/users/toddlee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toddlee/subscriptions","organizations_url":"https://api.github.com/users/toddlee/orgs","repos_url":"https://api.github.com/users/toddlee/repos","events_url":"https://api.github.com/users/toddlee/events{/privacy}","received_events_url":"https://api.github.com/users/toddlee/received_events","type":"User","site_admin":false},"created_at":"2015-01-16T01:55:12Z","updated_at":"2015-01-16T01:55:12Z","body":"For what it's worth..\r\n\r\nIt seems like when auto layout is involved, it almost always fails. However, pausing by putting a breakpoint makes it pass which made me think this is related to timing issue.\r\nAnd.. with this code,\r\n\r\n```\r\n    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, NSEC_PER_SEC), dispatch_get_main_queue(), ^{\r\n        UBSnapshotVerifyView(view, @\"Should pass!\");\r\n    });\r\n```\r\nI confirmed that it always passes (at least I didn't get any intermittent failure).. so it is definitely related to some timing issue. Until someone has a correct fix, I'll stick to this hack.."}}