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

getRefNativeTag : RN 0.72.1 error new error #1438

Closed
billnbell opened this issue Jul 9, 2023 · 16 comments
Closed

getRefNativeTag : RN 0.72.1 error new error #1438

billnbell opened this issue Jul 9, 2023 · 16 comments
Labels
bug Something isn't working no-issue-activity

Comments

@billnbell
Copy link

Bug

Issue on React Native 0.72.1 when using GetStream and use_framework static - throw new Error happening in getRefNativeTag
with Unexpected nativeTag ...

Environment info

Library Version
@gorhom/bottom-sheet 4.4.5
react-native 0.72.1
react-native-reanimated 3.3.0
react-native-gesture-handler 2.12.0
stream-chat-react-native 5.15.2

Steps To Reproduce

  1. Load app after installing getstream react native library - stream-chat-react-native v5.15.2
  2. Exception is thrown in getRefNativeTag()

Describe what you expected to happen:

  1. No exception.

Reproducible sample code

Happy if you need more examples.

@billnbell billnbell added the bug Something isn't working label Jul 9, 2023
@billnbell billnbell changed the title [v4] | [v2] Issue title getRefNativeTag : RN 0.72.1 error new error Jul 9, 2023
@dev-fredericfox
Copy link

I have the same error in every scrollable component. BottomSheetView seems to work fine.

@billnbell
Copy link
Author

True. So I commented that code out and I am good. Throwing an exception when it works without it - maybe it should be a warning?

@gorhom+bottom-sheet+4.4.5.patch

diff --git a/node_modules/@gorhom/bottom-sheet/src/utilities/getRefNativeTag.ts b/node_modules/@gorhom/bottom-sheet/src/utilities/getRefNativeTag.ts
index d4f3cc4..794a175 100644
--- a/node_modules/@gorhom/bottom-sheet/src/utilities/getRefNativeTag.ts
+++ b/node_modules/@gorhom/bottom-sheet/src/utilities/getRefNativeTag.ts
@@ -27,17 +27,17 @@ export function getRefNativeTag(ref: unknown) {
     nativeTag = ref.current._nativeTag;
   }
 
-  if (!nativeTag || typeof nativeTag !== 'number') {
-    throw new Error(
-      `Unexpected nativeTag: ${refType}; nativeTag=${nativeTag} 
+  // if (!nativeTag || typeof nativeTag !== 'number') {
+  //   throw new Error(
+  //     `Unexpected nativeTag: ${refType}; nativeTag=${nativeTag} 
 
-			createBottomSheetScrollableComponent's ScrollableComponent needs to return 
-			a reference that contains a nativeTag to a Native HostComponent.
+	// 		createBottomSheetScrollableComponent's ScrollableComponent needs to return 
+	// 		a reference that contains a nativeTag to a Native HostComponent.
 
-			ref=${ref}
-			`
-    );
-  }
+	// 		ref=${ref}
+	// 		`
+  //   );
+  // }
 
   return nativeTag;
 }

@fgagneten
Copy link

fgagneten commented Jul 18, 2023

Same issue here. It happens to me with virtualized list an a modal action sheet

@vhakulinen
Copy link

I encountered this issue when trying out the new architecture.

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

@jspizziri
Copy link

@gorhom this seems to be a thing. Please reopen.

@nartjie101
Copy link

I got the same issue :(

@mordonez-me
Copy link

This happens with new architecture

@keithchan-bowtie
Copy link

This happens with new architecture.
Please reopen it!

If I comment the error like @billnbell , the scrollable content won't be shown but I can see the BottomSheet attached on the screen. (using Element Inspector)

@theyanniss23002
Copy link

react-native version 0.73, bottom-sheet version 4.5.1 and the problem still remains, there is no error when opening, but if inside the bottom-sheet you do an onPress event or something like that, this error appears
Снимок экрана 2023-12-13 в 17 28 29
Снимок экрана 2023-12-13 в 18 32 45

@Crhis35
Copy link

Crhis35 commented Dec 23, 2023

I found this partial solution:
https://gorhom.github.io/react-native-bottom-sheet/troubleshooting/#adding-horizontal-flatlist-or-scrollview-is-not-working-properly-on-android

Using ScrollView instead of BottomSheetScrollView
Screenshot 2023-12-23 at 9 31 00 AM

@parkwherever
Copy link

Using ScrollView conflicts with the resolution to dynamic sizing: #1573

@vishalsaini26
Copy link

I found this partial solution: https://gorhom.github.io/react-native-bottom-sheet/troubleshooting/#adding-horizontal-flatlist-or-scrollview-is-not-working-properly-on-android

Using ScrollView instead of BottomSheetScrollView Screenshot 2023-12-23 at 9 31 00 AM

That seems to solves the issue

@victorneuret
Copy link

Had a similar issue with BottomSheetFlatList. Replacing it by FlatList fixed it for me

@khushal87
Copy link

The question is: Is replacing the Flatlist of the bottom sheet with that of the gesture handler a proper solution?

@gorhom

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

No branches or pull requests