-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Labels
blocked: customer-responseWaiting for customer response, e.g. more information was requested.Waiting for customer response, e.g. more information was requested.platform: webIssues / PRs which are specifically for web.Issues / PRs which are specifically for web.plugin: authresolution: needs-reproThis issue could not be reproduced or needs an up to date reproduction on latest FlutterFire plugin.This issue could not be reproduced or needs an up to date reproduction on latest FlutterFire plugin.type: bugSomething isn't workingSomething isn't working
Description
Describe the bug
Exceptions in the web implementation are not catchable using the platform interface.
To Reproduce
Steps to reproduce the behavior:
- Create an empty flutter project using master
- Setup firebase_auth and firebase_auth_web following the web package README. (I didn't activate email auth provider to make sure of getting an API error).
- Place a try catch block to catch a possible error using AuthException
- Try to cause the expected error. I tried to authenticate with email and password without activating the email provider to cause ERROR_OPERATION_NOT_ALLOWED.
Expected behavior
I expect the try catch to trigger but it gets ignored. The error is instead reported in the development console as "uncaught in Promise".
Additional context
I'm working on a fix. I will create an "exception mapper" from package:firebase's FirebaseError to AuthException using this reference.
I'm working on the mapping here https://docs.google.com/spreadsheets/d/1VrmcLK3-KF5_DK732XDA0G64wxgiP4W3KvwxeP6Y_DA/edit?usp=sharing
yumin-chen, solid-vovabeloded and illia-romanenko
Metadata
Metadata
Assignees
Labels
blocked: customer-responseWaiting for customer response, e.g. more information was requested.Waiting for customer response, e.g. more information was requested.platform: webIssues / PRs which are specifically for web.Issues / PRs which are specifically for web.plugin: authresolution: needs-reproThis issue could not be reproduced or needs an up to date reproduction on latest FlutterFire plugin.This issue could not be reproduced or needs an up to date reproduction on latest FlutterFire plugin.type: bugSomething isn't workingSomething isn't working