{"action":"created","issue":{"url":"https://api.github.com/repos/apptailor/react-native-google-signin/issues/25","labels_url":"https://api.github.com/repos/apptailor/react-native-google-signin/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/apptailor/react-native-google-signin/issues/25/comments","events_url":"https://api.github.com/repos/apptailor/react-native-google-signin/issues/25/events","html_url":"https://github.com/apptailor/react-native-google-signin/issues/25","id":126678499,"number":25,"title":"getPhotoUrl NullPointerException in Android for Hosted Domain Accounts","user":{"login":"daphil19","id":12862688,"avatar_url":"https://avatars.githubusercontent.com/u/12862688?v=3","gravatar_id":"","url":"https://api.github.com/users/daphil19","html_url":"https://github.com/daphil19","followers_url":"https://api.github.com/users/daphil19/followers","following_url":"https://api.github.com/users/daphil19/following{/other_user}","gists_url":"https://api.github.com/users/daphil19/gists{/gist_id}","starred_url":"https://api.github.com/users/daphil19/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daphil19/subscriptions","organizations_url":"https://api.github.com/users/daphil19/orgs","repos_url":"https://api.github.com/users/daphil19/repos","events_url":"https://api.github.com/users/daphil19/events{/privacy}","received_events_url":"https://api.github.com/users/daphil19/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-14T15:31:24Z","updated_at":"2016-01-15T12:07:22Z","closed_at":"2016-01-15T12:07:22Z","body":"If a user tries to log in using a domain hosted by google, and also does not have a profile picture associated with their account, a NullPointerException is thrown at ```acct.getPhotoUrl().toString());```\r\n\r\nThis error only occurs on Android (not iOS).\r\n\r\nI am running version 0.3.1 with react native 0.18.0-rc\r\n\r\nHere's a sample stack trace:\r\n\r\n```\r\nFATAL EXCEPTION: main\r\n  Process: com.example.app, PID: 2734\r\n  java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=9001, result=-1, data=Intent { (has extras) }} to activity {com.example.app/com.example.app.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.net.Uri.toString()' on a null object reference\r\n      at android.app.ActivityThread.deliverResults(ActivityThread.java:3699)\r\n      at android.app.ActivityThread.handleSendResult(ActivityThread.java:3742)\r\n      at android.app.ActivityThread.-wrap16(ActivityThread.java)\r\n      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1393)\r\n      at android.os.Handler.dispatchMessage(Handler.java:102)\r\n      at android.os.Looper.loop(Looper.java:148)\r\n      at android.app.ActivityThread.main(ActivityThread.java:5417)\r\n      at java.lang.reflect.Method.invoke(Native Method)\r\n      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)\r\n      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)\r\n   Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.net.Uri.toString()' on a null object reference\r\n      at co.apptailor.googlesignin.RNGoogleSigninModule.handleSignInResult(RNGoogleSigninModule.java:169)\r\n      at co.apptailor.googlesignin.RNGoogleSigninModule.onActivityResult(RNGoogleSigninModule.java:119)\r\n      at com.example.app.MainActivity.onActivityResult(MainActivity.java:31)\r\n      at android.app.Activity.dispatchActivityResult(Activity.java:6428)\r\n      at android.app.ActivityThread.deliverResults(ActivityThread.java:3695)\r\n      at android.app.ActivityThread.handleSendResult(ActivityThread.java:3742) \r\n      at android.app.ActivityThread.-wrap16(ActivityThread.java) \r\n      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1393) \r\n      at android.os.Handler.dispatchMessage(Handler.java:102) \r\n      at android.os.Looper.loop(Looper.java:148) \r\n      at android.app.ActivityThread.main(ActivityThread.java:5417) \r\n      at java.lang.reflect.Method.invoke(Native Method) \r\n      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) \r\n      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)\r\n```"},"comment":{"url":"https://api.github.com/repos/apptailor/react-native-google-signin/issues/comments/171944973","html_url":"https://github.com/apptailor/react-native-google-signin/issues/25#issuecomment-171944973","issue_url":"https://api.github.com/repos/apptailor/react-native-google-signin/issues/25","id":171944973,"user":{"login":"devfd","id":6117575,"avatar_url":"https://avatars.githubusercontent.com/u/6117575?v=3","gravatar_id":"","url":"https://api.github.com/users/devfd","html_url":"https://github.com/devfd","followers_url":"https://api.github.com/users/devfd/followers","following_url":"https://api.github.com/users/devfd/following{/other_user}","gists_url":"https://api.github.com/users/devfd/gists{/gist_id}","starred_url":"https://api.github.com/users/devfd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devfd/subscriptions","organizations_url":"https://api.github.com/users/devfd/orgs","repos_url":"https://api.github.com/users/devfd/repos","events_url":"https://api.github.com/users/devfd/events{/privacy}","received_events_url":"https://api.github.com/users/devfd/received_events","type":"User","site_admin":false},"created_at":"2016-01-15T12:07:22Z","updated_at":"2016-01-15T12:07:22Z","body":"thanks for reporting this.\r\n\r\nbug fixed in v0.3.2"}}