Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App crashes when using resendUserAttributeConfirmationCode #2831

Closed
3 of 13 tasks
alondahari opened this issue Apr 10, 2023 · 2 comments
Closed
3 of 13 tasks

App crashes when using resendUserAttributeConfirmationCode #2831

alondahari opened this issue Apr 10, 2023 · 2 comments
Assignees
Labels
auth Issues related to the Auth Category pending-triage This issue is in the backlog of issues to triage

Comments

@alondahari
Copy link

alondahari commented Apr 10, 2023

Description

In our authentication flow, we are triggering the user verification email (after sign up) manually. We are doing so because after sign up we auto confirm the users (to allow signing them in immediately) and so the verification emails don't trigger automatically.

To trigger the verification email, we're attempting to call (after sign up and signing in the user):

Amplify.Auth.resendUserAttributeConfirmationCode(
   userAttributeKey: CognitoUserAttributeKey.email,
);

However, the above crashes the app completely. This is the stack trace:

../../third_party/dart/runtime/vm/compiler/assembler/assembler_arm64.h: 313: error: Offset 311 is out of range
version=2.19.4 (stable) (Tue Mar 7 09:58:46 2023 +0000) on "ios_arm64"
pid=2533, thread=30979, isolate_group=main(0x122832600), isolate=main(0x12285fe00)
os=ios, arch=arm64, comp=no, sim=no
isolate_instructions=108be0000, vm_instructions=108be0000
  pc 0x00000001095a6464 fp 0x000000016bb79fd0 Dart_DumpNativeStackTrace+0x18
  pc 0x0000000109179498 fp 0x000000016bb79ff0 dart::Assert::Fail(char const*, ...) const+0x30
  pc 0x000000010936efa8 fp 0x000000016bb7a020 dart::LambdaCallable<dart::TypeTestingStubGenerator::BuildCodeForType(dart::Type const&)::$_0::operator()(dart::compiler::Assembler&) const::'lambda'()>::~LambdaCallable()+0x0
  pc 0x00000001093b5028 fp 0x000000016bb7a080 dart::compiler::Assembler::LoadCompressedField(dart::Register, dart::compiler::FieldAddress const&)+0x7c
  pc 0x00000001093f46e4 fp 0x000000016bb7a170 dart::AssertAssignableInstr::EmitNativeCode(dart::FlowGraphCompiler*)+0x5ac
  pc 0x000000010949e81c fp 0x000000016bb7a390 dart::CompilerPass_GenerateCode::DoBody(dart::CompilerPassState*) const+0x1454
  pc 0x00000001094b132c fp 0x000000016bb7a4a0 dart::CompilerPass::Run(dart::CompilerPassState*) const+0x248
  pc 0x000000010937ae44 fp 0x000000016bb7af40 dart::CompileParsedFunctionHelper::Compile(dart::CompilationPipeline*)+0x1a90
  pc 0x000000010937c1d4 fp 0x000000016bb7b650 dart::CompileFunctionHelper(dart::CompilationPipeline*, dart::Function const&, bool, long)+0x550
  pc 0x000000010937bbd4 fp 0x000000016bb7b6f0 dart::Compiler::CompileFunction(dart::Thread*, dart::Function const&)+0x2d0
  pc 0x0000000109282914 fp 0x000000016bb7b740 dart::Function::EnsureHasCode() const+0x54
  pc 0x00000001093752c0 fp 0x000000016bb7bcb0 dart::DRT_CompileFunction(dart::NativeArguments)+0x198
  pc 0x000000010c582f8c fp 0x000000016bb7bcf0 Unknown symbol
  pc 0x000000010c583010 fp 0x000000016bb7bd20 Unknown symbol
  pc 0x00000001263cd344 fp 0x000000016bb7bd90 Unknown symbol
  pc 0x00000001263d7134 fp 0x000000016bb7bdd8 Unknown symbol
  pc 0x00000001263eee38 fp 0x000000016bb7be40 Unknown symbol
  pc 0x000000011b3ca360 fp 0x000000016bb7be90 Unknown symbol
  pc 0x000000011b3c996c fp 0x000000016bb7bee8 Unknown symbol
  pc 0x000000011b3c94b4 fp 0x000000016bb7bf38 Unknown symbol
  pc 0x000000011b3c90bc fp 0x000000016bb7bf98 Unknown symbol
  pc 0x000000011b3b7200 fp 0x000000016bb7c018 Unknown symbol
  pc 0x000000011b3b5a98 fp 0x000000016bb7c060 Unknown symbol
  pc 0x000000011b3b5768 fp 0x000000016bb7c0a8 Unknown symbol
  pc 0x000000010c587e60 fp 0x000000016bb7c0d8 Unknown symbol
  pc 0x000000011b3ca360 fp 0x000000016bb7c128 Unknown symbol
  pc 0x000000011b3c996c fp 0x000000016bb7c180 Unknown symbol
  pc 0x000000011b3c94b4 fp 0x000000016bb7c1d0 Unknown symbol
  pc 0x000000011b3c90bc fp 0x000000016bb7c230 Unknown symbol
  pc 0x000000011b3b7200 fp 0x000000016bb7c2b0 Unknown symbol
  pc 0x000000011b3b5a98 fp 0x000000016bb7c2f8 Unknown symbol
  pc 0x000000011b3b5768 fp 0x000000016bb7c340 Unknown symbol
  pc 0x000000010c587e60 fp 0x000000016bb7c370 Unknown symbol
  pc 0x000000011b3ca360 fp 0x000000016bb7c3c0 Unknown symbol
  pc 0x000000011b3c996c fp 0x000000016bb7c418 Unknown symbol
  pc 0x000000011b3c94b4 fp 0x000000016bb7c468 Unknown symbol
  pc 0x000000011b3c90bc fp 0x000000016bb7c4c8 Unknown symbol
  pc 0x000000011b3b7200 fp 0x000000016bb7c548 Unknown symbol
  pc 0x000000011b3b5a98 fp 0x000000016bb7c590 Unknown symbol
  pc 0x000000011b3960a8 fp 0x000000016bb7c5d8 Unknown symbol
  pc 0x000000010c587de0 fp 0x000000016bb7c608 Unknown symbol
  pc 0x000000011b3ca360 fp 0x000000016bb7c658 Unknown symbol
  pc 0x000000011b3c996c fp 0x000000016bb7c6b0 Unknown symbol
  pc 0x000000011b3ca248 fp 0x000000016bb7c700 Unknown symbol
  pc 0x000000011b3c2e74 fp 0x000000016bb7c748 Unknown symbol
  pc 0x000000011b3c2a04 fp 0x000000016bb7c788 Unknown symbol
  pc 0x000000011b3c28fc fp 0x000000016bb7c7b0 Unknown symbol
  pc 0x000000010c583518 fp 0x000000016bb7c880 Unknown symbol
  pc 0x00000001091cb030 fp 0x000000016bb7cd30 dart::DartEntry::InvokeFunction(dart::Function const&, dart::Array const&, dart::Array const&, unsigned long)+0x29c
  pc 0x000000010959fdd0 fp 0x000000016bb7ce50 Dart_InvokeClosure+0x628
  pc 0x0000000108fcc6c0 fp 0x000000016bb7cee0 tonic::DartMicrotaskQueue::RunMicrotasks()+0xdc
  pc 0x0000000108eb518c fp 0x000000016bb7cfc0 fml::MessageLoopImpl::FlushTasks(fml::FlushType)+0x4dc
  pc 0x0000000108eb8a88 fp 0x000000016bb7cfe0 fml::MessageLoopDarwin::OnTimerFire(__CFRunLoopTimer*, fml::MessageLoopDarwin*)+0x20
  pc 0x00000001c2f14c7c fp 0x000000016bb7cff0 <redacted>+0x1c
  pc 0x00000001c2ed4c0c fp 0x000000016bb7e0c0 <redacted>+0x374
  pc 0x00000001c2e7c400 fp 0x000000016bb7e120 <redacted>+0x11c
  pc 0x00000001c2ec7418 fp 0x000000016bb7ee90 <redacted>+0x7a0
  pc 0x00000001c2ecbb58 fp 0x000000016bb7ef40 CFRunLoopRunSpecific+0x248
  pc 0x0000000108eb8b74 fp 0x000000016bb7ef80 fml::MessageLoopDarwin::Run()+0x58
  pc 0x0000000108eb7c68 fp 0x000000016bb7efc0 void* std::_LIBCPP_ABI_NAMESPACE::__thread_proxy[abi:v15000]<std::_LIBCPP_ABI_NAMESPACE::tuple<std::_LIBCPP_ABI_NAMESPACE::unique_ptr<std::_LIBCPP_ABI_NAMESPACE::__thread_struct, std::_LIBCPP_ABI_NAMESPACE::default_delete<std::_LIBCPP_ABI_NAMESPACE::__thread_struct>>, fml::Thread::Thread(std::_LIBCPP_ABI_NAMESPACE::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0>>(void*)+0xd0
  pc 0x000000020b6f9060 fp 0x000000016bb7efe0 _pthread_start+0x74
-- End of DumpStackTrace
  pc 0x0000000000000000 fp 0x000000016bb7bcf0 sp 0x0000000000000000 [Stub] CallToRuntime
  pc 0x000000010c583010 fp 0x000000016bb7bd20 sp 0x000000016bb7bd00 [Stub] LazyCompile
  pc 0x00000001263cd344 fp 0x000000016bb7bd90 sp 0x000000016bb7bd30 [Unoptimized] AmplifyAuthentication.sendEmailToVerify
  pc 0x00000001263d7134 fp 0x000000016bb7bdd8 sp 0x000000016bb7bda0 [Unoptimized] Authentication.sendEmailToVerify
  pc 0x00000001263eee38 fp 0x000000016bb7be40 sp 0x000000016bb7bde8 [Unoptimized] FanSignUpReducer.signUp.<anonymous closure>
  pc 0x000000011b3ca360 fp 0x000000016bb7be90 sp 0x000000016bb7be50 [Unoptimized] _SuspendState@4048458._createAsyncCallbacks@4048458.thenCallback
  pc 0x000000011b3c996c fp 0x000000016bb7bee8 sp 0x000000016bb7bea0 [Unoptimized] _RootZone@4048458.runUnary
  pc 0x000000011b3c94b4 fp 0x000000016bb7bf38 sp 0x000000016bb7bef8 [Unoptimized] _FutureListener@4048458.handleValue
  pc 0x000000011b3c90bc fp 0x000000016bb7bf98 sp 0x000000016bb7bf48 [Unoptimized] _Future@4048458._propagateToListeners@4048458.handleValueCallback
  pc 0x000000011b3b7200 fp 0x000000016bb7c018 sp 0x000000016bb7bfa8 [Unoptimized] _Future@4048458._propagateToListeners@4048458
  pc 0x000000011b3b5a98 fp 0x000000016bb7c060 sp 0x000000016bb7c028 [Unoptimized] _Future@4048458._completeWithValue@4048458
  pc 0x000000011b3b5768 fp 0x000000016bb7c0a8 sp 0x000000016bb7c070 [Unoptimized] _SuspendState@4048458._returnAsyncNotFuture@4048458
  pc 0x000000010c587e60 fp 0x000000016bb7c0d8 sp 0x000000016bb7c0b8 [Stub] ReturnAsyncNotFuture
  pc 0x000000011b3ca360 fp 0x000000016bb7c128 sp 0x000000016bb7c0e8 [Unoptimized] _SuspendState@4048458._createAsyncCallbacks@4048458.thenCallback
  pc 0x000000011b3c996c fp 0x000000016bb7c180 sp 0x000000016bb7c138 [Unoptimized] _RootZone@4048458.runUnary
  pc 0x000000011b3c94b4 fp 0x000000016bb7c1d0 sp 0x000000016bb7c190 [Unoptimized] _FutureListener@4048458.handleValue
  pc 0x000000011b3c90bc fp 0x000000016bb7c230 sp 0x000000016bb7c1e0 [Unoptimized] _Future@4048458._propagateToListeners@4048458.handleValueCallback
  pc 0x000000011b3b7200 fp 0x000000016bb7c2b0 sp 0x000000016bb7c240 [Unoptimized] _Future@4048458._propagateToListeners@4048458
  pc 0x000000011b3b5a98 fp 0x000000016bb7c2f8 sp 0x000000016bb7c2c0 [Unoptimized] _Future@4048458._completeWithValue@4048458
  pc 0x000000011b3b5768 fp 0x000000016bb7c340 sp 0x000000016bb7c308 [Unoptimized] _SuspendState@4048458._returnAsyncNotFuture@4048458
  pc 0x000000010c587e60 fp 0x000000016bb7c370 sp 0x000000016bb7c350 [Stub] ReturnAsyncNotFuture
  pc 0x000000011b3ca360 fp 0x000000016bb7c3c0 sp 0x000000016bb7c380 [Unoptimized] _SuspendState@4048458._createAsyncCallbacks@4048458.thenCallback
  pc 0x000000011b3c996c fp 0x000000016bb7c418 sp 0x000000016bb7c3d0 [Unoptimized] _RootZone@4048458.runUnary
  pc 0x000000011b3c94b4 fp 0x000000016bb7c468 sp 0x000000016bb7c428 [Unoptimized] _FutureListener@4048458.handleValue
  pc 0x000000011b3c90bc fp 0x000000016bb7c4c8 sp 0x000000016bb7c478 [Unoptimized] _Future@4048458._propagateToListeners@4048458.handleValueCallback
  pc 0x000000011b3b7200 fp 0x000000016bb7c548 sp 0x000000016bb7c4d8 [Unoptimized] _Future@4048458._propagateToListeners@4048458
  pc 0x000000011b3b5a98 fp 0x000000016bb7c590 sp 0x000000016bb7c558 [Unoptimized] _Future@4048458._completeWithValue@4048458
  pc 0x000000011b3960a8 fp 0x000000016bb7c5d8 sp 0x000000016bb7c5a0 [Unoptimized] _SuspendState@4048458._returnAsync@4048458
  pc 0x000000010c587de0 fp 0x000000016bb7c608 sp 0x000000016bb7c5e8 [Stub] ReturnAsync
  pc 0x000000011b3ca360 fp 0x000000016bb7c658 sp 0x000000016bb7c618 [Unoptimized] _SuspendState@4048458._createAsyncCallbacks@4048458.thenCallback
  pc 0x000000011b3c996c fp 0x000000016bb7c6b0 sp 0x000000016bb7c668 [Unoptimized] _RootZone@4048458.runUnary
  pc 0x000000011b3ca248 fp 0x000000016bb7c700 sp 0x000000016bb7c6c0 [Unoptimized] _SuspendState@4048458._awaitCompletedFuture@4048458.run
  pc 0x000000011b3c2e74 fp 0x000000016bb7c748 sp 0x000000016bb7c710 [Unoptimized] _microtaskLoop@4048458
  pc 0x000000011b3c2a04 fp 0x000000016bb7c788 sp 0x000000016bb7c758 [Unoptimized] _startMicrotaskLoop@4048458
  pc 0x000000011b3c28fc fp 0x000000016bb7c7b0 sp 0x000000016bb7c798 [Unoptimized] _startMicrotaskLoop@4048458
  pc 0x000000010c583518 fp 0x000000016bb7c880 sp 0x000000016bb7c7c0 [Stub] InvokeDartCode
=== Crash occurred when compiling package:amplify_core/src/category/amplify_auth_category.dart_AuthCategory_resendUserAttributeConfirmationCode in unoptimized JIT mode in GenerateCode pass
=== When compiling block B9[target]:72
=== When compiling instruction t0 <- AssertAssignable:48(t0, t1, 'options', instantiator_type_args(t2), function_type_args(t3))
*** BEGIN CFG
GenerateCode
==== package:amplify_core/src/category/amplify_auth_category.dart_AuthCategory_resendUserAttributeConfirmationCode (RegularFunction)
B0[graph]:0
B1[function entry]:2
    t0 <- Constant(#0)
    StoreLocal(:entry_points_temp @-6, t0)
    goto:60 B6
B7[function entry]:62
    t0 <- Constant(#2)
    StoreLocal(:entry_points_temp @-6, t0)
    goto:64 B6
B6[join]:58 pred(B1, B7)
    t0 <- LoadLocal(:arg_desc @-3)
    t0 <- LoadField(t0 . ArgumentsDescriptor.positional_count {final})
    t1 <- LoadLocal(:arg_desc @-3)
    t1 <- LoadField(t1 . ArgumentsDescriptor.count {final})
    t2 <- LoadLocal(:t1 @-8)
    t3 <- Constant(#1)
    t2 <- BinarySmiOp:4(- [tr], t2, t3)
    t3 <- LoadLocal(:t2 @-9)
    t3 <- LoadIndexedUnsafe(fp[t3 + 16]) T{*?}
    StoreLocal(this @0, t3)
    t3 <- Constant(#0)
    StoreLocal(:expr_temp @-5, t3)
    t3 <- Constant(#2)
    t4 <- LoadLocal(:expr_temp @-5)
    t3 <- BinarySmiOp:6(* [tr], t3, t4)
    t4 <- LoadLocal(:arg_desc @-3) T{*?}
    t5 <- Constant(#4)
    t6 <- LoadLocal(:t3 @-10)
    t5 <- BinarySmiOp:14(+ [tr], t5, t6)
    t4 <- LoadIndexed(t4, t5) T{*?}
    t5 <- Constant(#options)
    Branch if StrictCompare:16(===, t4, t5) goto (2, 3)
B2[target]:20
    t4 <- LoadLocal(:t1 @-8)
    t5 <- LoadLocal(:arg_desc @-3)
    t6 <- Constant(#5)
    t7 <- LoadLocal(:t3 @-10)
    t6 <- BinarySmiOp:8(+ [tr], t6, t7)
    t5 <- LoadIndexed(t5, t6)
    t4 <- BinarySmiOp:10(- [tr], t4, t5)
    t4 <- LoadIndexedUnsafe(fp[t4 + 8]) T{*?}
    StoreLocal(options @-2, t4)
    t4 <- LoadLocal(:expr_temp @-5)
    t5 <- Constant(#1)
    t4 <- BinarySmiOp:12(+ [tr], t4, t5)
    StoreLocal(:expr_temp @-5, t4)
    goto:26 B4
B3[target]:22
    t4 <- Constant(#null)
    StoreLocal(options @-2, t4)
    goto:28 B4
B4[join]:24 pred(B2, B3)
    DropTemps(1)
    t3 <- Constant(#2)
    t4 <- LoadLocal(:expr_temp @-5)
    t3 <- BinarySmiOp:30(* [tr], t3, t4)
    t4 <- LoadLocal(:t1 @-8)
    t5 <- LoadLocal(:arg_desc @-3)
    t6 <- Constant(#5)
    t7 <- LoadLocal(:t3 @-10)
    t6 <- BinarySmiOp:32(+ [tr], t6, t7)
    t5 <- LoadIndexed(t5, t6)
    t4 <- BinarySmiOp:34(- [tr], t4, t5)
    t4 <- LoadIndexedUnsafe(fp[t4 + 8]) T{*?}
    StoreLocal(userAttributeKey @-1, t4)
    t4 <- LoadLocal(:expr_temp @-5)
    t5 <- Constant(#1)
    t4 <- BinarySmiOp:36(+ [tr], t4, t5)
    StoreLocal(:expr_temp @-5, t4)
    DropTemps(1)
    DropTemps(1)
    DropTemps(1)
    DropTemps(1)
    goto:40 B5
B5[join]:38 pred(B4)
    CheckStackOverflow:42(stack=0, loop=0)
    DebugStepCheck:44()
    t0 <- LoadLocal(:entry_points_temp @-6)
    DropTemps(1)
    t0 <- LoadLocal(:entry_points_temp @-6) T{*?}
    t1 <- Constant(#2)
    Branch if StrictCompare:66(===, t0, t1) goto (8, 9)
B8[target]:70
    goto:78 B10
B9[target]:72
    t0 <- LoadLocal(userAttributeKey @-1) T{*?}
    t1 <- Constant(#TypeParameter: C1X1; bound: AuthUserAttributeKey)
    t2 <- LoadLocal(this @0)
    t2 <- LoadField(t2 . :type_arguments {final})
    t3 <- Constant(#null)
    t0 <- AssertAssignable:46(t0, t1, 'userAttributeKey', instantiator_type_args(t2), function_type_args(t3))
    StoreLocal(userAttributeKey @-1, t0)
    t0 <- LoadLocal(options @-2) T{*?}
    t1 <- Constant(#TypeParameter: C1X33?; bound: ResendUserAttributeConfirmationCodeOptions)
    t2 <- LoadLocal(this @0)
    t2 <- LoadField(t2 . :type_arguments {final})
    t3 <- Constant(#null)
    t0 <- AssertAssignable:48(t0, t1, 'options', instantiator_type_args(t2), function_type_args(t3))
    StoreLocal(options @-2, t0)
    goto:76 B10
B10[join]:74 pred(B8, B9)
    t0 <- LoadLocal(this @0)
    t0 <- InstanceCall:50( get:plugin<0>, t0)
    t1 <- LoadLocal(userAttributeKey @-1)
    t2 <- LoadLocal(options @-2)
    t0 <- InstanceCall:52( resendUserAttributeConfirmationCode<0>, t0, t1, t2)
    DebugStepCheck:54()
    Return:56(t0)
*** END CFG
* thread #10, name = 'io.flutter.1.ui', stop reason = signal SIGABRT
    frame #0: 0x00000001fc630274 libsystem_kernel.dylib`__pthread_kill + 8
libsystem_kernel.dylib`:
->  0x1fc630274 <+8>:  b.lo   0x1fc630290               ; <+36>
    0x1fc630278 <+12>: stp    x29, x30, [sp, #-0x10]!
    0x1fc63027c <+16>: mov    x29, sp
    0x1fc630280 <+20>: bl     0x1fc62bc54               ; cerror_nocancel
Target 0: (Runner) stopped.
Lost connection to device.
Exited

Categories

  • Analytics
  • API (REST)
  • API (GraphQL)
  • Auth
  • Authenticator
  • DataStore
  • Storage

Steps to Reproduce

  1. Instrument an app with basic auth configs:
final config = {
      "UserAgent": "aws-amplify-cli/2.0",
      "Version": "1.0",
      "auth": {
        "plugins": {
          "awsCognitoAuthPlugin": {
            "IdentityManager": {"Default": {}},
            "CognitoUserPool": {
              "Default": {
                "PoolId": userPool,
                "AppClientId": clientId,
                "Region": region
              }
            },
            "Auth": {
              "Default": {
                "authenticationFlowType": "USER_SRP_AUTH",
              }
            }
          }
        }
      }
    };
  1. Try calling Amplify.Auth.resendUserAttributeConfirmationCode after signing the user in.

Screenshots

No response

Platforms

  • iOS
  • Android
  • Web
  • macOS
  • Windows
  • Linux

Flutter Version

3.7.10

Amplify Flutter Version

^1.0.0-next.0

Deployment Method

Custom Pipeline

Schema

No response

@dnys1
Copy link
Contributor

dnys1 commented Apr 10, 2023

Possibly a duplicate of #2361. Can you try running flutter pub upgrade and try again?

Is this reproducible 100% of the time?

@dnys1 dnys1 self-assigned this Apr 10, 2023
@dnys1 dnys1 added auth Issues related to the Auth Category pending-triage This issue is in the backlog of issues to triage labels Apr 10, 2023
@alondahari
Copy link
Author

ok, updated to ^1.0.0-next.7 which seems to have resolved the issue, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth Issues related to the Auth Category pending-triage This issue is in the backlog of issues to triage
Projects
None yet
Development

No branches or pull requests

2 participants