Xamarin iOS error Pull

Hi, i use the source of https://github.com/couchbase/couchbase-lite-net/tree/master/src/Couchbase.Lite.Shared and the response not is compatible with pattern solicited in RemoteServerVersion.cs
I need replicate a bucket, i use sync gateway version 1.1.0. and iOS 9.2

{“couchdb”:“Welcome”,“vendor”:{“name”:“Couchbase Sync Gateway”,“version”:1},“version”:“Couchbase Sync Gateway/1.1.0(28;86f028c)”}

Error:
2016-01-28 14:25:19.864 ClienteCouch[7118:367448] Replication: Beginning replication process…
2016-01-28 14:25:24.280 ClienteCouch[7118:367448] Replication: No local checkpoint, not getting remote one
2016-01-28 14:25:26.261 ClienteCouch[7118:367357] 0 - 0
Resolved pending breakpoint at ‘RemoteServerVersion.cs:43,1’ to void Couchbase.Lite.RemoteServerVersion…ctor (string versionString) [0x00007].
Resolved pending breakpoint at ‘RemoteServerVersion.cs:48,1’ to void Couchbase.Lite.RemoteServerVersion…ctor (string versionString) [0x00031].
2016-01-28 14:25:30.010 ClienteCouch[7118:367449] SingleTaskThreadpoolScheduler
2016-01-28 14:25:30.012 ClienteCouch[7118:367449]
2016-01-28 14:25:30.012 ClienteCouch[7118:367449] Task 1 faulted System.AggregateException: One or more errors occurred. —> System.ArgumentNullException: Value cannot be null.
2016-01-28 14:25:30.013 ClienteCouch[7118:367449]
2016-01-28 14:25:30.014 ClienteCouch[7118:367449]
2016-01-28 14:25:30.014 ClienteCouch[7118:367449] Parameter name: input
2016-01-28 14:25:30.015 ClienteCouch[7118:367449]
2016-01-28 14:25:30.015 ClienteCouch[7118:367449]
2016-01-28 14:25:30.016 ClienteCouch[7118:367449] at System.Text.RegularExpressions.Regex.Match (System.String input) [0x00006] in /Users/builder/data/lanes/2377/73229919/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System/regex/system/text/regularexpressions/Regex.cs:807
2016-01-28 14:25:30.017 ClienteCouch[7118:367449]
2016-01-28 14:25:30.017 ClienteCouch[7118:367449]
2016-01-28 14:25:30.018 ClienteCouch[7118:367449] at Couchbase.Lite.RemoteServerVersion…ctor (System.String versionString) [0x0001f] in /Users/DiegoLinares/Projects/ClienteCouchXamariniOS/Couchbase.Lite.Shared/Replication/RemoteServerVersion.cs:46
2016-01-28 14:25:30.019 ClienteCouch[7118:367449]
2016-01-28 14:25:30.020 ClienteCouch[7118:367449]
2016-01-28 14:25:30.020 ClienteCouch[7118:367449] at Couchbase.Lite.Replicator.Puller.m__2 (System.Threading.Tasks.Task1 t) [0x00019] in /Users/DiegoLinares/Projects/ClienteCouchXamariniOS/Couchbase.Lite.Shared/Replication/Puller.cs:172 2016-01-28 14:25:30.021 ClienteCouch[7118:367449] 2016-01-28 14:25:30.022 ClienteCouch[7118:367449] 2016-01-28 14:25:30.022 ClienteCouch[7118:367449] at System.Threading.Tasks.ContinuationTaskFromResultTask1[TAntecedentResult].InnerInvoke () [0x00027] in /Users/builder/data/lanes/2377/73229919/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/threading/Tasks/TaskContinuation.cs:159
2016-01-28 14:25:30.023 ClienteCouch[7118:367449]
2016-01-28 14:25:30.024 ClienteCouch[7118:367449]
2016-01-28 14:25:30.025 ClienteCouch[7118:367449] at System.Threading.Tasks.Task.Execute () [0x00016] in /Users/builder/data/lanes/2377/73229919/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/threading/Tasks/Task.cs:2523
2016-01-28 14:25:30.025 ClienteCouch[7118:367449]
2016-01-28 14:25:30.026 ClienteCouch[7118:367449]
2016-01-28 14:25:30.027 ClienteCouch[7118:367449] — End of inner exception stack trace —
2016-01-28 14:25:30.028 ClienteCouch[7118:367449]
2016-01-28 14:25:30.028 ClienteCouch[7118:367449]
2016-01-28 14:25:30.029 ClienteCouch[7118:367449] —> (Inner Exception #0) System.ArgumentNullException: Value cannot be null.
2016-01-28 14:25:30.030 ClienteCouch[7118:367449]
2016-01-28 14:25:30.030 ClienteCouch[7118:367449]
2016-01-28 14:25:30.031 ClienteCouch[7118:367449] Parameter name: input
2016-01-28 14:25:30.031 ClienteCouch[7118:367449]
2016-01-28 14:25:30.033 ClienteCouch[7118:367449]
2016-01-28 14:25:30.034 ClienteCouch[7118:367449] at System.Text.RegularExpressions.Regex.Match (System.String input) [0x00006] in /Users/builder/data/lanes/2377/73229919/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System/regex/system/text/regularexpressions/Regex.cs:807
2016-01-28 14:25:30.034 ClienteCouch[7118:367449]
2016-01-28 14:25:30.035 ClienteCouch[7118:367449]
2016-01-28 14:25:30.035 ClienteCouch[7118:367449] at Couchbase.Lite.RemoteServerVersion…ctor (System.String versionString) [0x0001f] in /Users/DiegoLinares/Projects/ClienteCouchXamariniOS/Couchbase.Lite.Shared/Replication/RemoteServerVersion.cs:46
2016-01-28 14:25:30.036 ClienteCouch[7118:367449]
2016-01-28 14:25:30.036 ClienteCouch[7118:367449]
2016-01-28 14:25:30.037 ClienteCouch[7118:367449] at Couchbase.Lite.Replicator.Puller.m__2 (System.Threading.Tasks.Task1 t) [0x00019] in /Users/DiegoLinares/Projects/ClienteCouchXamariniOS/Couchbase.Lite.Shared/Replication/Puller.cs:172 2016-01-28 14:25:30.037 ClienteCouch[7118:367449] 2016-01-28 14:25:30.038 ClienteCouch[7118:367449] 2016-01-28 14:25:30.039 ClienteCouch[7118:367449] at System.Threading.Tasks.ContinuationTaskFromResultTask1[TAntecedentResult].InnerInvoke () [0x00027] in /Users/builder/data/lanes/2377/73229919/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/threading/Tasks/TaskContinuation.cs:159
2016-01-28 14:25:30.039 ClienteCouch[7118:367449]
2016-01-28 14:25:30.041 ClienteCouch[7118:367449]
2016-01-28 14:25:30.041 ClienteCouch[7118:367449] at System.Threading.Tasks.Task.Execute () [0x00016] in /Users/builder/data/lanes/2377/73229919/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/threading/Tasks/Task.cs:2523 <—
2016-01-28 14:25:30.042 ClienteCouch[7118:367449]

This indicates to me that the Server header in the response was empty for some reason. What commit are you using for the .NET library?

I use the master branch and last commit (cef88ff).

Have you modified it in any way? The reason I ask is because the line number in your log doesn’t match up with the line number on the master branch. Are you connecting directly to Sync Gateway or going through a proxy?

Directly to Sync Gateway. The source code is the original of this link: https://github.com/couchbase/couchbase-lite-net/tree/master/src/Couchbase.Lite.Shared

Does the first part of your log contain the hash you mentioned before? This problem is odd because it means that Sync Gateway responded, but didn’t include the Server header in its response. I’ve checked the version of Sync Gateway you mentioned just now and it returns a Server header. What platform are you running on?

1 Like

He was the problem because you commented , the firewall blocking the headers , thank you care and your time.