-
Notifications
You must be signed in to change notification settings - Fork 318
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
@aws-amplify/ui-react@2.2.1 buttons (in components), or e.g. signOut() from AuthContext stopped working #1226
Comments
Hi @coderbyheart 👋 thank you for raising this issue. I was able to reproduce the issue with the steps to reproduce. However, this doesn't seem to happen on Next, CRA, and/or webpack apps as I wasn't able to reproduce the behavior on a fresh start using those tools. I'm not too familiar with Vite but maybe that's part of the issue. I'm going to transfer this issue over to the UI repo for better support. |
Thanks for raising this issue! This is weird because the only two changes between
I suspect it's the former because the latter doesn't impact auth flows. We will take a look at our earliest capacity. Meanwhile, can you try https://docs.npmjs.com/cli/v8/configuring-npm/package-json#overrides to force
and let us know if that resolves it? |
Yes, pinning xstate to 4.29.0 fixes the problem. |
Thank you for verifying, please hold onto that workaround while we come up with a holistic fix for bumping |
Update: we'll be pinning to This is what you already have on your |
@coderbyheart Just to be 100% |
@wlee221 I've added it to the PR already to verify. End-to-end tests pass now: see NordicSemiconductor/asset-tracker-cloud-app-aws-js@7f62818 |
Sorry, I see now that it's 4.28 (twenty eight), I was using 4.29 (twenty nine). Will try. |
4.28.0 works as well: NordicSemiconductor/asset-tracker-cloud-app-aws-js@8089019 |
Much appreciate your fast response. We'll merge #1230 and have it released ETA 02/03. |
I have the same trouble in a CRA app when i update in 2.2.1. I tried the overrides workaround, it doesn't for me but i'm not sure that i did it well. |
@LeJ84, we just released this fix to |
Sorry for the time to answer, but i confirm that 2.2.2 fixes that problem ! Good job ! |
Awesome! |
I tried the 2.2.1, 2.2.2, and 2.3.0 with and without the xstate override, but unfortunately the buttons were still dead (using withAuthenticator in CRA). Was able to get back on track with 2.2.0 |
I was having this issue as well and wanted to give ya'll one more data point. The xstate override solution did not work for me.
Trying 2.2.2 and 2.3.0 did not work either. I was able to get it to work with 2.2.0 |
Weird... As mentioned the only impactful change from @juliojimenez and @srianbury, can you please provide us a repro repo that we can inspect? And just to confirm, you're on NPM 8+ and not on yarn or other package manager, right? |
^ edited for typo, Also, any lockfile will be helpful! One for |
@wlee221 Thanks for the info! I did not know that. I am using yarn. It looks like the yarn alternative is |
Thanks for the quick response 🙏 Can you try |
@wlee221
With yarn fixed the issue in 2.2.1 for me |
Glad it worked! At the same time I'm very confused because that's exactly what #1230 in Can you try nuking your lockfile and reinstall everything with ui-react@2.2.2? |
It might've had something to do with the lock file. When I switched from |
The buttons are not working when I use 2.2.2 Here's the package.json for the 2.2.2 version (this did not work) 2.2.2 package.json |
Ah I see why... gatsby itself depends on For now, please dedupe |
Working on #1346 to declare xstate at |
For what it's worth. I also ran into this issue because I had |
Hi @coderbyheart, sorry it took a while! We just updated our xstate dependency to be more compatible to avoid package duplications. This will be released next Tuesday, and will let you know once that happens. This should remove the need to use |
Before opening, please confirm:
JavaScript Framework
React
Amplify APIs
Authentication
Amplify Categories
auth
Environment information
Describe the bug
Upgrading from @aws-amplify/ui-react 2.2.0 to 2.2.1 breaks UI interaction:
sign in
button in the sign in component does nothingsignOut()
function in React does nothing.Running it with
Amplify.Logger.LOG_LEVEL = 'DEBUG';
shows nothing in the console.I have an app that has end-to-end tests, which now fail: NordicSemiconductor/asset-tracker-cloud-app-aws-js#9
Expected behavior
Clicking the
sign in
button should log the user in.Calling
signOut()
should log the user out.Reproduction steps
Start the app
Open the browser and the printed URL, select the "Create Account" tab, and fill in some details.
Click "Create Account".
Nothing happens.
If you downgrade to @aws-amplify/ui-react@2.2.0 creating an account works.
Code Snippet
See STR.
Log output
No log output when I click the "Create Account" button.
aws-exports.js
No response
Manual configuration
No response
Additional configuration
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: