Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Uncaught Error: unexpected error getting the ipns record #1620

Closed
pgte opened this issue Oct 6, 2018 · 7 comments
Closed

Uncaught Error: unexpected error getting the ipns record #1620

pgte opened this issue Oct 6, 2018 · 7 comments
Assignees

Comments

@pgte
Copy link
Contributor

pgte commented Oct 6, 2018

  • Version: 0.32.3
  • Platform: Browser
  • Subsystem: ?

Type: Bug

Severity: Critical

Description:

Error starting IPFS node:

Uncaught Error: unexpected error getting the ipns record  �F�W��if4w~}k��*X�%v�5Q3W�AC0t� from datastore
      at _repo.datastore.get (node_modules/ipfs/src/core/ipns/publisher.js:184:35)
      at node_modules/levelup/lib/levelup.js:168:14
      at node_modules/encoding-down/index.js:51:21

This doesn't happen in v0.32.2.

Steps to reproduce the error:

I start IPFS with the following config options: https://github.com/ipfs-shipyard/peer-star-app/blob/master/src/transport/ipfs.js#L15

@vasco-santos
Copy link
Member

Hey @pgte

I debugged this problem and I think that I understood the problem. The way the error not found was being handled changed in the new version in an effort to have the errors handled the same way by all our datastores.

js-ipfs@v0.32.2/core/ipns/publisher.js#L194
js-ipfs@v0.32.3/core/ipns/publisher.js#L180

However, in the peer-star-app you are using levelup. And they handle the notfound error as we did before, levelup/lib/levelup.js#L160.

@alanshaw what is your opinion here? Should we try to validate both type of errors?

@alanshaw
Copy link
Member

alanshaw commented Oct 8, 2018

For now we should check for both error types.

The datastore being used by peer-star-app needs to start using the error codes defined in the interface and we need to add documentation to the interface-datastore README that states when they should be used.

/cc @jacobheun

@jacobheun
Copy link
Contributor

There are a couple of issues here. We definitely need to update the interface readme to spell out the new codes. peer-star-app needs to update a couple other dependencies and because it's wrapping the memory store and handling errors there, it needs to catch the new errors.

I'll submit a PR to peer-star-app shortly.

@jacobheun
Copy link
Contributor

@pgte peer-base/peer-base#72 should resolve the issue for peer-star-app

@vasco-santos
Copy link
Member

vasco-santos commented Oct 8, 2018

Thanks @jacobheun 🚀

I also created a PR for checking the other error in the meantime.

@alanshaw
Copy link
Member

alanshaw commented Oct 16, 2018

@jacobheun / @pgte can we close this now?

@jacobheun
Copy link
Contributor

Yes, peer-star-app has been updated to reflect the latest datastore changes.

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

4 participants