unoplatform / uno

Open-source platform for building cross-platform native Mobile, Web, Desktop and Embedded apps quickly. Create rich, C#/XAML, single-codebase apps from any IDE. Hot Reload included! 90m+ NuGet Downloads!!
https://platform.uno
Apache License 2.0
8.89k stars 719 forks source link

Calling the unimplemented method ScrollTo on ScrollView results in the exception Vector3KeyFrameAnimation Compositor.CreateVector3KeyFrameAnimation() is not implemented on Androis, iOS and WASM #17080

Open BrianDT opened 4 months ago

BrianDT commented 4 months ago

Current behavior

Displays the fatal exception System.NotImplementedException Message=The member Vector3KeyFrameAnimation Compositor.CreateVector3KeyFrameAnimation() is not implemented. For more information, visit https://aka.platform.uno/notimplemented#m=Vector3KeyFrameAnimation%20Compositor.CreateVector3KeyFrameAnimation%28%29

Expected behavior

If the function is not implemented that's fine bit it should not do anything and should not crash.

How to reproduce it (as minimally and precisely as possible)

Sample on https://github.com/BrianDT/UnoScrollToIssue

Workaround

Add an #if WINDOWS around the code

Works on UWP/WinUI

Yes

Environment

Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia

NuGet package version(s)

5.2.161

Affected platforms

WebAssembly, Android, iOS

IDE

Visual Studio 2022

IDE version

17.10.1

Relevant plugins

No response

Anything else we need to know?

No response

Youssef1313 commented 4 months ago

ScrollView is currently supported only on Skia

BrianDT commented 4 months ago

ScrollView is currently supported only on Skia

That’s all very well, but I would have thought that anything not supported should be benign, not partially implemented in such a way that triggers a fatal exception.

jeromelaban commented 4 months ago

@BrianDT this type is marked as https://github.com/unoplatform/uno/blob/f2534bec256305bdb04d35cd397cd0d3c767abaa/src/Uno.UI/Microsoft/UI/Xaml/Controls/ScrollView/ScrollView.cs#L31, so this should have raised Uno0001 in your code.