Yes it starts scrolling into the correct direction but before reaching the end of the scrollview, it will scroll into the opposing direction. It will actually scroll up and down in the same bounds after that for a few times.
The question is, how does appium/UIAutomator recognize if a scrollview end has been reached or not. My current guess is, it will take elements inside the scrollview and compare the location of those elements before and after scrolling. If the location is the same after scrolling, it changes scroll directions.
We are using many very generic elements inside the app, for this reason I think the UIAuotmator might confuse another element for the one it scanned before scrolling and misjudges the descision to start scrolling into the opposite direction.
i.e. My guess is, the scroll algorithm has no certain way to tell if a scrollview end has been reached, instead it will guess based on child elements if the end has been reached or not