Retrieving attachments from server fails for bigger files


#1

Hi,

When we try to fetch the documents through on sync gateway, the documents which keeps a large binary attachment files don’t show up in mobile side. Actually, the size of the problematic document is 361 kb and I don’t even think that it is big. The others like 150 kb, 75 kb can be get without any issue.

When we looked at the sync gateway logs, we found that some things had gone wrongly:

14:41:48.348432 2018-04-24T14:41:48.348Z Sync: [14df077b] MSG#4 "getAttachment" ...  (as william)
14:41:48.349628 2018-04-24T14:41:48.349Z Sync+: [14df077b] Sending attachment with digest="sha1-w4IhxS4JRg4Zg9aBZhIFom/HcNA=" (360kb) ...  (as william)
14:41:48.349660 2018-04-24T14:41:48.349Z Sync+: [14df077b] MSG#4 "getAttachment"   --> OK ...  (as william)
14:43:19.898854 2018-04-24T14:43:19.898Z Sync: [14df077b] Error: receiveLoop exiting with WebSocket error: read tcp 10.*.*.*:4984->172.*.*.*:52545: read: connection reset by peer
14:43:19.898913 2018-04-24T14:43:19.898Z Sync: [14df077b] BLIP/Websocket Handler exited: read tcp 10.*.*.*:4984->172.*.*.*:52545: read: connection reset by peer
14:43:19.898933 2018-04-24T14:43:19.898Z HTTP: [14df077b] #373:     --> BLIP+WebSocket connection error: read tcp 10.*.*.*:4984->172.*.*.*:52545: read: connection reset by peer
14:43:19.898977 2018-04-24T14:43:19.898Z HTTP+: [14df077b] #373:    --> BLIP+WebSocket connection closed

By the way, both sync gateway and couchbase lite versions are 2.0 beta 1.

Thanks.


#2

The first step is to upgrade to the final 2.0 release. Beta 1 had a number of serious replication bugs.


#3

Hi jens,

Actually we wanted to use that final release but according to our mobile team, upgrading uwp project gives the following errors:

Package Couchbase.Lite 2.0.0.1 is not compatible with uap10.0.10586 (UAP,Version=v10.0.10586). Package Couchbase.Lite 2.0.0.1 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Couchbase.Lite 2.0.0.1 is not compatible with uap10.0.10586 (UAP,Version=v10.0.10586) / win10-arm. Package Couchbase.Lite 2.0.0.1 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Couchbase.Lite 2.0.0.1 is not compatible with uap10.0.10586 (UAP,Version=v10.0.10586) / win10-arm-aot. Package Couchbase.Lite 2.0.0.1 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Couchbase.Lite 2.0.0.1 is not compatible with uap10.0.10586 (UAP,Version=v10.0.10586) / win10-x64. Package Couchbase.Lite 2.0.0.1 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Couchbase.Lite 2.0.0.1 is not compatible with uap10.0.10586 (UAP,Version=v10.0.10586) / win10-x64-aot. Package Couchbase.Lite 2.0.0.1 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Couchbase.Lite 2.0.0.1 is not compatible with uap10.0.10586 (UAP,Version=v10.0.10586) / win10-x86. Package Couchbase.Lite 2.0.0.1 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Couchbase.Lite 2.0.0.1 is not compatible with uap10.0.10586 (UAP,Version=v10.0.10586) / win10-x86-aot. Package Couchbase.Lite 2.0.0.1 supports: netstandard2.0 (.NETStandard,Version=v2.0)

They sent me another logs during the update via nuget:

Could not install package 'Couchbase.Lite 2.0.0.1'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile111', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

Unfortunately, the latest version requires updating windows machines but because of company specifications, we can’t get the update. So briefly, we are stuck with beta 1 version of couchbase lite.

Thanks.


#4

In that case you are running a non supported platform. Couchbase Lite 2.0 only supports the fall creators edition or later. Beta 1, as you have found out, has a lot of replication issues. This is known and fixed in later versions. Your version of Windows 10 ends its lifecycle in about 6 months so I guess it might not be long before you get to upgrade.