Skip to content

Xamarin.Forms Android app crashes with "Register must call on startup(before use GetFormatter<T>)." #218

@nielscup

Description

@nielscup

Our Xamarin.Forms Android app crashes with the following error: "Register must call on startup(before use GetFormatter)."

In the App.xaml.cs OnStart() method we call:
MessagePack.Resolvers.CompositeResolver.RegisterAndSetAsDefault( MessagePack.Resolvers.GeneratedResolver.Instance, MessagePack.Resolvers.BuiltinResolver.Instance, AttributeFormatterResolver.Instance, MessagePack.Resolvers.PrimitiveObjectResolver.Instance );

Steps to Reproduce:

  1. Start app via app icon => everything works fine
  2. Send app to background by pressing home button
  3. Open app again via app icon => App crashes with an InvalidOperationException "Register must call on startup(before use GetFormatter)."

We are using MessagePack 1.7.3.4.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions