title: Response from SignalR being interrupted?
body: <p>I am trying to set up SignalR for my Xamarin App. Well got this working for small plain strings, so in general I think my setup is okay-ish. But for some reason this does not work for &quot;bigger&quot; (well 400 characters) serialized objects (using Newtonsoft JSON).</p>
  <p>It's strange: when I debug it I can step to the bold (eww, two stars) line... and after that just... well nothing happens - no Exception, no Log. I just cannot step to the italic (...one star) line (and also no additional line in the log is created). And the App is not crashing or whatever.</p>
  <p>Well I guess it's something timing related, but after spending 4-5 hours I have no idea what to try next.</p>
  <pre><code>    private HubConnection HubConnection { get; set; }
      
      /// setting up connection and subscribe
      public async Task Initialize()
      {
          Log.Debug(&quot;Create connection to hub&quot;);
          HubConnection = new HubConnectionBuilder()
              .WithAutomaticReconnect()
              .WithUrl($&quot;{ServiceLocator.Defaults.BackendUrl}MainHub&quot;)
              .Build();
  
          HubConnection.On&lt;string&gt;(&quot;ResponseFromHub&quot;, DefaultHandler);
  
          await HubConnection.StartAsync();
      }
  
      /// should handle incoming data
      private async Task DefaultHandler(string requestContextString)
      {
          Log.Debug($&quot;Response {requestContextString}&quot;);
          // everything seems to work until the next line
          **var requestContext = SerializationHelper.DeserializeObject&lt;RequestContext&gt;(requestContextString);**
          *Log.Debug($&quot;Response as object {requestContext}&quot;);*    
          await Task.FromResult(true);
      }
      
      /// send a request
      public async Task Request(RequestContext rc)
      {
          if (HubConnection == null)
              await Initialize();
  
  
          var requestContextString = SerializationHelper.SerializeObject(rc);
          Log.Debug($&quot;Request: {rc}&quot;);
          await HubConnection.InvokeAsync(
              &quot;RequestFromHub&quot;, 
              requestContextString
          );
      }
  </code></pre>
  <p>The SerializationHelper is just a wrapper around the default Newtonsoft functions, which just sets the options (what I used like thousand of times):</p>
  <pre><code>    public static T DeserializeObject&lt;T&gt;(string contentString, JsonSerializerSettings jsonSerializerSettings = null)
      {
          if (jsonSerializerSettings == null)
          {
              jsonSerializerSettings = new JsonSerializerSettings();
              jsonSerializerSettings.TypeNameHandling = TypeNameHandling.All;
              jsonSerializerSettings.TypeNameAssemblyFormatHandling = TypeNameAssemblyFormatHandling.Simple;
              jsonSerializerSettings.Converters = new List&lt;JsonConverter&gt; { new ObjectDeserializer(), new IntDeserializer(), new FloatDeserializer() };
          }
          return JsonConvert.DeserializeObject&lt;T&gt;(contentString, jsonSerializerSettings);
      }
  </code></pre>
  <p><strong>Update</strong>
  Seems like it has something to do with the serializer. I was able to make it work using other settings for TypeNameHandling (well not using TypeNameHandling.All). But this does not fix the problem, because I need the type information for object deserialization.
  I guess it is some threading related problem, and the thread is locked??</p>