dotnet/android-libraries

`io.grpc:grpc-api:1.64.2` crashes `dotnet build`

moljac opened this issue · 3 comments

Android application type

Android for .NET (net6.0-android, etc.)

Affected platform version

nuget packages AndroidX and GooglePlayServices-Firebase-MLKit

Description

Bindings for io.grpc:grpc-api:1.64.2 crashes dotnet build

/usr/local/share/dotnet/packs/Microsoft.Android.Sdk.Darwin/34.0.113/tools/Xamarin.Android.Bindings.Core.targets(99,5): 
error MSB6006: 
    "dotnet" exited with code 134. 
[./generated/io.grpc.grpc-api/io.grpc.grpc-api.csproj::TargetFramework=net8.0-android]
    17336 Warning(s)
    1 Error(s)

Steps to Reproduce

  1. bump grpc to 1.64.2
  2. run binderator

Did you find any workaround?

No. undergoing investigation.

Relevant log output

Binlog hangs MsBuildLogViewer (Avalonia App) on Mac.

/usr/local/share/dotnet/packs/Microsoft.Android.Sdk.Darwin/34.0.113/tools/Xamarin.Android.Bindings.Core.targets(99,5): 
error MSB6006: 
    "dotnet" exited with code 134. 
[./generated/io.grpc.grpc-api/io.grpc.grpc-api.csproj::TargetFramework=net8.0-android]
    17336 Warning(s)
    1 Error(s)

msbuild.binlog.zip

Online version at https://live.msbuildlog.com/

System.NotSupportedException: Unsupported log file format. Latest supported version is 16, the log file has version 21. at Microsoft.Build.Logging.StructuredLogger.BinLogReader.EnsureFileFormatVersionKnown(Int32 fileFormatVersion) at Microsoft.Build.Logging.StructuredLogger.BinLogReader.Replay(Stream stream, Func`3 progressFunc) at Microsoft.Build.Logging.StructuredLogger.BinaryLog.ReadBuild(Stream stream, Byte[] projectImportsArchive, Func`3 progressFunc) at StructuredLogViewerWASM.Shared.NavMenu.LoadBinlog(MemoryStream memoryStream) at StructuredLogViewerWASM.Shared.NavMenu.ReadFile(IFileListEntry[] files) 

This appears to be a stack overflow:

Repeat 13729 times:
--------------------------------
   at generator.SourceWriters.BoundMethod.GetDeclaringTypeOfExplicitInterfaceMethod(MonoDroid.Generation.Method)
--------------------------------
   at generator.SourceWriters.BoundMethod..ctor(MonoDroid.Generation.GenBase, MonoDroid.Generation.Method, MonoDroid.Generation.CodeGenerationOptions, Boolean)
   at generator.SourceWriters.BoundInterface.AddMethods(MonoDroid.Generation.InterfaceGen, MonoDroid.Generation.CodeGenerationOptions)
   at generator.SourceWriters.BoundInterface..ctor(MonoDroid.Generation.InterfaceGen, MonoDroid.Generation.CodeGenerationOptions, MonoDroid.Generation.CodeGeneratorContext, MonoDroid.Generation.GenerationInfo)
   at MonoDroid.Generation.JavaInteropCodeGenerator.WriteType(MonoDroid.Generation.GenBase, System.String, MonoDroid.Generation.GenerationInfo)
   at MonoDroid.Generation.InterfaceGen.Generate(MonoDroid.Generation.CodeGenerationOptions, MonoDroid.Generation.GenerationInfo)
   at Xamarin.Android.Binder.CodeGenerator.Run(Xamarin.Android.Binder.CodeGeneratorOptions, Java.Interop.Tools.Cecil.DirectoryAssemblyResolver)
   at Xamarin.Android.Binder.CodeGenerator.Run(Xamarin.Android.Binder.CodeGeneratorOptions)
   at Xamarin.Android.Binder.CodeGenerator.Main(System.String[])

Working on a fix here: dotnet/java-interop#1261

It may be able to be worked around by using <remove-node> on io.grpc.InternalConfigurator.

Wow. Thanks. I didn't want to bother you yet. I tried to get binlog, but that failed with incorrect format (on my Mac), so I went to fix easier fixes 1st.

This appears to be a stack overflow:

Repeat 13729 times:
--------------------------------
   at generator.SourceWriters.BoundMethod.GetDeclaringTypeOfExplicitInterfaceMethod(MonoDroid.Generation.Method)
--------------------------------
   at generator.SourceWriters.BoundMethod..ctor(MonoDroid.Generation.GenBase, MonoDroid.Generation.Method, MonoDroid.Generation.CodeGenerationOptions, Boolean)
   at generator.SourceWriters.BoundInterface.AddMethods(MonoDroid.Generation.InterfaceGen, MonoDroid.Generation.CodeGenerationOptions)
   at generator.SourceWriters.BoundInterface..ctor(MonoDroid.Generation.InterfaceGen, MonoDroid.Generation.CodeGenerationOptions, MonoDroid.Generation.CodeGeneratorContext, MonoDroid.Generation.GenerationInfo)
   at MonoDroid.Generation.JavaInteropCodeGenerator.WriteType(MonoDroid.Generation.GenBase, System.String, MonoDroid.Generation.GenerationInfo)
   at MonoDroid.Generation.InterfaceGen.Generate(MonoDroid.Generation.CodeGenerationOptions, MonoDroid.Generation.GenerationInfo)
   at Xamarin.Android.Binder.CodeGenerator.Run(Xamarin.Android.Binder.CodeGeneratorOptions, Java.Interop.Tools.Cecil.DirectoryAssemblyResolver)
   at Xamarin.Android.Binder.CodeGenerator.Run(Xamarin.Android.Binder.CodeGeneratorOptions)
   at Xamarin.Android.Binder.CodeGenerator.Main(System.String[])

Working on a fix here: dotnet/java-interop#1261

Nice.

It may be able to be worked around by using <remove-node> on io.grpc.InternalConfigurator.

I will try it ASAP, but will bump it with next update.

It may be able to be worked around by using on io.grpc.InternalConfigurator.

Nope. Did not help. Moving on to other issues.