amplify-flutter icon indicating copy to clipboard operation
amplify-flutter copied to clipboard

"An unknown error occurred" for Amplify.Auth.signUp process when exceeding daily email limit for Amazon SES to deliver verification email to new users

Open szymondobrzanski opened this issue 2 years ago • 4 comments

Description

Im getting following exception:

flutter: Error: UnknownServiceException {
  "message": "An unknown error occurred",
  "underlyingException": "Instance of 'UnknownSmithyHttpException'"
}

while trying to register user by email and password.

final userAttributes = <CognitoUserAttributeKey, String>{
        CognitoUserAttributeKey.email: emailAddress
      };
      await Amplify.Auth.signUp(
        username: emailAddress,
        password: password,
        options: SignUpOptions(userAttributes: userAttributes),
      );

It also occurred to me yesterday, today's morning everything was fine until around 2pm cest. I didn't make any changes to my amplify config.

Categories

  • [ ] Analytics
  • [ ] API (REST)
  • [ ] API (GraphQL)
  • [X] Auth
  • [ ] Authenticator
  • [ ] DataStore
  • [ ] Notifications (Push)
  • [ ] Storage

Steps to Reproduce

Try to register user with email and password

Screenshots

No response

Platforms

  • [X] iOS
  • [X] Android
  • [ ] Web
  • [ ] macOS
  • [ ] Windows
  • [ ] Linux

Flutter Version

3.13.8

Amplify Flutter Version

12.5.2

Deployment Method

Amplify CLI

Schema

No response

szymondobrzanski avatar Oct 25 '23 13:10 szymondobrzanski

Update: same error for social auth (google, Facebook, apple). This morning it started to work again

szymondobrzanski avatar Oct 26 '23 07:10 szymondobrzanski

@szymondobrzanski I found the underlying problem, in my case it was: "LimitExceededException: Exceeded daily email limit for the operation or the account. If a higher limit is required, please configure your user pool to use your own Amazon SES configuration for sending email."

The email limit is reset daily, that's why it worked for you again this morning

marcschny avatar Oct 26 '23 11:10 marcschny

Thanks for the tip @marcschny ! it's the same issue in my case. I think it would be worth to improve error message so that it's not so general.

szymondobrzanski avatar Oct 27 '23 07:10 szymondobrzanski

@szymondobrzanski and @marcschny, we appreciate you both confirming the root cause of the issue here. We've marked this as a bug for now with the action to improve the error handling when this happen. Thank you!

cwomack avatar Oct 27 '23 17:10 cwomack

This issue was addressed in Amplify Flutter v2 which was released a couple weeks ago. There were some breaking changes in this version. Please see the upgrade guide for more info.

Jordan-Nelson avatar May 21 '24 18:05 Jordan-Nelson