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

[v4] State update warning related to BottomSheetBackdrop on closing #1376

Closed
nihilenz opened this issue May 18, 2023 · 12 comments · Fixed by #1657
Closed

[v4] State update warning related to BottomSheetBackdrop on closing #1376

nihilenz opened this issue May 18, 2023 · 12 comments · Fixed by #1657
Labels
bug Something isn't working no-issue-activity

Comments

@nihilenz
Copy link

Bug

After upgrading to 4.4.6 from 4.3.2, we have occasionally noticed this warning related to BottomSheetBackdrop when closing the bottom sheet:

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 BottomSheetBackdrop

BottomSheetBackdrop usage:

backdropComponent={backdropProps => (
  <BottomSheetBackdrop {...backdropProps} disappearsOnIndex={-1} appearsOnIndex={0} pressBehavior="close" />
)}

Environment info

Library Version
@gorhom/bottom-sheet 4.4.6
react-native 0.67.5
react-native-reanimated 2.2.4
react-native-gesture-handler 2.4.2

Steps To Reproduce

It happens occasionally both on Android and iOS.
I think it only happens with the modal component.
The warning appears when the sheet is closed (tap on backdrop, drag gesture or programmatically)

Reproducible sample code

@nihilenz nihilenz added the bug Something isn't working label May 18, 2023
@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@donatoaguirre24
Copy link

not stale

@AZ604
Copy link

AZ604 commented Jun 27, 2023

Currently facing the same issue with 4.4.7, RNGH 2.8.0 and reanimated 2.4.1

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@donatoaguirre24
Copy link

not stale

@AZ604
Copy link

AZ604 commented Aug 10, 2023

I was able to remove the warning(error) by applying a patch from this old pr:
#1167
But I get a different warning now:

Error evaluating injectedJavaScript: This is possibly due to an unsupported return type. Try adding true to the end of your injectedJavaScript string. Error Domain=WKErrorDomain Code=5 "JavaScript execution returned a result of an unsupported type" UserInfo={NSLocalizedDescription=JavaScript execution returned a result of an unsupported type}

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions
Copy link

This issue was closed because it has been stalled for 5 days with no activity.

@nihilenz
Copy link
Author

Please re-open, it's a very annoying issue

@louisiscoding
Copy link

Please re-open. Still occurs

@christophby
Copy link

Still occurs

@christophby
Copy link

I created a PR which fixes the issue for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working no-issue-activity
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants