-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Amplify v5 build fails when adding amazon-cognito-identity-js because duplicate symbols #13128
Comments
I have the same issue |
Me Too |
Glad to see that I'm not the only one. But I've been stuck here for days and nothing indicates this will be resolved... Very frustrating |
I have the same problem @kvramyasri7 @Themrpie @avantmarketing1 Did any of you manage to solve the error or did you solve it in an alternative way? |
No. I even tried by changing the names of the duplicated class names (JKBigInteger and JKBigDecimal) by manually editing the library files. It didn't work, maybe I did it wrong. I also tried by downgrading into expo 49, but I still get the same problem. If anybody solved this please share the solution 🙏 |
Hello @Themrpie, 👋. For anyone experiencing this issue, this looks very similar to the errors reported in #12808. The resolution there was to follow the commands in this comment to remove the dependency and re-install. Can you please try these steps to see if they resolve the issue? |
Hello @cwomack, thanks for the response The resolution there needs aws-amplify@6 and then we will not be able to use expo go for example. |
Thanks @cwomack but as I explained if I remove amazon-cognito-identity-js the app compiles but it doesn't function. I understand that as npm for this library and aws instructions says, you don't need to install it for aws-amplify@6 but for version 5 you need it or it will compile, but not allowing any account login or confirmation (strangely you can create an account but can't confirm it). |
Having the same issue. :( Bumping to v6 is going to be a ton of work for me. |
It took a huge amount of work but I moved into v6. |
@Themrpie, that's great to hear that you were able to migrate to v6! We'd love to hear any feedback on how the migration guides and documentation could be improved if it felt like a large amount of work. Feel free to provide any improvements you think we could make on the I'll close this issue out though due to the adding |
Same issue, did anyone find solution for Amplify v5? |
Before opening, please confirm:
JavaScript Framework
React Native
Amplify APIs
Authentication
Amplify Version
v5
Amplify Categories
auth
Backend
Amplify CLI
Environment information
System:
OS: macOS 13.5.1
CPU: (8) arm64 Apple M1
Memory: 102.20 MB / 8.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.8.1 - /opt/homebrew/bin/node
npm: 10.1.0 - /opt/homebrew/bin/npm
Browsers:
Chrome: 119.0.6045.159
Safari: 16.6
npmPackages:
@aws-amplify/react-native: ^1.0.18 => 1.0.20
@aws-amplify/rtn-web-browser: ^1.0.18 => 1.0.20
@babel/core: ^7.20.0 => 7.24.0
@react-native-async-storage/async-storage: ^1.22.3 => 1.22.3
@react-native-community/netinfo: ^11.3.1 => 11.3.1
@react-navigation/native: ^6.1.14 => 6.1.16
@react-navigation/native-stack: ^6.9.22 => 6.9.25
@types/base-64: ^1.0.2 => 1.0.2
@types/react: ~18.2.45 => 18.2.66 (17.0.77)
@types/react-native: ~0.64.12 => 0.64.38
@types/uuid: ^9.0.8 => 9.0.8
HelloWorld: 0.0.1
amazon-cognito-identity-js: ^6.3.12 => 6.3.12
amazon-cognito-identity-js/internals: undefined ()
aws-amplify: ^5.3.17 => 5.3.17
base-64: ^1.0.0 => 1.0.0
expo: ^50.0.13 => 50.0.13
expo-device: ~5.9.3 => 5.9.3
expo-haptics: ~12.8.1 => 12.8.1
expo-linear-gradient: ~12.7.2 => 12.7.2
expo-status-bar: ~1.11.1 => 1.11.1
react: 18.2.0 => 18.2.0
react-native: 0.73.4 => 0.73.4
react-native-get-random-values: ^1.10.0 => 1.11.0
react-native-paper: ^5.12.3 => 5.12.3
react-native-responsive-screen: ^1.4.2 => 1.4.2
react-native-safe-area-context: 4.8.2 => 4.8.2
react-native-screens: ~3.29.0 => 3.29.0
responsive-screen: 0.1.0
responsive-screen-orientation-change: 0.1.0
responsive-screen-styled-components: 0.1.0
typescript: ^5.1.3 => 5.4.2
uuid: ^9.0.1 => 9.0.1 (3.4.0, 8.3.2, 7.0.3)
npmGlobalPackages:
@aws-amplify/cli: 12.3.0
eas-cli: 7.5.0
expo-cli: 6.3.10
npm: 10.1.0
Describe the bug
app build fails when using aws-amplify v5 and amazon-cognito-identity-js
Expected behavior
it should build having the 2 libraries
Reproduction steps
Steps to reproduce:
1 Install amplify in react native expo app following and making sure you are installing the v5:
https://docs.amplify.aws/react-native/start/getting-started/installation/
2 Setup authorization following:
https://docs.amplify.aws/react-native/prev/build-a-backend/auth/set-up-auth/
It will make you install aws-amplify and amazon-cognito-identity-js.
3 Build with: eas build -p ios
You will get the error.
4 execute: npm uninstall amazon-cognito-identity-js
5 execute again: eas build -p ios
And it will build but the authentication won't work. You can create an account but not confirm it.
I've built many apps with Amplify v5 but now when I try to do it I get an error or duplicate symbols.
It's very strange because I also tried by using the same versions that I used in other app with amplify that I'm able to build without issues ("amazon-cognito-identity-js": "^6.3.12" and "aws-amplify": "^5.3.17") and I get the same error.
Hopefully somebody can help me out because I ran out of ideas. I don't want to use v6 yet in part because is not compatible with managed expo and also because I tried by ejecting and building but it didn't work and I've seen others with same and other issues.
Code Snippet
// Put your code below this line.
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
{
"name": "fonoxia",
"version": "1.0.0",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web"
},
"dependencies": {
"@aws-amplify/react-native": "^1.0.18",
"@aws-amplify/rtn-web-browser": "^1.0.18",
"@react-native-async-storage/async-storage": "^1.22.3",
"@react-native-community/netinfo": "^11.3.1",
"@react-navigation/native": "^6.1.14",
"@react-navigation/native-stack": "^6.9.22",
"amazon-cognito-identity-js": "^6.3.12",
"aws-amplify": "^5.3.17",
"base-64": "^1.0.0",
"expo": "^50.0.13",
"expo-device": "~5.9.3",
"expo-haptics": "~12.8.1",
"expo-linear-gradient": "~12.7.2",
"expo-status-bar": "~1.11.1",
"react": "18.2.0",
"react-native": "0.73.4",
"react-native-get-random-values": "^1.10.0",
"react-native-paper": "^5.12.3",
"react-native-responsive-screen": "^1.4.2",
"react-native-safe-area-context": "4.8.2",
"react-native-screens": "~3.29.0",
"uuid": "^9.0.1"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@types/base-64": "^1.0.2",
"@types/react": "~18.2.45",
"@types/react-native": "~0.64.12",
"@types/uuid": "^9.0.8",
"typescript": "^5.1.3"
},
"private": true
}
The text was updated successfully, but these errors were encountered: