-
Notifications
You must be signed in to change notification settings - Fork 41
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
Component 'NVSearchBar' re-registered direct event 'topChangeText' as a bubbling event #829
Comments
Hi, nice to hear from you. I just created a brand new react-native app and set it up with the Navigation router and didn't face that problem. I've debugged it to where your error is coming from (line 1475 of the RCTUIManager) and you can see that the Navigation router has Maybe you could open the project in XCode and debug it to the same point to see what you get? |
is it also with new arch enabled ? I forgot to mention that I'm using expo "prebuild" it could be also be a problem with the dev client. |
Yea it's with new arch enabled but I'm not using expo. Yes please, can you investigate where the topChangeText is showing up. Is it in the bubblingEvents? Maybe you could show me the same screenshot as I included? Also, if it shows up under bubblingEvents then how does it hit the error? Maybe stop it just before the error and then show me the screen shot? |
Also, I noticed it's a DirectEventHandler in the native spec instead of a BubblingEventHandler. I wonder if expo is doing something with the native spec that bare React Native isn't. Could you edit it to a BubblingEventHandler, pod install again and see what happens, please? |
Great, thanks. But then how does it hit the error condition. If you press play in xcode does it throw an error? Or does it only throw if running through expo |
yes of course it does throw using xcode I just made a video of me stepping over. I'm trying to shrink it to 10mb so I can upload it. |
Oh, I just saw you said that topChangeText is in directEvents. It isn't for me? I wonder why the difference? |
here tell me if this is helpful. recs.mp4 |
I have the breakpoint set with the condition can you be more specific about which property of viewConfig you want to inspect? |
I've got RNSSearchBarManager! that is react native screen if Im not mistaken but I'm not using this lib anymore. |
Aha!! Yep, there it is Pretty sure everything will work if you uninstall react-native-screens |
I will delete it from package.json so the pods don't get installed and see if this is really fixed or maybe expo is doing something weird with the setup. While I have you here I don't want to impose too much but I have an other bug on android regarding the Sheet. should I open a new issue? |
Yes, please open a new issue 🙏 |
You're definitely not imposing. I appreciate your feedback and I'm always happy to help |
That did it. I deleted the rn screen entry from package.json and reinstalled the pods no more errors! It's possible the other Sheet bug is also related to rn screen I will keep investigating. |
While not technically a bug I definitely don't want other users to face this when moving to the Navigation router. Would you be interested in working on a PR? We can chat through the solution as much as you want. Anyway, your choice, let me know |
Sure it's no big deal I'd be happy to do it. I'm thinking maybe a new section for tips or migrating from expo/react-navigation. I'll think about it a bit more and let you know what I come up with. |
I was thinking we could rename the event to avoid the clash. It's just an internal name so we can call it whatever we want |
While investigating this I noticed that it's a DirectEvent in the spec. So if it's actually already a DirectEvent we could just make it one in the objective-c and wouldn't have to even rename it. But we'd have to check whether it's bubbling or not first |
On Android it's already a direct event so I'm happy if we change it to a RCTDirectEventBlock on iOS. Then it won't clash with react-native-screens |
so simply changing it from RCTBubblingEventBlock to a RCTDirectEventBlock will fix potential conflicts ? I can do the pr but it looks line 1 line change I'm not sure if it's worth it. what do you think? I still think is is also important to inform users that some expo packages such as expo-system-ui or expo-status-bar will have some weird interference. I had this bug on IOS where the navigation bar tint would not be set to my values. removed the packages and it's stable now. I'm not sure which one was the culprit but I didid't need any of them anyway. |
Yea, changing it from I'd really appreciate a PR. If you could retest the error scenario and check it works. You can I didn't know about the other expo conflicts you mentioned. It would be great to compile a list so if you track down what it was please let me know. |
ok I still have a branch with the old deps so It should not be too hard to test it. I will also check which package was messing with the nav bar colors and let you know. |
Oh, don't forget to |
I'm running the latest version and I get this error when I try to launch a scene. Only IOS is complaining.
deps
in the code below HomeScreen can be any view it doesn't seem to affect the result.
I've tried removing as much stuff as possible but again the bug is still there
report.txt
The text was updated successfully, but these errors were encountered: