{"action":"created","issue":{"url":"https://api.github.com/repos/flutter/flutter/issues/20223","repository_url":"https://api.github.com/repos/flutter/flutter","labels_url":"https://api.github.com/repos/flutter/flutter/issues/20223/labels{/name}","comments_url":"https://api.github.com/repos/flutter/flutter/issues/20223/comments","events_url":"https://api.github.com/repos/flutter/flutter/issues/20223/events","html_url":"https://github.com/flutter/flutter/issues/20223","id":347613208,"node_id":"MDU6SXNzdWUzNDc2MTMyMDg=","number":20223,"title":"How to handle firebase auth errors?","user":{"login":"riccardoratta","id":6663880,"node_id":"MDQ6VXNlcjY2NjM4ODA=","avatar_url":"https://avatars0.githubusercontent.com/u/6663880?v=4","gravatar_id":"","url":"https://api.github.com/users/riccardoratta","html_url":"https://github.com/riccardoratta","followers_url":"https://api.github.com/users/riccardoratta/followers","following_url":"https://api.github.com/users/riccardoratta/following{/other_user}","gists_url":"https://api.github.com/users/riccardoratta/gists{/gist_id}","starred_url":"https://api.github.com/users/riccardoratta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riccardoratta/subscriptions","organizations_url":"https://api.github.com/users/riccardoratta/orgs","repos_url":"https://api.github.com/users/riccardoratta/repos","events_url":"https://api.github.com/users/riccardoratta/events{/privacy}","received_events_url":"https://api.github.com/users/riccardoratta/received_events","type":"User","site_admin":false},"labels":[{"id":379784845,"node_id":"MDU6TGFiZWwzNzk3ODQ4NDU=","url":"https://api.github.com/repos/flutter/flutter/labels/p:%20firebase","name":"p: firebase","color":"fbca04","default":false},{"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":289627367,"node_id":"MDU6TGFiZWwyODk2MjczNjc=","url":"https://api.github.com/repos/flutter/flutter/labels/waiting%20for%20PR%20to%20land%20(fixed)","name":"waiting for PR to land (fixed)","color":"000000","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-08-04T11:50:31Z","updated_at":"2018-11-09T08:52:22Z","closed_at":null,"author_association":"NONE","body":"I'm trying to build a login page with firebase auth plugin. But I don't know how to handle auth errors in a cross-platform way. For example, this are some `PlatformException` that I get when the user type the wrong password/email or there are a network issue.\r\n\r\nOn iOS:\r\n\r\n```\r\nPlatformException(Error 17011, FIRAuthErrorDomain, There is no user record corresponding to this identifier. The user may have been deleted.)\r\n\r\nPlatformException(Error 17009, FIRAuthErrorDomain, The password is invalid or the user does not have a password.)\r\n\r\nPlatformException(Error 17020, FIRAuthErrorDomain, Network error (such as timeout, interrupted connection or unreachable host) has occurred.)\r\n```\r\n\r\nOn Android:\r\n\r\n```\r\nPlatformException(exception, There is no user record corresponding to this identifier. The user may have been deleted., null)\r\n\r\nPlatformException(exception, The password is invalid or the user does not have a password., null)\r\n\r\nPlatformException(exception, A network error (such as timeout, interrupted connection or unreachable host) has occurred., null)\r\n```\r\n\r\nThe format is: code, message, details. In Android I get a code: `exception`, what does it mean? And also in iOS I always get a message: `FIRAuthErrorDomain` and not any standard _code_ listed [here](https://firebase.google.com/docs/auth/ios/errors).\r\n\r\nThe code:\r\n\r\n```dart\r\ntry {\r\n    _user = await _auth.signInWithEmailAndPassword(\r\n        email: _email,\r\n        password: _password);\r\n} on PlatformException catch (e) {\r\n    print(e);\r\n}\r\n```\r\n\r\nFlutter doctor\r\n\r\n```\r\n[✓] Flutter (Channel beta, v0.5.1, on Mac OS X 10.13.6 17G65, locale en-IT)\r\n    • Flutter version 0.5.1 at /Users/.../Library/flutter\r\n    • Framework revision c7ea3ca377 (10 weeks ago), 2018-05-29 21:07:33 +0200\r\n    • Engine revision 1ed25ca7b7\r\n    • Dart version 2.0.0-dev.58.0.flutter-f981f09760\r\n\r\n[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)\r\n    • Android SDK at /Users/.../Library/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: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java\r\n    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)\r\n    • All Android licenses accepted.\r\n\r\n[✓] iOS toolchain - develop for iOS devices (Xcode 9.4.1)\r\n    • Xcode at /Applications/Xcode.app/Contents/Developer\r\n    • Xcode 9.4.1, Build version 9F2000\r\n    • ios-deploy 1.9.2\r\n    • CocoaPods version 1.5.3\r\n\r\n[✓] Android Studio (version 3.1)\r\n    • Android Studio at /Applications/Android Studio.app/Contents\r\n    ✗ Flutter plugin not installed; this adds Flutter specific functionality.\r\n    ✗ Dart plugin not installed; this adds Dart specific functionality.\r\n    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)\r\n\r\n[✓] IntelliJ IDEA Community Edition (version 2017.3.5)\r\n    • IntelliJ at /Applications/IntelliJ IDEA CE.app\r\n    • Flutter plugin version 25.0.1\r\n    • Dart plugin version 173.4700\r\n\r\n[!] VS Code (version 1.25.1)\r\n    • VS Code at /Applications/Visual Studio Code.app/Contents\r\n    • Flutter extension not installed; install from\r\n      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter\r\n\r\n[✓] Connected devices (1 available)\r\n    • Nexus 5X • 01ce0d68fc7ca517 • android-arm64 • Android 8.1.0 (API 27)\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/flutter/flutter/issues/comments/437292080","html_url":"https://github.com/flutter/flutter/issues/20223#issuecomment-437292080","issue_url":"https://api.github.com/repos/flutter/flutter/issues/20223","id":437292080,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNzI5MjA4MA==","user":{"login":"riccardoratta","id":6663880,"node_id":"MDQ6VXNlcjY2NjM4ODA=","avatar_url":"https://avatars0.githubusercontent.com/u/6663880?v=4","gravatar_id":"","url":"https://api.github.com/users/riccardoratta","html_url":"https://github.com/riccardoratta","followers_url":"https://api.github.com/users/riccardoratta/followers","following_url":"https://api.github.com/users/riccardoratta/following{/other_user}","gists_url":"https://api.github.com/users/riccardoratta/gists{/gist_id}","starred_url":"https://api.github.com/users/riccardoratta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riccardoratta/subscriptions","organizations_url":"https://api.github.com/users/riccardoratta/orgs","repos_url":"https://api.github.com/users/riccardoratta/repos","events_url":"https://api.github.com/users/riccardoratta/events{/privacy}","received_events_url":"https://api.github.com/users/riccardoratta/received_events","type":"User","site_admin":false},"created_at":"2018-11-09T08:52:22Z","updated_at":"2018-11-09T08:52:22Z","author_association":"NONE","body":"@suparnavg Sorry why you are saying that this auth errors freezes up the app and it's not unusable until a recompile? In the code that I've included it doesn't happen. You are maybe forgetting the `try {} catch (e) {}` statement? If not can you give a more detailed example?"}}
{"actor":{"display_login":"riccardoratta"}}