stream-chat-react-native
stream-chat-react-native copied to clipboard
ModalPopup or BottomSheetPopup showing randomly on anyscreen.
Hello @vishalnarkhede @madsroskar Describe the bug Some strange modal showing randomly on any screen. I have attach the screenshots of inspect on that modal. It is something regarding to AttacmentPickerBottomSheet.
Dev environment info
- stream-chat-react-native version : ^4.3.1
- react-native version : 0.63.4
- only android devices
To Reproduce The popup shown randomly on any screen.
Expected behavior The popup should not shown on any random screens.
Screenshots

gz#21832
related to #1179
hi @rajkapoordev, Thanks for filing this issue. I haven't been able to reproduce this.
is it possible for you to give us any clue about how to reproduce this? Also, It would be great if you can give us a repo where we can reproduce this.
@santhoshvai Don't have any clue but it appears when the keyboard is open or close.
@santhoshvai , Please check this https://github.com/GetStream/stream-chat-react-native/issues/1179#issuecomment-1132889971
Closing this is a copy of issue
@santhoshvai , Please check this #1179 (comment)
Hey @rajkapoordev, This solution would have worked. But the same error could have happened when images were set. I found a race condition that would cause this issue. We have published a beta version v4.5.1-beta.1 with the fix for this race condition. Could you please upgrade the library, test, and confirm with us?
:tada: This issue has been resolved in version 4.6.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Unfortunately this is still an issue in 4.9.0
@dariusmandres Could you update the package @gorhom/bottom-sheet to the latest version and check again and report here please. We cannot reproduce it anymore after we updated it.
@santhoshvai I tried it with [email protected] and @gorhom/[email protected], which is the latest as of right now.
Although, for me this specifically happens in the Channel screen, using the MessageInput component. On Android, when tapping the input to type, the bottom sheet appears.
I have fixed it by manually applying this patch since I do not currently use attachements.
diff --git a/node_modules/stream-chat-react-native-core/src/components/AttachmentPicker/AttachmentPicker.tsx b/node_modules/stream-chat-react-native-core/src/components/AttachmentPicker/AttachmentPicker.tsx
index c3992d5..bfe70cb 100644
--- a/node_modules/stream-chat-react-native-core/src/components/AttachmentPicker/AttachmentPicker.tsx
+++ b/node_modules/stream-chat-react-native-core/src/components/AttachmentPicker/AttachmentPicker.tsx
@@ -502,6 +502,8 @@ export const AttachmentPicker = React.forwardRef(
[initialSnapPoint, finalSnapPoint],
);
+ return null;
+
return (
<>
<BottomSheet
reopening this as it still happens according to multiple reports
@dariusmandres Thank you for this workaround - it has helped us enormously.
@santhoshvai is there any solution of that yet ?
Hi @jayeshpurohit12 @dariusmandres @rajkapoordev @GregAtFramework
We have published a new beta version v5.4.2-beta.2 that aims to fix this issue. Could you please upgrade to this version and remove the patch package to AttachmentPicker.tsx (if any) and see if it's fixed?
I believe that this happens due to a race condition in the bottom sheet library. I was able to create a reproducible scenario and fix it there. But we want your feedback to confirm if this bug has been squashed out finally. It would be immensely helpful if you could test and report to us.
also, many thanks for sharing the patch-package workaround @dariusmandres and @GregAtFramework!
Closing this issue as it should be fixed as of version 5.4.2
Closing this issue as it should be fixed as of version 5.4.2
The issue still occurs for me on 5.4.2
@testanib could you send us a screenrecording or a reproducible repo please. We are not able to reproduce it anymore.