amplify-js: Amplify.configure manual setup broken
Describe the bug
Cannot use aws-amplify to login with latest react-native version due to t.getPromise error on release builds and cannot update aws-amplify library due to Amplify.configure not working!
To Reproduce Steps to reproduce the behavior:
In a react-native application create config like follows:
const config = {
Auth: {
identityPoolId: 'XXX...',
region: 'XXX...',
userPoolId: 'XXX...',
userPoolWebClientId: 'XXX...',
mandatorySignIn: false,
},
}
export default config
Import into App.js and configure
Amplify.configure(awsConfig)
Auth userPool is null and cannot use Auth.
In latest react-native release, cannot login with the above on aws-amplify 1.0.0 due to t.getPromise error.
Expected behavior Configure should be able to authenticate and userPool should be defined.
Smartphone (please complete the following information):
- Mobile iOS/android applications
- aws-amplify@1.1.3
- react-native 0.57
Additional context
I can configure Auth directly, but Cache not defined and not working. Works on aws-amplify 1.0.0 but have a t.getPromise error for all login on release build with that version.
NOTE: We user our own components, not aws-amplify-react-native.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 3
- Comments: 30 (10 by maintainers)
This looks to be resolved with at least the latest version.
@strykerCrew I tried to reproduce in my local environment with a blank react-native app. Here is my
package.json:and this is my App.js:
Tested both in development mode and release mode and no error found by far. I doubt there maybe something related to react-native@0.57.1 but I couldn’t build a blank app with that version I don’t know why.