Open langerkirill opened 8 months ago
Hey, @langerkirill and thanks for opening this issue. The decode
method in React Native is vended by base-64
package which is a dependency of @aws-amplify/react-native
. Can you see if deleting your node_modules
folder, as well as your package-lock.json
file, then reinstalling dependences with npm install
resolves the error?
If it doesn't, possibly verify you have the necessary dependency with npm why base-64
as well.
Hi @cwomack, thanks for the response. I tried deleting node_modules
and yarn.lock
, no luck. I got the same error. It does appear that I have base-64
:
Mobile git:2890-slow-login ❯ yarn why base-64 ✹ ✭
yarn why v1.22.22
warning ../../package.json: No license field
[1/4] 🤔 Why do we have the module "base-64"...?
[2/4] 🚚 Initialising dependency graph...
[3/4] 🔍 Finding dependency...
[4/4] 🚡 Calculating file sizes...
=> Found "base-64@1.0.0"
info Reasons this module exists
- "@aws-amplify#react-native" depends on it
- Hoisted from "@aws-amplify#react-native#base-64"
info Disk size without dependencies: "20KB"
info Disk size with unique dependencies: "20KB"
info Disk size with transitive dependencies: "20KB"
info Number of shared dependencies: 0
✨ Done in 0.29s.
@langerkirill, are you able to provide a sample repo possibly that can reproduce this reliably? We haven't been able to reproduce it on our side with a React Native app. Can you also clarify if you're calling Amplify.configure()
at the root of your app as well?
@cwomack, we are unable to call Amplify.configure()
in the root of our app because our app requires that users input a Facility ID on the first page which we then need to use to fetch information that we pass into the Amplify configuration. We have different userpoolid
values for users in different regions for example. We need to configure Amplify on the second page before sign in. This was never an issue with v4. Do you think it may have become an issue for v6?
I will see about getting you a sample repo.
@cwomack I added you as a collaborator to a sample repo where you can reproduce this issue yourself. You should be able to pull it down and follow the instructions I will add to the README to reproduce the issue. Thanks.
I found another error in the debug console mode related to an undefined URL.
My issues were resolved by implementing the suggestion in the following comment:
https://github.com/aws/aws-sdk-js-v3/issues/4877#issuecomment-1803353706
@langerkirill, glad you found the workaround already! We'll mark this as a bug on our side due to the dependencies in our library on the aws-sdk
. We're tracking this internally and will update this issue when a fix is released on our side that updates our dependencies.
In the mean time, if anyone comes across this same blocker please refer to this comment for a workaround.
Before opening, please confirm:
JavaScript Framework
React Native
Amplify APIs
Authentication
Amplify Version
v6
Amplify Categories
auth
Backend
Other
Environment information
Describe the bug
I have been unable to use the new
signIn
with amplify v6. I am continuously receiving the bug:In response to a login attempt. This is impossible for me to debug, I tracked it down to a failure in signInHelpers.ts in @aws-amplify/auth:
jsonReq logs to the console but resp does not.
Expected behavior
A sign-in occurs and the user is logged in.
Reproduction steps
Install amplify version 6.0.20. Attempt to use the new
signIn
method. Observe the failure.Code Snippet
amplify configuration:
Calling the signIn method:
Log output
aws-exports.js
No response
Manual configuration
Additional configuration
Mobile Device
Google Pixel 7
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response