Cloudant中的PreparedAttachment中的问题

编程入门 行业动态 更新时间:2024-10-22 14:37:30
本文介绍了Cloudant中的PreparedAttachment中的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

最近2或3天,当应用程序首次与cloudant同步时,附件下载出现问题。

Last 2 or 3 days i am getting issue in attachment download when app are sync first time with cloudant.

错误日志为:-

W/PreparedAttachment: Problem reading from input or writing to output stream java.ProtocolException: unexpected end of stream at com.android.okhttp.internal.http.HttpConnection$FixedLengthSource.read(HttpConnection.java:449) at com.android.okio.RealBufferedSource$1.read(RealBufferedSource.java:168) at java.io.InputStream.read(InputStream.java:162) at com.cloudant.sync.datastore.PreparedAttachment.<init>(PreparedAttachment.java:83) at com.cloudant.sync.datastore.AttachmentManager.prepareAttachment(AttachmentManager.java:213) at com.cloudant.sync.datastore.DatastoreImpl.prepareAttachment(DatastoreImpl.java:1037) at com.cloudant.sync.replication.DatastoreWrapper.prepareAttachment(DatastoreWrapper.java:136) at com.cloudant.sync.replication.PullStrategy.processOneChangesBatch(PullStrategy.java:386) at com.cloudant.sync.replication.PullStrategy.replicate(PullStrategy.java:252) at com.cloudant.sync.replication.PullStrategy.run(PullStrategy.java:177) at java.lang.Thread.run(Thread.java:818) E/PullStrategy: There was a problem downloading an attachment to the datastore, terminating replication com.cloudant.sync.datastore.AttachmentNotSavedException: java.ProtocolException: unexpected end of stream at com.cloudant.sync.datastore.PreparedAttachment.<init>(PreparedAttachment.java:90) at com.cloudant.sync.datastore.AttachmentManager.prepareAttachment(AttachmentManager.java:213) at com.cloudant.sync.datastore.DatastoreImpl.prepareAttachment(DatastoreImpl.java:1037) at com.cloudant.sync.replication.DatastoreWrapper.prepareAttachment(DatastoreWrapper.java:136) at com.cloudant.sync.replication.PullStrategy.processOneChangesBatch(PullStrategy.java:386) at com.cloudant.sync.replication.PullStrategy.replicate(PullStrategy.java:252) at com.cloudant.sync.replication.PullStrategy.run(PullStrategy.java:177) at java.lang.Thread.run(Thread.java:818) Caused by: java.ProtocolException: unexpected end of stream at com.android.okhttp.internal.http.HttpConnection$FixedLengthSource.read(HttpConnection.java:449) at com.android.okio.RealBufferedSource$1.read(RealBufferedSource.java:168) at java.io.InputStream.read(InputStream.java:162) at com.cloudant.sync.datastore.PreparedAttachment.<init>(PreparedAttachment.java:83) at com.cloudant.sync.datastore.AttachmentManager.prepareAttachment(AttachmentManager.java:213)  at com.cloudant.sync.datastore.DatastoreImpl.prepareAttachment(DatastoreImpl.java:1037)  at com.cloudant.sync.replication.DatastoreWrapper.prepareAttachment(DatastoreWrapper.java:136)  at com.cloudant.sync.replication.PullStrategy.processOneChangesBatch(PullStrategy.java:386)  at com.cloudant.sync.replication.PullStrategy.replicate(PullStrategy.java:252)  at com.cloudant.sync.replication.PullStrategy.run(PullStrategy.java:177)  at java.lang.Thread.run(Thread.java:818) 

请给我您的帮助。谢谢。

please give me your help. thank you.

推荐答案

问题不在于 PreparedAttachment 与基础网络。看起来服务器发送的字节数超过了 Content-Length 标头规定的字节数。这可能与您使用的服务器有关。

The problem isn't with PreparedAttachment its with the underlying networking. It would appear that server sent more bytes than then Content-Length header stipulated. This is probably a bug with the server you using.

更多推荐

Cloudant中的PreparedAttachment中的问题

本文发布于:2023-10-30 04:29:46,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1541770.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Cloudant   PreparedAttachment

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!