Loading Lottie library causes the app to crash when it is installed from the Microsoft Store
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- csharp
- Lĩnh vực
- build-system, desktop
Hướng nghiên cứu
Bắt đầu với AppxManifest được tạo và đích .wapproj loại bỏ các mục khỏi _AppxWinmdFilesToHarvest. So sánh gói được cài đặt cục bộ với gói được cài đặt từ Microsoft Store, tập trung vào việc kích hoạt LottieVisualSource và các mục máy chủ in-process trùng lặp. Hoàn tất khi gói Store cài đặt và hiển thị hoạt ảnh Lottie mà không có ngoại lệ về manifest hoặc kích hoạt.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I'm building a WPF application and using Lottie in an Xaml Islands custom component.
When packaging the desktop bridge project, I receive an App manifest validation error with the following content:
Validation error. error 80080204: App manifest validation error: Line 315, Column 27, Reason: The field "*[local-name()='Extensions']/*[local-name()='Extension']/*[local-name()='InProcessServer']/*[local-name()='ActivatableClass']" with value "Microsoft.Toolkit.Uwp.UI.Lottie.LottieVisualSource" must only be declared once. A duplicate exists on Line 64, Column 27.
The mentioned lines and the corresponding tag in the AppxManifest has the following content:
<Extension Category="windows.activatableClass.inProcessServer">
<InProcessServer>
<Path>UILibrary.dll</Path>
*64* <ActivatableClass ActivatableClassId="Microsoft.Toolkit.Uwp.UI.Lottie.LottieVisualSource" ThreadingModel="both" />
<ActivatableClass ActivatableClassId="Microsoft.UI.Xaml.Markup.ReflectionXamlMetadataProvider" ThreadingModel="both" />
</InProcessServer>
</Extension>
...
<Extension Category="windows.activatableClass.inProcessServer">
<InProcessServer>
<Path>CLRHost.dll</Path>
*315* <ActivatableClass ActivatableClassId="Microsoft.Toolkit.Uwp.UI.Lottie.LottieVisualSource" ThreadingModel="both" />
</InProcessServer>
</Extension>
From this workaround, I added the following lines to the .wapproj file:
<Target Name="_RemoveWinMDFromAppxManifest" BeforeTargets="_GenerateCurrentProjectAppxManifest">
<ItemGroup>
<_AppxWinmdFilesToHarvest Remove="@(_AppxWinmdFilesToHarvest)" />
</ItemGroup>
</Target>
With this, I could achieve to not to duplicate these dependencies in the AppxManifest.xaml when creating the build, so the issue has gone and I could create the package for the Store submission.
I could upload to the store, it is published, but when I install it from the store, the app crashes when it should display a lottie animation with the following exception:
* When the Lottie is initalized from Xaml:
(0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
at Windows.UI.Xaml.UIElement.Measure(Size availableSize)
at Microsoft.Toolkit.Uwp.UI.Controls.WrapPanel.MeasureOverride(Size availableSize)
* Exception, when it is initialized from the code behind:
Cannot create instance of type 'Microsoft.Toolkit.Uwp.UI.Lottie.LottieVisualSource' [Line: 0 Position: 0]
The interesting part is that the animation is played when I install the exact same build from the local package. So, seemingly the Store modifies the package during the publish procedure, but what can I do other way?
I'm using Lottie version 7.1.1
- Ngôn ngữ chính
- C#
- Star
- 724
- Fork
- 79
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của CommunityToolkit/Lottie-Windows
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
CommunityToolkit/Lottie-Windows#582 · 1 reaction ·
-
file:// uris not supportedĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
-
LottieGen MSBuild Task IssuesĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
-
Please update to .NET 9Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
Tất cả issue của CommunityToolkit/Lottie-Windows
Issue tương tự
-
[Linux] The portal's color-scheme 0 (no preference) means light, not "not known"Có thể đã có người làm @ramlanrinos đã nhận hôm nay. Đang mởarea: linux bug ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
ZaidX88/sluice#284 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Unit converter reads out of bounds when the saved UnitConverterPreferences setting is malformedĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
microsoft/calculator#2532 ·
-
Scaffold marks an association as required when its composite foreign key has a nullable columnĐang mởarea: scaffold status: needs-tests
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
provider:flagd type:fix
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
open-feature/dotnet-sdk-contrib#789 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày