Skip to content

[android][apple] BinaryFormatter serialization and deserialization not supported on mobile targets #103406

Closed

Description

@matouskozak

Build Information

Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=703011
Build error leg or test failing: System.Resources.Extensions.Tests.FormattedObject
Affected configurations:

  • android_arm/arm64/x64/x86
  • iossimulator_x64
  • maccatalyst_arm64/x64
  • tvos_arm64
  • tvossimulator_x64

Error Message

Fill the error message using step by step known issues guidance.

{
  "ErrorMessage": "System.PlatformNotSupportedException : BinaryFormatter serialization and deserialization are not supported on this platform.",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Stacktrace example

[17:48:42.8864320] 2024-06-10 14:48:42.918 System.Resources.Extensions.BinaryFormat.Tests[6435:96157250] 	[FAIL] System.Resources.Extensions.Tests.FormattedObject.MultidimensionalArrayTests.IntegerArrays(lengths: [4, 3, 2])
[17:48:42.8871530] 2024-06-10 14:48:42.919 System.Resources.Extensions.BinaryFormat.Tests[6435:96157250] System.PlatformNotSupportedException : BinaryFormatter serialization and deserialization are not supported on this platform. See https://aka.ms/binaryformatter for more information.
[17:48:42.8871680]    at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream , Object )
[17:48:42.8878060] 2024-06-10 14:48:42.919 System.Resources.Extensions.BinaryFormat.Tests[6435:96157250]    at System.Resources.Extensions.Tests.Common.ISerializer.Serialize(Object value, SerializationBinder binder, ISurrogateSelector surrogateSelector, FormatterTypeStyle typeStyle)
[17:48:42.8884710] 2024-06-10 14:48:42.920 System.Resources.Extensions.BinaryFormat.Tests[6435:96157250]    at System.Resources.Extensions.Tests.Common.SerializationTest`1[[System.Resources.Extensions.Tests.FormattedObject.FormattedObjectSerializer, System.Resources.Extensions.BinaryFormat.Tests, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]].Serialize(Object value, SerializationBinder binder, ISurrogateSelector surrogateSelector, FormatterTypeStyle typeStyle)
[17:48:42.8890730] 2024-06-10 14:48:42.921 System.Resources.Extensions.BinaryFormat.Tests[6435:96157250]    at System.Resources.Extensions.Tests.Common.MultidimensionalArrayTests`1[[System.Resources.Extensions.Tests.FormattedObject.FormattedObjectSerializer, System.Resources.Extensions.BinaryFormat.Tests, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]].IntegerArrays(Int32[] lengths)
[17:48:42.8898180] 2024-06-10 14:48:42.921 System.Resources.Extensions.BinaryFormat.Tests[6435:96157250]    at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
[17:48:42.8898340]    at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object , Span`1 , BindingFlags )

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=703011
Error message validated: [System.PlatformNotSupportedException : BinaryFormatter serialization and deserialization are not supported on this platform.]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 6/13/2024 9:43:14 AM UTC

Report

Build Definition Test Pull Request
703011 dotnet/runtime System.Resources.Extensions.BinaryFormat.Tests.WorkItemExecution

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 1 1

Activity

  1. ghost added
    needs-area-labelAn area label is needed to ensure this gets routed to the appropriate area owners
    on Jun 13, 2024
  2. dotnet-policy-service commented on Jun 13, 2024

    @dotnet-policy-service
    Contributor

    Tagging subscribers to 'os-ios': @vitek-karas, @kotlarmilos, @ivanpovazan, @steveisok, @akoeplinger
    See info in area-owners.md if you want to be subscribed.

  3. dotnet-policy-service commented on Jun 13, 2024

    @dotnet-policy-service
    Contributor

    Tagging subscribers to 'arch-android': @vitek-karas, @simonrozsival, @steveisok, @akoeplinger
    See info in area-owners.md if you want to be subscribed.

  4. dotnet-policy-service commented on Jun 13, 2024

    @dotnet-policy-service
    Contributor

    Tagging subscribers to 'os-tvos': @vitek-karas, @kotlarmilos, @ivanpovazan, @steveisok, @akoeplinger
    See info in area-owners.md if you want to be subscribed.

  5. dotnet-policy-service commented on Jun 13, 2024

    @dotnet-policy-service
    Contributor

    Tagging subscribers to 'os-maccatalyst': @vitek-karas, @kotlarmilos, @ivanpovazan, @steveisok, @akoeplinger
    See info in area-owners.md if you want to be subscribed.

  6. matouskozak commented on Jun 13, 2024

    @matouskozak
    MemberAuthor

    Could it be related to #102379 @adamsitnik ?

  7. MichalStrehovsky commented on Jun 13, 2024

    @MichalStrehovsky
    Member

    Could it be related to #102379 @adamsitnik ?

    The tests probably just need to be ConditionalFact/ConditionalTheory/ConditionalClass filtered on PlatformDetection.IsBinaryFormatterSupported.

  8. akoeplinger commented on Jun 13, 2024

    @akoeplinger
    Member

    The built-in BinaryFormatter support was turned off for mobile app types without a way to turn it back on.
    I don't know how that interacts with the BinaryFormatter compat package which is getting added by dotnet/announcements#293

  9. added a commit that references this issue on Jun 14, 2024
    c5a17c6
  10. locked and limited conversation to collaborators on Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Known Build ErrorUse this to report build issues in the .NET Helix tabarch-arm64arch-x64blocking-clean-ciBlocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'needs-area-labelAn area label is needed to ensure this gets routed to the appropriate area ownersos-androidos-iosApple iOSos-maccatalystMacCatalyst OSos-tvosApple tvOS

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions