You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ScrollView: Unsupported top level event "topScroll" dispatched #16522
@hramos I am having the same problem. I think horizontal scrollview has a trouble in all cases.
It works well on react-native@0.49.5, but this error has occurred since version react-native@0.50.0-rc.0
The following simple code also causes an error when scrolling. tested on API 23(Android 6.0) and 24(Android 7.0).
I believe this is related to changes on the native (UIManager) side and should be resolved with commit fdf0495.
The underlying cause was due to the way UIManager previously registered "default" event types. It was assumed that the first view manager to be loaded via requireNativeComponent would get the default events mixed in with its view-specific events. Unfortunately it turned out that in some cases, code referenced a view manager via UIManager.*before (or outside of) the first requireNativeComponent call, causing default event-types like "topScroll" to be lost.
The fix (fdf0495) was to refactor the native and JS code to explicitly request default event types.
Reacted by Steffen Matthischke, Rob Stringer, Amir, Mohamed Anouar KOTTI, chrusart, byggahus-christian, Bartosz Sumper, Colin McArdell, Horcrux, Kyle Roach and 14 more
After upgrading to v0.54.0, this error didn't trigger any more - thanks @hramos! :)
To give some more context, I'm setting the horizontal prop to true in the ScrollView component, this specific error was triggering on Android before when I was running v0.50.3.
We still encounter this issue with 0.55.4. We created a new project with react-native init ExampleApp, and then added two simple screens for NavigatorIOS to navigate between. We get the Unsupported top level event "topScroll" dispatched when the back button of the navigator is clicked. If we wrap the screens with ScrollView it works.
Reacted by Wan Yi, huyhai, Alexander and Artem Grunichev
We are seeing this error in rect-native 0.55.4.
For us, removing the key prop from child views mostly did the trick, but it's hackish and triggers the missing key warning.
Even without the key prop, the error happens on Samsung Galaxy S8 devices (and looks like S9, S7, S6, S5, but not personally verified). On Samsung devices, it seems to happen only on Release-signed builds. 0.55.4 fixes the Samsung issue.
If the bug cause from Navigation and your needs are urgent & want to accomplish not scrollable component, you can solve it with using ScrollView and disable its scroll with scrollEnabled='false' for a temporary a way of running from the error.
<ScrollViewscrollEnabled='false'>
<SafeAreaView>
<View>
<Text>Current Scene: {this.props.title}</Text>
<ButtononPress={this._onForward}
title="Tap me to load the next scene"
/>
</View>
</SafeAreaView>
</ScrollView>
Is the root cause the same for other this kind of errors? I get one with gestures with both react-navigation and my own code. Both iOS and Android. This is a show stopper, as the app does not work at all anymore.
Activity
hramos commentedon Oct 24, 2017
Can you reproduce the issue using Snack? This step is necessary for people to be able to see and debug the issue being reported.
znacloud commentedon Oct 25, 2017
Sorry, the target platform should be Android(8.0.0)
znacloud commentedon Oct 25, 2017
@hramos Sorry, I'm not familiar with Snack。Here is exception stack:
when I remove key props from Image tag which is child of ScollView, this error dispears and show a WARNING instead.
ifsnow commentedon Nov 6, 2017
@hramos I am having the same problem. I think horizontal scrollview has a trouble in all cases.
It works well on react-native@0.49.5, but this error has occurred since version react-native@0.50.0-rc.0
The following simple code also causes an error when scrolling. tested on API 23(Android 6.0) and 24(Android 7.0).
codeYDH commentedon Nov 6, 2017
@hramos I am having the same problem.
kelset commentedon Nov 6, 2017
Same issue here, tested on Android 7.1.2 and got this error for multiple events:
@hramos I don't think it's replicable with Snack because it's related to RN 0.50
rabingaire commentedon Nov 6, 2017
bvaughn commentedon Nov 6, 2017
I believe this is related to changes on the native (
UIManager) side and should be resolved with commit fdf0495.The underlying cause was due to the way
UIManagerpreviously registered "default" event types. It was assumed that the first view manager to be loaded viarequireNativeComponentwould get the default events mixed in with its view-specific events. Unfortunately it turned out that in some cases, code referenced a view manager viaUIManager.*before (or outside of) the firstrequireNativeComponentcall, causing default event-types like "topScroll" to be lost.The fix (fdf0495) was to refactor the native and JS code to explicitly request default event types.
Kottidev commentedon Nov 7, 2017
@hramos we need to fix it quickly , many apps use ScrollView with horizontal=true
ide commentedon Nov 7, 2017
Cherry-picked 1b71e03 into 0.50.2, which is now on npm.
amirkheirabadi73 commentedon Nov 8, 2017
I still have this problem into 0.50.2
awnali commentedon Nov 8, 2017
i also faced same issue and then changed the react-native version from 0.50 to 0.49.* and everything works.
PetrVasilev commentedon Nov 9, 2017
Yes! I also have this very bad problem, which killed my app
kelset commentedon Nov 10, 2017
EDIT: actually I still have the issue, probably I didn't properly re-tested until today.
Omniwheel commentedon Nov 10, 2017
Still having the issue in 0.50.3.
91 remaining items
AliSarraf commentedon Apr 21, 2018
After upgrading to v0.54.0, this error didn't trigger any more - thanks @hramos! :)
To give some more context, I'm setting the horizontal prop to true in the ScrollView component, this specific error was triggering on Android before when I was running v0.50.3.
wnr commentedon May 9, 2018
We still encounter this issue with 0.55.4. We created a new project with
react-native init ExampleApp, and then added two simple screens forNavigatorIOSto navigate between. We get theUnsupported top level event "topScroll" dispatchedwhen the back button of the navigator is clicked. If we wrap the screens withScrollViewit works.eroosenmaallen commentedon Jun 28, 2018
We are seeing this error in rect-native 0.55.4.
For us, removing the key prop from child views mostly did the trick, but it's hackish and triggers the missing key warning.
Even without the key prop, the error happens on Samsung Galaxy S8 devices (and looks like S9, S7, S6, S5, but not personally verified). On Samsung devices, it seems to happen only on Release-signed builds. 0.55.4 fixes the Samsung issue.
torbentschechne commentedon Aug 27, 2018
Hello,
I use 0.56 and still see this issue on iOS. I am using NavigatorIOS - this issue is still not solved, is it?
igrishaev commentedon Sep 6, 2018
So do I with NavigatorIOS. The red screen with the same error occurs when I go back to the previous view.
clewiston commentedon Sep 26, 2018
I'm seeing this in react-native ^0.56.0. Is the workaround still to wrap the NavigationIOS component in a ScrollView?
eliakorkmaz commentedon Dec 13, 2018
version: 0.57.1, when you popBack with using NavigationIOS, this error happens.
eliakorkmaz commentedon Dec 13, 2018
If the bug cause from
Navigationand your needs are urgent & want to accomplish not scrollable component, you can solve it with usingScrollViewand disable its scroll withscrollEnabled='false'for a temporary a way of running from the error.tapz commentedon Mar 29, 2019
Is the root cause the same for other this kind of errors? I get one with gestures with both react-navigation and my own code. Both iOS and Android. This is a show stopper, as the app does not work at all anymore.
"react": "16.8.6",
"react-native": "0.59.2",
"react-native-gesture-handler": "1.1.0",
"react-navigation": "3.5.1",
React sync for revisions 85d05b3...4eeee35