Skip to content

Fix for the Issue #938 broken in v6.6.2 #967

Description

@DotNet-Fan

Version

6.6.2

Environment

Windows 11 25H2 26200.9168

Steps to reproduce

  1. Create a sample UWP app native project
  2. Add Nuget reference of youtubeexplode 6.6.1/6.6.2
  3. Build the project in Release x64/x86 with .NET Native tool chain compilation enabled.
    The compilation fails with Internal compiler error: Sequence contains more than one element.

This breaks the fix for #938 - Downgrade System.Text.Json to 9.0.2 for UWP .NET Native Toolchain compatibility by @Copilot in #938

Details

Adding YoutubeExplode v6.6.2 in UWP projects should not break the UWP .NET Native Toolchain compatibility.
This works for the package 6.6.0

Checklist

  • I have looked through existing issues to make sure that this bug has not been reported before
  • I have provided a descriptive title for this issue
  • I have made sure that this bug is reproducible on the latest version of the package
  • I have provided all the information needed to reproduce this bug as efficiently as possible
  • I have sponsored this project

Activity

  1. changed the title [-]Issue #938 fix broken in v6.6.1[/-] [+]Fix for the Issue #938 broken in v6.6.1[/+] on Aug 23, 2026
  2. changed the title [-]Fix for the Issue #938 broken in v6.6.1[/-] [+]Fix for the Issue #938 broken in v6.6.2[/+] on Aug 27, 2026
  3. klax-droid commented on Aug 27, 2026

    @klax-droid

    I had same problem and i fixed it with workaround. First uninstall youtubeexplode nuget package with nuget manager. Then download old version of youtubeexplode 6.6.0 source code. Save source code near project. Then include into your solution youtubeexplode solution from source code. Add Reference now from your solution to youtubeexplode. Try to rebuild and youtubeexplode library should now rebuild with your main project. If rebuild is OK then just simply copy new version 6.6.2 file VideoController.cs to old source code you have version 6.6.0 and owerwrite. Then rebuild again and make .NET Native tool chain package. Works here with me.

  4. DotNet-Fan commented on Aug 27, 2026

    @DotNet-Fan
    Author

    Thanks @klax-droid for the workaround. Below are my observations after the integration with the 6.6.0 code.

    1. .NET Native tool chain compilation is fixed.
    2. After copying the latest videocontroller.cs , the issue with the video download is still there ("Video XXXX Not available")
    3. Due to the vulnerability warning in AngleSharp , i had to update to the latest version in the 6.6.0 code -

    NU1902 Warning As Error: Package 'AngleSharp' 1.4.0 has a known moderate severity vulnerability, GHSA-pgww-w46g-26qg

    Are you seeing the same issues?

    Hope this would be fixed in the main one so that the fixes would be available through NUGET.

  5. klax-droid commented on Aug 27, 2026

    @klax-droid

    Oh yes this is just warning defined as error. I told my copilot to turn that off. Ask copilot to turn that off.

  6. klax-droid commented on Aug 27, 2026

    @klax-droid

    I did not update any nuget package like AngleSharp. My Copilot just turned off that defined warning as error then i copied new videocontroller.cs and i rebuild whole project. Worked for me. Most important change is here in videocontroller.cs where now it uses Vision user agent string etc.

  7. DotNet-Fan commented on Aug 27, 2026

    @DotNet-Fan
    Author

    I doubt whether we can rule out that vulnerability as it is shown in the Nuget Explorer as well. Are you able to download the videos with the source code change for videocontroller.cs alone in 6.6.0?

    Image
  8. klax-droid commented on Aug 27, 2026

    @klax-droid

    I'm using old 1.4.0 (Vulnerable) version. My App is now able again to play and download music/video.

  9. DotNet-Fan commented on Aug 27, 2026

    @DotNet-Fan
    Author

    I picked a wrong version of videocontroller.cs . After taking from the 6.6.2 and the download succeeds.
    So you could update the AngleSharp with the latest version to avoid the vulnerability.

  10. klax-droid commented on Aug 27, 2026

    @klax-droid

    OK i'll try to update also later. Now is on the store already. But now you must manual check for any new version of youtubeexplode library cos you dont have installed nuget package to reminds you for new version etc.

  11. uponatime2019 commented on Sep 20, 2026

    @uponatime2019

    Same issue, app cannot parse store submission (error 1201). Run Ai check and this is result

    Version │ Dependencies │ .NET Native Compilation Result
    ──────────────────────────┼───────────────────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────────────
    6.6.2 │ System.Text.Json (10.0.10)Microsoft.Bcl.AsyncInterfaces (10.0.10) │ ❌ CRASHES: Internal compiler error: Sequence contains more than one element
    6.6.1 │ System.Text.Json (10.0.10)Microsoft.Bcl.AsyncInterfaces (10.0.10) │ ❌ CRASHES: Internal compiler error: Sequence contains more than one element
    6.6.0 │ System.Text.Json (9.0.2)Microsoft.Bcl.AsyncInterfaces (10.0.5) │ SUCCEEDS (0 Errors, Native PE code generated)

  12. Tyrrrz commented on Sep 20, 2026

    @Tyrrrz
    Owner

    Does anyone know if this is a known issue in System.Text.Json?

  13. klax-droid commented on Sep 21, 2026

    @klax-droid

    I think it is also Json problem. Try to build it with old Json version 9.0.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions