stream-chat-react-native icon indicating copy to clipboard operation
stream-chat-react-native copied to clipboard

ModalPopup or BottomSheetPopup showing randomly on anyscreen.

Open rajkapoordev opened this issue 3 years ago • 12 comments

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

rajkapoordev avatar Apr 14 '22 07:04 rajkapoordev

related to #1179

santhoshvai avatar May 19 '22 07:05 santhoshvai

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 avatar May 19 '22 19:05 santhoshvai

@santhoshvai Don't have any clue but it appears when the keyboard is open or close.

rajkapoordev avatar May 20 '22 06:05 rajkapoordev

@santhoshvai , Please check this https://github.com/GetStream/stream-chat-react-native/issues/1179#issuecomment-1132889971

rajkapoordev avatar May 20 '22 13:05 rajkapoordev

Closing this is a copy of issue

vanGalilea avatar May 20 '22 18:05 vanGalilea

@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?

santhoshvai avatar May 23 '22 09:05 santhoshvai

:tada: This issue has been resolved in version 4.6.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

vishalnarkhede avatar May 25 '22 08:05 vishalnarkhede

Unfortunately this is still an issue in 4.9.0

dariuscosden avatar Aug 29 '22 10:08 dariuscosden

@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 avatar Aug 29 '22 16:08 santhoshvai

@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

dariuscosden avatar Aug 29 '22 17:08 dariuscosden

reopening this as it still happens according to multiple reports

santhoshvai avatar Sep 19 '22 18:09 santhoshvai

@dariusmandres Thank you for this workaround - it has helped us enormously.

GregAtFramework avatar Sep 27 '22 13:09 GregAtFramework

@santhoshvai is there any solution of that yet ?

jayeshpurohit12 avatar Oct 14 '22 03:10 jayeshpurohit12

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!

santhoshvai avatar Oct 19 '22 15:10 santhoshvai

Closing this issue as it should be fixed as of version 5.4.2

santhoshvai avatar Oct 21 '22 16:10 santhoshvai

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 avatar Oct 24 '22 22:10 testanib

@testanib could you send us a screenrecording or a reproducible repo please. We are not able to reproduce it anymore.

santhoshvai avatar Oct 26 '22 12:10 santhoshvai