Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
matouskozak opened this issue Jun 13, 2024 · 7 comments · Fixed by #103471
Assignees
Labels
arch-arm64 arch-x64 blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' Known Build Error Use this to report build issues in the .NET Helix tab needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners os-android os-ios Apple iOS os-maccatalyst MacCatalyst OS os-tvos Apple tvOS

Comments

@matouskozak
Copy link
Member

matouskozak commented Jun 13, 2024

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
@matouskozak matouskozak added arch-arm64 arch-x64 blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' os-android os-ios Apple iOS os-tvos Apple tvOS os-maccatalyst MacCatalyst OS Known Build Error Use this to report build issues in the .NET Helix tab labels Jun 13, 2024
@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jun 13, 2024
Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

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

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Jun 13, 2024
@matouskozak
Copy link
Member Author

Could it be related to #102379 @adamsitnik ?

@MichalStrehovsky
Copy link
Member

Could it be related to #102379 @adamsitnik ?

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

@akoeplinger
Copy link
Member

akoeplinger commented Jun 13, 2024

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

adamsitnik added a commit to adamsitnik/runtime that referenced this issue Jun 14, 2024
…atformDetection.IsBinaryFormatterSupported to be true, fixes dotnet#103406
@dotnet-policy-service dotnet-policy-service bot removed the untriaged New issue has not been triaged by the area owner label Jun 17, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jul 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-arm64 arch-x64 blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' Known Build Error Use this to report build issues in the .NET Helix tab needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners os-android os-ios Apple iOS os-maccatalyst MacCatalyst OS os-tvos Apple tvOS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants