Orbit-db: Error: Could not append entry, key "xxx" is not allowed to write to the log

Created on 18 Jul 2020  路  2Comments  路  Source: orbitdb/orbit-db

I followed the basic example to get a test app running. But running into the following error

Error: Could not append entry, key "028a86f815eb53ae14cc65937f36b03be664a5cb7cf02702e03a21075418e7fa71" is not allowed to write to the log

Versions

  • Node.js - v10.13.0
  • ipfs- ^0.47.0
  • orbit-db- ^0.24.2

Code

const IPFS = require('ipfs')
const OrbitDB = require('orbit-db')

async function main() {
    try {
        const ipfsOptions = {
            EXPERIMENTAL: {
                pubsub: true
            }
        }
        const ipfs = await IPFS.create(ipfsOptions)
        const orbitdb = await OrbitDB.createInstance(ipfs, {
            directory: "./db01"
        })
        console.log(`orbitdb.identity.id :: ${orbitdb.identity.id}`)
        const db = await orbitdb.kvstore("firstDB", {
            overwrite: true,
            create: true
        })
        await db.load()
        await db.put("name", "asd")
        data = await db.get("name")
        console.log(data)
    } catch (err) {
        console.log(err)
        process.exit()
    }
}

main()

It's the same error for all kinds of database types.

Complete log

Swarm listening on /ip4/127.0.0.1/tcp/4002/p2p/QmdrZzodr2WYb8WRHqKdhTUNyDBEGqLCcxEvYDrRh985a1
Swarm listening on /ip4/192.168.29.74/tcp/4002/p2p/QmdrZzodr2WYb8WRHqKdhTUNyDBEGqLCcxEvYDrRh985a1
Swarm listening on /ip4/127.0.0.1/tcp/4003/ws/p2p/QmdrZzodr2WYb8WRHqKdhTUNyDBEGqLCcxEvYDrRh985a1
orbitdb.identity.id :: 028a86f815eb53ae14cc65937f36b03be664a5cb7cf02702e03a21075418e7fa71
(node:34074) ExperimentalWarning: Readable[Symbol.asyncIterator] is an experimental feature. This feature could change at any time
Error: Could not append entry, key "028a86f815eb53ae14cc65937f36b03be664a5cb7cf02702e03a21075418e7fa71" is not allowed to write to the log
    at Log.append (/Users/jerry/workspace/orbitDB/node_modules/ipfs-log/src/log.js:308:13)

Most helpful comment

hi @jerrymannel, can you see if this is your issue: https://github.com/orbitdb/orbit-db-keystore/issues/45

All 2 comments

hi @jerrymannel, can you see if this is your issue: https://github.com/orbitdb/orbit-db-keystore/issues/45

Adding secp256k1 v3.6.2 to the dependencies helped.

npm i [email protected]

Thanks @tabcat

Was this page helpful?
0 / 5 - 0 ratings

Related issues

BartKnucle picture BartKnucle  路  4Comments

varcario picture varcario  路  5Comments

eusthace picture eusthace  路  6Comments

oed picture oed  路  5Comments

Clickative picture Clickative  路  5Comments