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

Incompatibility with protobuf-net v3 #66

Closed
Euan-McVie opened this issue Jul 21, 2020 · 0 comments · Fixed by #68
Closed

Incompatibility with protobuf-net v3 #66

Euan-McVie opened this issue Jul 21, 2020 · 0 comments · Fixed by #68

Comments

@Euan-McVie
Copy link

Euan-McVie commented Jul 21, 2020

Hi,

We have recently updated to protobuf-net v3.0.29 and now get the following exception

"System.MissingMethodException: Method not found: 'Void ProtoBuf.ProtoWriter..ctor(System.IO.Stream, ProtoBuf.Meta.TypeModel, ProtoBuf.SerializationContext)'.

Server stack trace: 
   at ProtoBuf.Data.ProtoDataWriter.Serialize(Stream stream, IDataReader reader, ProtoDataWriterOptions options)
   at ProtoBuf.Data.DataSerializerEngine.Serialize(Stream stream, DataSet dataSet, ProtoDataWriterOptions options)
   at Brady.Etrm.Base.Infrastructure.Remoting.DataSetBinaryRemotingFormatSerializationSurrogate.GetObjectData(Object obj, SerializationInfo info, StreamingContext context) in C:\Development\etrm\Source\ECS\Libraries\Viz.Base\Infrastructure\Remoting\DataSetBinaryRemotingFormatSerializationSurrogate.cs:line 28
   at Brady.Etrm.Base.Infrastructure.Remoting.RootObjectProtobufSerializationWrapper.GetObjectData(SerializationInfo info, StreamingContext context) in C:\Development\etrm\Source\ECS\Libraries\Viz.Base\Infrastructure\Remoting\RootObjectProtobufSerializationWrapper.cs:li
ne 34
   at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder)
   at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder)
   at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck)
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers
)
   at Brady.Etrm.Infrastructure.Remoting.BinaryWithProtobufSerializationHelper.SerializeBinaryMessage(IMessage msg, Stream outputStream) in C:\Development\etrm\Source\ECS\Libraries\Viz.Base\Infrastructure\Remoting\BinaryWithProtobufSerializationHelper.cs:line 63
   at Brady.Etrm.Infrastructure.Remoting.BradyServerFormatterSink.SerializeResponse(IServerResponseChannelSinkStack sinkStack, IMessage msg, ITransportHeaders& headers, Stream& stream) in C:\Development\etrm\Source\ECS\Libraries\Viz.Base\Infrastructure\Remoting\BradyServerFormatterSink.cs:line 170
   at Brady.Etrm.Infrastructure.Remoting.BradyServerFormatterSink.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream) in C:\Development\etrm\Source\ECS\Libraries\Viz.Base\Infrastructure\Remoting\BradyServerFormatterSink.cs:line 95

Exception rethrown at [0]:
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at Viz.Middleware.Extractor.VizPeer.IExtractorDataSetService.GetUserPermissionList(String user, String database)
   at Viz.EamSuite.DealManager.Database.DatabaseAccessPoint.GetUserPermissions() in C:\Development\etrm\Source\ECS\EFM\Viz.Efm.Presentation.Model\ViewModels\DealManager\DealWindow\Database\DatabaseAccessPoint.cs:line 854
   at Viz.EamSuite.DealManager.ViewPortfolioMonitor.RefreshPermissionList() in C:\Development\etrm\Source\ECS\EFM\Viz.Efm.Presentation.Windows\Views\DealManager\ContractManagement\Views\ViewPortfolioMonitor.cs:line 7840"

I see from protobuf v3 docs that:

ProtoReader/ProtoWriter must now be instantiated via ProtoReader.Create, not new (recent v2 releases have been advising this change for some time); most users will not be using these APIs.

Are there any plans to support v3 or can a new version be published to cap at v2 so that our nuget refs can detect and cap the protobuf-net at latest v2?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant