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

Fail non-silently when things are unimplemented #1633

Closed
OliverUv opened this issue Oct 15, 2018 · 3 comments
Closed

Fail non-silently when things are unimplemented #1633

OliverUv opened this issue Oct 15, 2018 · 3 comments
Labels
help wanted Seeking public contribution on this issue kind/bug A bug in existing code (including security flaws) P2 Medium: Good to have, but can wait until someone steps up

Comments

@OliverUv
Copy link

OliverUv commented Oct 15, 2018

  • Version:
    commit: ""
    repo: 7
    version: "0.32.3"

  • Platform:

  • uname -srvpoi > Linux 4.15.0-33-generic IPFS Repo JavaScript Implementation #36~16.04.1-Ubuntu SMP Wed Aug 15 17:21:05 UTC 2018 x86_64 x86_64 GNU/Linux
  • Chrome Version 69.0.3497.92 (Official Build) (64-bit)
  • Subsystem: files (?)

Type: Enhancement

Severity: Medium

Description:

files.add(blob, { chunker: 'rabin' }) fails silently by returning an empty array when running in browser. It would be immensely helpful for me if these kinds of silent failures were non-silent. As it is, I wasted 1 hour figuring out why this call was failing. If you throw "unimplemented errors" in a uniform way, it could also help newcomers find areas where they can help.

The reason this is important to me is that I'm using IPFS to store some game state, and the game server can run either in-browser or on Node - using the same code.

Steps to reproduce the error:

  • Add some data with files.add using the rabin chunker.
  • Observe that the callback receives an empty array in response.
@alanshaw
Copy link
Member

Thanks for reporting @OliverUv - this should definitely not be the case! I've opened an issue here ipfs-inactive/js-ipfs-unixfs-engine#230 to track.

@alanshaw alanshaw added kind/bug A bug in existing code (including security flaws) help wanted Seeking public contribution on this issue status/ready Ready to be worked P2 Medium: Good to have, but can wait until someone steps up labels Oct 15, 2018
@achingbrain
Copy link
Member

ipfs-inactive/js-ipfs-unixfs-engine#230 is fixed but even once it's been released our use of the pull-sort module here causes errors to be swallowed.

I've opened a pull-stream/pull-sort#2 to fix the problem. Once that's merged & released the errors should flow.

@alanshaw
Copy link
Member

alanshaw commented Nov 1, 2018

pull-stream/pull-sort#2 has now been released 😀

@alanshaw alanshaw closed this as completed Nov 1, 2018
@ghost ghost removed the status/ready Ready to be worked label Nov 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Seeking public contribution on this issue kind/bug A bug in existing code (including security flaws) P2 Medium: Good to have, but can wait until someone steps up
Projects
None yet
Development

No branches or pull requests

3 participants