{"action":"created","issue":{"url":"https://api.github.com/repos/flutter/flutter/issues/22784","repository_url":"https://api.github.com/repos/flutter/flutter","labels_url":"https://api.github.com/repos/flutter/flutter/issues/22784/labels{/name}","comments_url":"https://api.github.com/repos/flutter/flutter/issues/22784/comments","events_url":"https://api.github.com/repos/flutter/flutter/issues/22784/events","html_url":"https://github.com/flutter/flutter/issues/22784","id":367553126,"node_id":"MDU6SXNzdWUzNjc1NTMxMjY=","number":22784,"title":"Google sign in returns null for 3.2.1 and CANCELED state for 3.0.5","user":{"login":"svanschooten","id":3600842,"node_id":"MDQ6VXNlcjM2MDA4NDI=","avatar_url":"https://avatars0.githubusercontent.com/u/3600842?v=4","gravatar_id":"","url":"https://api.github.com/users/svanschooten","html_url":"https://github.com/svanschooten","followers_url":"https://api.github.com/users/svanschooten/followers","following_url":"https://api.github.com/users/svanschooten/following{/other_user}","gists_url":"https://api.github.com/users/svanschooten/gists{/gist_id}","starred_url":"https://api.github.com/users/svanschooten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svanschooten/subscriptions","organizations_url":"https://api.github.com/users/svanschooten/orgs","repos_url":"https://api.github.com/users/svanschooten/repos","events_url":"https://api.github.com/users/svanschooten/events{/privacy}","received_events_url":"https://api.github.com/users/svanschooten/received_events","type":"User","site_admin":false},"labels":[{"id":527275775,"node_id":"MDU6TGFiZWw1MjcyNzU3NzU=","url":"https://api.github.com/repos/flutter/flutter/labels/p:%20first%20party","name":"p: first party","color":"fbca04","default":false},{"id":284439562,"node_id":"MDU6TGFiZWwyODQ0Mzk1NjI=","url":"https://api.github.com/repos/flutter/flutter/labels/plugin","name":"plugin","color":"fbca04","default":false},{"id":283479343,"node_id":"MDU6TGFiZWwyODM0NzkzNDM=","url":"https://api.github.com/repos/flutter/flutter/labels/severe:%20crash","name":"severe: crash","color":"900000","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/flutter/flutter/milestones/22","html_url":"https://github.com/flutter/flutter/milestone/22","labels_url":"https://api.github.com/repos/flutter/flutter/milestones/22/labels","id":2270094,"node_id":"MDk6TWlsZXN0b25lMjI3MDA5NA==","number":22,"title":"Goals","description":"P2: These are tasks we think are worth fixing in the coming years. It includes issues we've identified that might block fully shipping broad consumer-facing apps, correctness issues, and bugs relating to polish and quality.\r\n\r\nThe date on this milestone is utterly arbitrary and just intended to sort the milestone appropriately.","creator":{"login":"Hixie","id":551196,"node_id":"MDQ6VXNlcjU1MTE5Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/551196?v=4","gravatar_id":"","url":"https://api.github.com/users/Hixie","html_url":"https://github.com/Hixie","followers_url":"https://api.github.com/users/Hixie/followers","following_url":"https://api.github.com/users/Hixie/following{/other_user}","gists_url":"https://api.github.com/users/Hixie/gists{/gist_id}","starred_url":"https://api.github.com/users/Hixie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hixie/subscriptions","organizations_url":"https://api.github.com/users/Hixie/orgs","repos_url":"https://api.github.com/users/Hixie/repos","events_url":"https://api.github.com/users/Hixie/events{/privacy}","received_events_url":"https://api.github.com/users/Hixie/received_events","type":"User","site_admin":false},"open_issues":1291,"closed_issues":527,"state":"open","created_at":"2017-01-23T00:27:59Z","updated_at":"2018-10-13T10:03:43Z","due_on":"2031-01-01T08:00:00Z","closed_at":null},"comments":5,"created_at":"2018-10-07T13:08:20Z","updated_at":"2018-10-14T03:48:44Z","closed_at":null,"author_association":"NONE","body":"After debugging for multiple hours without any result at all, I have given up. I have been learning Flutter by creating an application that connects to a Firebase realtime database, which work in debug mode and local installation through adb. But whenever I (or any of my friends) install the package though something else than adb (such as package manager or something else) I am gettings issues.\r\n\r\nFor starters, here is the relevant part of my pubspec.yaml:\r\n\r\n    dependencies:\r\n      google_sign_in: 3.2.1\r\n      firebase_auth: 0.5.20\r\n      firebase_core: 0.2.5\r\n\r\nAt the beginning of my statefull widget:\r\n\r\n    final FirebaseAuth _fAuth = FirebaseAuth.instance;\r\n    final GoogleSignIn _gSignIn = new GoogleSignIn();\r\n    final DatabaseReference database = FirebaseDatabase.instance.reference().child(\"users\");\r\n\r\nAnd the relevant part of my code:\r\n\r\n    googleSignInAccount = await _gSignIn.signIn(); // [1]\r\n    authentication = await googleSignInAccount.authentication; // [2]\r\n\r\n    ...\r\n\r\n    _firebaseUser = await _fAuth.signInWithGoogle(\r\n        idToken: authentication.idToken,\r\n        accessToken: authentication.accessToken);\r\n\r\n    ...\r\n\r\nSo the problem is that, with a bit older 3.0.5 version of the google_sign_in package, I get the error:\r\n\r\n    PlatformException(sign_in_failed, Status{statusCode=CANCELED, resolution=null}, null)\r\n\r\nAlready at point [1], even though the login dialog was never cancelled, just after selecting a google account to use. This never happens in debug mode, as if google rejects the production application on login. When I update the google_sign_in package to version 3.2.1, I get the following message at point [2]:\r\n\r\n    NoSuchMethodError: The getter 'authentication' was called on null.\r\n    Receiver: null\r\n    Tried calling: authentication\r\n\r\nWhich means step [1] does not result in an error any more, but just returns null, and as such it fails at step [2]. I do not have this problem in debug mode, so there should be nothing wrong with the login flow.\r\n\r\nNote: I do use a local signing keystore, but I never had any issue with that."},"comment":{"url":"https://api.github.com/repos/flutter/flutter/issues/comments/429594237","html_url":"https://github.com/flutter/flutter/issues/22784#issuecomment-429594237","issue_url":"https://api.github.com/repos/flutter/flutter/issues/22784","id":429594237,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTU5NDIzNw==","user":{"login":"ratsey","id":7027608,"node_id":"MDQ6VXNlcjcwMjc2MDg=","avatar_url":"https://avatars0.githubusercontent.com/u/7027608?v=4","gravatar_id":"","url":"https://api.github.com/users/ratsey","html_url":"https://github.com/ratsey","followers_url":"https://api.github.com/users/ratsey/followers","following_url":"https://api.github.com/users/ratsey/following{/other_user}","gists_url":"https://api.github.com/users/ratsey/gists{/gist_id}","starred_url":"https://api.github.com/users/ratsey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ratsey/subscriptions","organizations_url":"https://api.github.com/users/ratsey/orgs","repos_url":"https://api.github.com/users/ratsey/repos","events_url":"https://api.github.com/users/ratsey/events{/privacy}","received_events_url":"https://api.github.com/users/ratsey/received_events","type":"User","site_admin":false},"created_at":"2018-10-14T03:48:44Z","updated_at":"2018-10-14T03:48:44Z","author_association":"NONE","body":"I'm going to add a 'me too' to this one. The exact same issue - I can run in debug and the GoogleSignIn.signIn method works fine (his [1] line), same if running with `flutter run --release`. However, if I then take the output from that `--release` run and push it through the Play store, the resulting install will not run, the signIn method returning Null, exactly as @svanschooten describes.\r\n\r\nWhat's interesting is that it's supposedly the same APK, running on the same hardware test device, my LG V20. What is happening during that Play release?\r\n\r\nI have a device monitor hooked up and there are no errors thrown, the `Future<GoogleSignInAccount> signIn() {` method in `google_sign_in.dart` is just returning Null. I'm playing around with adding print statements to the `google_sign_in.dart` code to try to trace it but it's a bit of a shot in the dark.\r\n\r\n```\r\n google_sign_in: \"^3.2.1\"\r\n  firebase_auth: \"^0.6.2+1\"\r\n  firebase_core: ^0.2.5+1\r\n```\r\n\r\n```\r\n[√] Flutter (Channel beta, v0.9.4, on Microsoft Windows [Version 10.0.17134.345], locale en-US)\r\n    • Flutter version 0.9.4 at E:\\flutter\r\n    • Framework revision f37c235c32 (3 weeks ago), 2018-09-25 17:45:40 -0400\r\n    • Engine revision 74625aed32\r\n    • Dart version 2.1.0-dev.5.0.flutter-a2eb050044\r\n\r\n[√] Android toolchain - develop for Android devices (Android SDK 27.0.3)\r\n    • Android SDK at C:\\Users\\jens\\AppData\\Local\\Android\\sdk\r\n    • Android NDK location not configured (optional; useful for native profiling support)\r\n    • Platform android-27, build-tools 27.0.3\r\n    • Java binary at: E:\\Program Files\\Android\\Android Studio\\jre\\bin\\java\r\n    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)\r\n    • All Android licenses accepted.\r\n\r\n[√] Android Studio (version 3.1)\r\n    • Android Studio at E:\\Program Files\\Android\\Android Studio\r\n    • Flutter plugin version 27.1.1\r\n    • Dart plugin version 173.4700\r\n    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)\r\n\r\n[√] IntelliJ IDEA Community Edition (version 2018.1)\r\n    • IntelliJ at E:\\Program Files\\JetBrains\\IntelliJ IDEA Community Edition 181.4203.6\r\n    • Flutter plugin version 22.2.3\r\n    • Dart plugin version 181.4096.12\r\n\r\n[√] VS Code, 64-bit edition (version 1.28.1)\r\n    • VS Code at C:\\Program Files\\Microsoft VS Code\r\n    • Flutter extension version 2.19.0\r\n\r\n[!] Connected devices\r\n    ! No devices available\r\n\r\n! Doctor found issues in 1 category.\r\n```"}}
{"actor":{"display_login":"ratsey"}}