Skip to content
This repository has been archived by the owner on Sep 30, 2023. It is now read-only.

Multiple identities #81

Open
zdravko61 opened this issue Jun 6, 2022 · 0 comments
Open

Multiple identities #81

zdravko61 opened this issue Jun 6, 2022 · 0 comments

Comments

@zdravko61
Copy link

zdravko61 commented Jun 6, 2022

Hey,
I have an array of strings, each string is unique identifier, based on those as id I want to create identity.

My code looks like this:

  for (let index = 0; index < array.length; index++) {
    const string = array[index];
   await IdentityProvider.createIdentity({ id })
}

The first iteration passed, but the second one throws:

/home/app/node_modules/level-packager/node_modules/levelup/lib/levelup.js:119
      return callback(new OpenError(err))

Error [OpenError]: IO error: lock orbitdb/identity/identitykeys/LOCK: already held by process
    at /home/app/node_modules/level-packager/node_modules/levelup/lib/levelup.js:119:23
    at /home/app/node_modules/level-packager/node_modules/abstract-leveldown/abstract-leveldown.js:38:14
    at /home/app/node_modules/level-packager/node_modules/deferred-leveldown/deferred-leveldown.js:31:21
    at /home/app/node_modules/encoding-down/node_modules/abstract-leveldown/abstract-leveldown.js:38:14
    at /home/app/node_modules/leveldown/node_modules/abstract-leveldown/abstract-leveldown.js:38:14
Emitted 'error' event on LevelUP instance at:
    at /home/app/node_modules/level-packager/node_modules/levelup/lib/levelup.js:60:19
    at /home/app/node_modules/level-packager/node_modules/levelup/lib/levelup.js:119:14
    at /home/app/node_modules/level-packager/node_modules/abstract-leveldown/abstract-leveldown.js:38:14

My goal is to use this identity with ipfs-log, to store additional data, then at later point to get the identity, then the ipfs-log and my data.

I saw Level/levelup#667 but still cant figure out how to fix this one. Any ideas?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant