Closed Srikanth-PSIOG closed 1 month ago
Hello @Srikanth-PSIOG, and thanks for opening this issue. Can you clarify if you're seeing this in both production builds as well as dev/testing? Or does this only happen when running the app locally?
Hello @cwomack This issue persists across all environments (local, dev, and production build). We upgraded our React app from v17.0.2 to v18, and we've been experiencing this problem since then. We attempted to downgrade the React app back to v17, and everything worked fine.
@cwomack Any updates on this?
hello @cwomack , any updates/workaround for this issue?
@sriranjanivenkatesan, in reviewing your dependencies again it looks like you may have duplicates that could cause issues. Can you run npm list aws-amplify
(or yarn why aws-amplify
) to see if you possibly have duplicates?
If there's no duplicates, then both you and @Srikanth-PSIOG have stated that this happened when upgrading to React v18... leading me to think it might mean the changes to how the useEffect()
hook behaves as of v18 might have an impact here. Are either of you running this in Strict Mode by chance?
@sriranjanivenkatesan and @Srikanth-PSIOG, let me know if you're still experiencing this and had a chance to review the comment above!
Closing this issue as we have not heard back from you. If you are still experiencing this, please feel free to reply back and provide any information previously requested and we'd be happy to re-open the issue.
Thank you!
Before opening, please confirm:
JavaScript Framework
React
Amplify APIs
Authentication
Amplify Categories
auth
Environment information
Describe the bug
Encountering an issue with authentication using Google sign-in and the cognitoHostedUI option in AWS Amplify while working with React18. When attempting a federated sign in with Google, the Hub is not listening to any authentication events, and there is no response.
However, it is listening to events with react version 17.0.2
Expected behavior
Hub listening to events from federated signIn and returning events indicating the type of event occurred which seems to be working as expected in React v17.0.2
Below are the
console.log
that are printed with React17Reproduction steps
Configure a react app and amplify with the following versions:
Code Snippet
Log output
aws-exports.js
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
Ref Issues #7555