Skip to content
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

React warning is thrown when leaving phone verification. #1004

Closed
tomalec opened this issue Sep 9, 2021 · 0 comments · Fixed by #1007
Closed

React warning is thrown when leaving phone verification. #1004

tomalec opened this issue Sep 9, 2021 · 0 comments · Fixed by #1007
Labels
type: bug The issue is a confirmed bug.

Comments

@tomalec
Copy link
Member

tomalec commented Sep 9, 2021

Describe the bug:

React warns: Can't perform a React state update on an unmounted component when you leave the phone verification component while the verification process/promise is pending.

Expected behavior:

No warning should be thrown.

Actual behavior:

React throws:
reaxct state

Can't perform a React state update on an unmounted component
Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function.
    in VerifyPhoneNumberContent (created by DemoVerifyPhoneNumberCard)
    in div (created by Context.Consumer)
    in CardUI (created by Card)
    in Card (created by Card)
    in Card (created by AccountCard)
    in AccountCard (created by DemoVerifyPhoneNumberCard)
    in div (created by DemoVerifyPhoneNumberCard)
    in section (created by DemoVerifyPhoneNumberCard)
    in DemoVerifyPhoneNumberCard (created by Settings)
    in div (created by Settings)
    in Settings (created by ee)
    in Suspense (created by ee)
    in ee (created by bt)
    in div (created by bt)
    in div (created by ht)
    in ht (created by bt)
    in div (created by bt)
    in slot_fill_provider_SlotFillProvider (created by Provider)
    in provider_SlotFillProvider (created by Provider)
    in Provider (created by bt)
    in bt
    in Unknown (created by WithSelect(bt))
    in WithSelect(bt) (created by WithPluginsHydration(WithSelect(bt)))
    in WithPluginsHydration(WithSelect(bt)) (created by Context.Consumer)
    in t
Warning: Each child in a list should have a unique "key" prop.
react_devtools_backend.js:4049 Warning: Each child in a list should have a unique "key" prop.

Check the render method of `ForwardRef(Button)`. It was passed a child from AppButton. See https://fb.me/react-warning-keys for more information.
    in Qc (created by AppButton)
    in ForwardRef(Button) (created by AppButton)
    in AppButton (created by VerifyPhoneNumberContent)
    in div (created by Context.Consumer)
    in Flex (created by ForwardRef(FlexComponent))
    in ForwardRef(FlexComponent) (created by VerifyPhoneNumberContent)
    in div (created by Subsection)
    in Subsection (created by VerifyPhoneNumberContent)
    in div (created by Context.Consumer)
    in BodyUI (created by CardBody)
    in CardBody (created by Body)
    in Body (created by VerifyPhoneNumberContent)
    in VerifyPhoneNumberContent (created by DemoVerifyPhoneNumberCard)
    in div (created by Context.Consumer)
    in CardUI (created by Card)
    in Card (created by Card)
    in Card (created by AccountCard)
    in AccountCard (created by DemoVerifyPhoneNumberCard)
    in div (created by DemoVerifyPhoneNumberCard)
    in section (created by DemoVerifyPhoneNumberCard)
    in DemoVerifyPhoneNumberCard (created by Settings)
    in div (created by Settings)
    in Settings (created by ee)
    in Suspense (created by ee)
    in ee (created by bt)
    in div (created by bt)
    in div (created by ht)
    in ht (created by bt)
    in div (created by bt)
    in slot_fill_provider_SlotFillProvider (created by Provider)
    in provider_SlotFillProvider (created by Provider)
    in Provider (created by bt)
    in bt
    in Unknown (created by WithSelect(bt))
    in WithSelect(bt) (created by WithPluginsHydration(WithSelect(bt)))
    in WithPluginsHydration(WithSelect(bt)) (created by Context.Consumer)
    in t
    in t
    in t
    in Unknown (created by WithOptionsHydration(Component))
    in WithOptionsHydration(Component) (created by WithSettingsHydration(WithOptionsHydration(Component)))
    in WithSettingsHydration(WithOptionsHydration(Component)) (created by WithSettingsHydration(WithSettingsHydration(WithOptionsHydration(Component))))
    in WithSettingsHydration(WithSettingsHydration(WithOptionsHydration(Component))) (created by WithCurrentUserHydration(WithSettingsHydration(WithSettingsHydration(WithOptionsHydration(Component)))))
    in WithCurrentUserHydration(WithSettingsHydration(WithSettingsHydration(WithOptionsHydration(Component))))

Steps to reproduce:

  1. Go to phone verification settings /wp-admin/admin.php?page=wc-admin&path=%2Fgoogle%2Fsettings
  2. Click "Send verification code"
  3. Input 123456
  4. Navigate away

Additional details:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug The issue is a confirmed bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant