orbitdb icon indicating copy to clipboard operation
orbitdb copied to clipboard

unrecognized format: dag-cbor

Open mekery opened this issue 3 years ago • 1 comments

I encountered the same error message as #967 describes.

Environment:

  • go-ipfs: v0.12.0 desktop
  • ipfs-http-client: v56.0.1
  • node: v16.13.1
  • npm: 8.1.2
  • orbit-db: 0.28.3

When I'm trying to use orbitdb docs as following:

const db = await this.orbitdb.docs('message');
const hash = await db.put({
  _id: 'first',
  title: 'Hello World',
  content: 'Hi'
});

It performs several block/put requests, and gets 500 code with the response data:

{
    "Message": "unrecognized format: dag-cbor",
    "Code": 0,
    "Type": "error"
}

mekery avatar Mar 29 '22 02:03 mekery

In #967 the error seems to originate from

https://github.com/ipfs/js-ipfs/blob/1082fce9b2b027b6e176b8807d84b21f1358f296/packages/ipfs-http-client/src/block/put.js#L22-L38

as a result of

https://github.com/orbitdb/orbit-db-io/blob/736bb888f991e436be32033412f1a84d9a0745f5/index.js#L96-L103

it needs to be handled in one of the two places. I'd rather it handled in the http-client personally. :smile: deserves an issue opened there as well.

tabcat avatar Mar 29 '22 16:03 tabcat

Closing. Please re-open if it still causes issues with v1.0.

haydenyoung avatar Nov 20 '23 21:11 haydenyoung