Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Should not throw "Key not found in database" exception #891

Open
dkent600 opened this issue Aug 12, 2020 · 9 comments
Open

Should not throw "Key not found in database" exception #891

dkent600 opened this issue Aug 12, 2020 · 9 comments

Comments

@dkent600
Copy link

During this:

    box = await Box.create(web3Provider);

(or was it in auth, sorry I don't recall)

an exception is thrown:

generating 2048-bit RSA keypair...
r {code: "ERR_NOT_FOUND", type: "NotFoundError", name: "NotFoundError", cause: Error: NotFound
at n (https://alchemy-add3boxcomments-jjgmo6.herokuapp.com/vendors~app.bundle-5…, message: "Key not found in database [/AFYBEIHYNASMHHI4KRVTUROLXFP465JWOJ7OYRYFYUYOM6TQ4LGWFMMT7M]", …}

spaceName is "DAOstack"
Using 3box@1.21.0
The web3provider is pointing at rinkeby.

@zachferland
Copy link
Contributor

@dkent600 if switching between versions you may see this error, i would try clearing browser storage for your application and trying 1.21.0 again, but let me if you see it more regularly

@dkent600
Copy link
Author

dkent600 commented Sep 2, 2020

Having to clear browser storage would be an issue for our users.

@zachferland
Copy link
Contributor

yes of course, just saying if going between versions in development you may be more likely to see this

is version 1.20.x already deployed to your users?

@dkent600
Copy link
Author

dkent600 commented Sep 2, 2020

actually, now that you mention it, our 1.20.* code hasn't gone out yet....

@dkent600
Copy link
Author

dkent600 commented Sep 2, 2020

@zachferland I installed 1.21 and cleaned everything out and now in Box.create I get:

err {type: 'InitializationError', name: 'InitializationError', cause: undefined, message: 'Must provide a location for the database', stack: 'InitializationError: Must provide a location …/orbit-db-storage-adapter/src/index.js:49:17)'}

@zachferland
Copy link
Contributor

@dkent600 have not been able to replicate yet, what browser do you see this in?

and can you run 'npm list levelup level-js orbit-db-storage-adapter' to see what versions of these dependencies you have?

@dkent600
Copy link
Author

dkent600 commented Sep 4, 2020

Browser: Edge Chromium

 +-- 3box@1.21.0
| +-- 3box-shared-cache@1.1.0
| | +-- level-js@4.0.2 
| | +-- levelup@4.4.0
| | `-- orbit-db-storage-adapter@0.5.3  deduped
| +-- ipfs@0.46.1
| | `-- ipld-ethereum@4.0.2
| |   +-- ethereumjs-block@2.2.2
| |   | `-- merkle-patricia-tree@2.3.2
| |   |   `-- levelup@1.3.9  deduped
| |   `-- merkle-patricia-tree@3.0.0
| |     `-- level-mem@3.0.1
| |       `-- level-packager@4.0.1
| |         `-- levelup@3.1.1
| +-- levelup@4.4.0
| +-- orbit-db@0.24.2
| | +-- orbit-db-keystore@0.3.5
| | | `-- levelup@4.1.0
| | `-- orbit-db-storage-adapter@0.5.3  deduped
| `-- orbit-db-storage-adapter@0.5.3
|   `-- level@5.0.1
|     +-- level-js@4.0.2  deduped
|     `-- level-packager@5.1.1
|       `-- levelup@4.4.0
`-- @portis/web3@2.0.0-beta.59
  `-- @portis/web3-provider-engine@1.1.2
    `-- ethereumjs-block@1.7.1
      `-- merkle-patricia-tree@2.3.2
        `-- levelup@1.3.9

@dkent600
Copy link
Author

@zachferland Any updates on this? Thanks.

@orenyodfat
Copy link

orenyodfat commented Nov 25, 2020

hey @zachferland any update ?
we are currently using 3box 1.22.2 and here is the dependency logs
├─┬ 3box@1.22.2
│ ├─┬ 3box-orbitdb-plugins@2.1.2
│ │ └─┬ orbit-db@0.24.2
│ │ └── orbit-db-storage-adapter@0.5.3 deduped
│ ├─┬ 3box-shared-cache@1.1.0
│ │ ├── level-js@4.0.2
│ │ ├── levelup@4.4.0
│ │ └── orbit-db-storage-adapter@0.5.3 deduped
│ ├─┬ ipfs@0.46.1
│ │ └─┬ ipld-ethereum@4.0.2
│ │ ├─┬ ethereumjs-block@2.2.2
│ │ │ └─┬ merkle-patricia-tree@2.3.2
│ │ │ └── levelup@1.3.9 deduped
│ │ └─┬ merkle-patricia-tree@3.0.0
│ │ └─┬ level-mem@3.0.1
│ │ └─┬ level-packager@4.0.1
│ │ └── levelup@3.1.1
│ ├── levelup@4.4.0
│ ├─┬ orbit-db@0.25.3
│ │ ├─┬ orbit-db-keystore@0.3.5
│ │ │ └── levelup@4.1.0
│ │ └── orbit-db-storage-adapter@0.5.3 deduped
│ └─┬ orbit-db-storage-adapter@0.5.3
│ └─┬ level@5.0.1
│ ├── level-js@4.0.2 deduped
│ └─┬ level-packager@5.1.1
│ └── levelup@4.4.0
└─┬ @portis/web3@2.0.0-beta.59
└─┬ @portis/web3-provider-engine@1.1.2
└─┬ ethereumjs-block@1.7.1
└─┬ merkle-patricia-tree@2.3.2
└── levelup@1.3.9

we are seeing the "Must provide a location for the database',...error msg ..
please assist .
is there an option needed to be passed to openBox ? https://github.com/daostack/alchemy/blob/ab5bc39e3b5e8e551fdb59a007107424284102e1/src/actions/profilesActions.ts#L120

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

3 participants