{"action":"created","issue":{"url":"https://api.github.com/repos/twilio/video-quickstart-android/issues/284","repository_url":"https://api.github.com/repos/twilio/video-quickstart-android","labels_url":"https://api.github.com/repos/twilio/video-quickstart-android/issues/284/labels{/name}","comments_url":"https://api.github.com/repos/twilio/video-quickstart-android/issues/284/comments","events_url":"https://api.github.com/repos/twilio/video-quickstart-android/issues/284/events","html_url":"https://github.com/twilio/video-quickstart-android/issues/284","id":314061016,"number":284,"title":"Supported formats could not be retrieved because an error occurred connecting to the camera service","user":{"login":"rishabhja","id":21194759,"avatar_url":"https://avatars0.githubusercontent.com/u/21194759?v=4","gravatar_id":"","url":"https://api.github.com/users/rishabhja","html_url":"https://github.com/rishabhja","followers_url":"https://api.github.com/users/rishabhja/followers","following_url":"https://api.github.com/users/rishabhja/following{/other_user}","gists_url":"https://api.github.com/users/rishabhja/gists{/gist_id}","starred_url":"https://api.github.com/users/rishabhja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rishabhja/subscriptions","organizations_url":"https://api.github.com/users/rishabhja/orgs","repos_url":"https://api.github.com/users/rishabhja/repos","events_url":"https://api.github.com/users/rishabhja/events{/privacy}","received_events_url":"https://api.github.com/users/rishabhja/received_events","type":"User","site_admin":false},"labels":[{"id":334623840,"url":"https://api.github.com/repos/twilio/video-quickstart-android/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":{"login":"aaalaniz","id":1734140,"avatar_url":"https://avatars3.githubusercontent.com/u/1734140?v=4","gravatar_id":"","url":"https://api.github.com/users/aaalaniz","html_url":"https://github.com/aaalaniz","followers_url":"https://api.github.com/users/aaalaniz/followers","following_url":"https://api.github.com/users/aaalaniz/following{/other_user}","gists_url":"https://api.github.com/users/aaalaniz/gists{/gist_id}","starred_url":"https://api.github.com/users/aaalaniz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaalaniz/subscriptions","organizations_url":"https://api.github.com/users/aaalaniz/orgs","repos_url":"https://api.github.com/users/aaalaniz/repos","events_url":"https://api.github.com/users/aaalaniz/events{/privacy}","received_events_url":"https://api.github.com/users/aaalaniz/received_events","type":"User","site_admin":false},"assignees":[{"login":"aaalaniz","id":1734140,"avatar_url":"https://avatars3.githubusercontent.com/u/1734140?v=4","gravatar_id":"","url":"https://api.github.com/users/aaalaniz","html_url":"https://github.com/aaalaniz","followers_url":"https://api.github.com/users/aaalaniz/followers","following_url":"https://api.github.com/users/aaalaniz/following{/other_user}","gists_url":"https://api.github.com/users/aaalaniz/gists{/gist_id}","starred_url":"https://api.github.com/users/aaalaniz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaalaniz/subscriptions","organizations_url":"https://api.github.com/users/aaalaniz/orgs","repos_url":"https://api.github.com/users/aaalaniz/repos","events_url":"https://api.github.com/users/aaalaniz/events{/privacy}","received_events_url":"https://api.github.com/users/aaalaniz/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2018-04-13T10:52:40Z","updated_at":"2018-04-13T14:54:57Z","closed_at":null,"author_association":"NONE","body":"### Description\r\n\r\nApp crashes due to the following error log. It did not crash before beta 5 version. \r\n\r\n### Steps to Reproduce\r\n\r\n1. Give permissions to camera.\r\n2. App crashes when local camera stream is created.\r\n\r\n#### Logs\r\n\r\n```\r\njava.lang.RuntimeException: Unable to resume activity {to.go_internal/to.go.app.twilio.VideoConferenceActivity}: java.lang.IllegalStateException: Supported formats could not be retrieved because an error occurred connecting to the camera service\r\n\tat android.app.ActivityThread.performResumeActivity(ActivityThread.java:3486) ~[na:0.0]\r\n\tat android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3526) ~[na:0.0]\r\n\tat android.app.ActivityThread$H.handleMessage(ActivityThread.java:1584) ~[na:0.0]\r\n\tat android.os.Handler.dispatchMessage(Handler.java:102) ~[na:0.0]\r\n\tat android.os.Looper.loop(Looper.java:163) ~[na:0.0]\r\n\tat android.app.ActivityThread.main(ActivityThread.java:6321) ~[na:0.0]\r\n\tat java.lang.reflect.Method.invoke(Native Method) ~[na:0.0]\r\n\tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:880) ~[na:0.0]\r\n\tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:770) ~[na:0.0]\r\nCaused by: java.lang.IllegalStateException: Supported formats could not be retrieved because an error occurred connecting to the camera service\r\n\tat com.twilio.video.Preconditions.checkState(Preconditions.java:453) ~[na:0.0]\r\n\tat com.twilio.video.CameraCapturer.getSupportedFormats(CameraCapturer.java:347) ~[na:0.0]\r\n\tat com.twilio.video.LocalVideoTrack.create(LocalVideoTrack.java:154) ~[na:0.0]\r\n\r\n```\r\n\r\n#### Expected Behavior\r\n\r\nApp should not crash\r\n\r\n#### Actual Behavior\r\n\r\nApp crashes\r\n\r\n#### Reproduces how Often\r\n\r\n100%\r\n\r\n### Versions\r\n\r\n#### Video Android SDK\r\n\r\n2.0.0 beta 5\r\n\r\n#### Android API\r\n\r\n23-27\r\n\r\n#### Android Device\r\n\r\nOne Plus, Xiaomi\r\n"},"comment":{"url":"https://api.github.com/repos/twilio/video-quickstart-android/issues/comments/381161539","html_url":"https://github.com/twilio/video-quickstart-android/issues/284#issuecomment-381161539","issue_url":"https://api.github.com/repos/twilio/video-quickstart-android/issues/284","id":381161539,"user":{"login":"aaalaniz","id":1734140,"avatar_url":"https://avatars3.githubusercontent.com/u/1734140?v=4","gravatar_id":"","url":"https://api.github.com/users/aaalaniz","html_url":"https://github.com/aaalaniz","followers_url":"https://api.github.com/users/aaalaniz/followers","following_url":"https://api.github.com/users/aaalaniz/following{/other_user}","gists_url":"https://api.github.com/users/aaalaniz/gists{/gist_id}","starred_url":"https://api.github.com/users/aaalaniz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaalaniz/subscriptions","organizations_url":"https://api.github.com/users/aaalaniz/orgs","repos_url":"https://api.github.com/users/aaalaniz/repos","events_url":"https://api.github.com/users/aaalaniz/events{/privacy}","received_events_url":"https://api.github.com/users/aaalaniz/received_events","type":"User","site_admin":false},"created_at":"2018-04-13T14:54:57Z","updated_at":"2018-04-13T14:54:57Z","author_association":"MEMBER","body":"The log states that you are creating a video track in onResume. I recommend creating the local video track with camera capturer in `onRequestPermissionsResult` as seen [in our quickstart](https://github.com/twilio/video-quickstart-android/blob/master/quickstart/src/main/java/com/twilio/video/quickstart/activity/VideoActivity.java) and checking that permission is available in onResume before [creating the track](https://github.com/twilio/video-quickstart-android/blob/master/quickstart/src/main/java/com/twilio/video/quickstart/activity/VideoActivity.java#L270)."}}
{"actor":{"display_login":"aaalaniz"}}