question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Unknown error, the response body from fetch is: undefined" at Auth.confirmSignIn

See original GitHub issue

Describe the bug I am trying to send the verification code received by the user to confirm the signIn, I have the SMS_MFA enabled. However, I keep getting this error Unknown error, the response body from fetch is: undefined and thats all I get, there is nothing else to help me understand what the error is about. And everything else is working fine, I call signIn, signUp, confirmSignUp and resendSignUp, they all work fine. The problem is only with confirmSignIn and I have no idea what it could be, I already researched online, but had no success. Another strange thing that happens, when I enter the wrong code, it shows me the ‘CodeMismatchException’, but it fails with ‘Unknown error’ when code is the right one. PS: I already have cognito configured to work with SMS MFA

To Reproduce Steps to reproduce the behavior: I just installed aws-amplify and started using Auth according to the docs, everything else works fine, it’s just when I call confirmSignIn

Expected behavior Receive a successful response when the correct code is sent for verification.

Smartphone (please complete the following information): The problem happens in android and iOS

Additional context I’m using: react-native version 0.55.4 aws-amplify version ^1.0.11

Code I have a file where a call all the Auth functions and export them

export const confirmSignIn = (cognitoUser, code) => Auth.confirmSignIn(cognitoUser, code, 'SMS_MFA');

Then I call that confirmSignIn function from a different file

confirmSignIn(cognitoUser, code).then((userSession) => {
         console.log(userSession);
      }).catch((error) => {
         switch (error.name) {
           case 'CodeMismatchException':
            this.codeInput.clear();
            break;
           default:
            console.log(error);
            break;
        }
      });
screen shot 2018-09-18 at 17 53 25

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
d-olivascommented, Mar 25, 2019

@jordanranz not anymore. After I posted the issue I didn’t use the confirmSignIn for a while and forgot about the issue and then I had to use it again and it’s working fine now. I’m using the same react-native version, 0.55.4, react 16.3.1 but updated the aws-amplify to ^1.1.19, probably that was it.

0reactions
github-actions[bot]commented, Jun 13, 2021

This issue has been automatically locked since there hasn’t been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

react native - "Unknown error, the response body from fetch is
I am trying to send the verification code received by the user to confirm the signIn, I have the SMS_MFA enabled.
Read more >
amplify-js
Collect Analytics data for your application including tracking user sessions. REST API · Amazon API Gateway, Sigv4 signing and AWS auth for API...
Read more >
aws-amplify-auth.min.js.map - UNPKG
The CDN for @aws-amplify/auth. ... {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's...
Read more >
Diff - c33c6bfd24..2e0945b687 - chromium/src - Git at Google
+ +package org.chromium.android_webview; + +/** + * Container to hold the application's response to WebViewClient#onSafeBrowsingHit().
Read more >
Incident Response Report False-Positive - Hybrid Analysis
Submit malware for free analysis with Falcon Sandbox and Hybrid Analysis technology. Hybrid Analysis develops and licenses analysis tools to fight malware.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found