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

Unable to add files with go-ipfs cli #1515

Closed
travisperson opened this issue Aug 17, 2018 · 2 comments
Closed

Unable to add files with go-ipfs cli #1515

travisperson opened this issue Aug 17, 2018 · 2 comments
Assignees
Labels
exp/expert Having worked on the specific codebase is important kind/bug A bug in existing code (including security flaws) kind/maybe-in-helia P1 High: Likely tackled by core team if no one steps up status/ready Ready to be worked

Comments

@travisperson
Copy link
Member

  • Version: v0.31.6
  • Platform: Linux black.travis.fyi 4.17.8-1-ARCH #1 SMP PREEMPT Wed Jul 18 09:56:24 UTC 2018 x86_64 GNU/Linux
  • Subsystem: start

Type: Bug

Severity:

High(Low? - go-ipfs cli interopt is probably optional atm)

Description:

When using the go-ipfs cli to add files to a js-ipfs daemon, and error occurs when retrieving the added objects.

Error: json: cannot unmarshal number into Go struct field AddedObject.Size of type string

Steps to reproduce the error:

  • Have go-ipfs (using v0.4.17, but v0.4.15 also shows) and js-ipfs installed
$ jsipfs init && jsipfs daemon
$ ipfs --api=/ip4/127.0.0.1/tcp/5002 add < ipfs

This is probably going to look simple, but probably have a large impact. I'm unsure of where the proper place to fix the issue is.

Currently interface-ipfs-core works under the assumption of Size being an integer, and js-ipfs-api explicitly handles the conversion from string to integer at the moment.

Maybe the fix is to just remove the stream converter, and convert to a string at the edge of the js-ipfs? Not sure how far back the string value should be plumed back.

References

@daviddias daviddias added kind/bug A bug in existing code (including security flaws) status/ready Ready to be worked P1 High: Likely tackled by core team if no one steps up exp/expert Having worked on the specific codebase is important help wanted Seeking public contribution on this issue labels Aug 25, 2018
@alanshaw
Copy link
Member

I'm assuming it's serialised to a string to allow numbers bigger than Number.MAX_SAFE_INTEGER?

@alanshaw alanshaw removed the help wanted Seeking public contribution on this issue label Mar 12, 2019
@whizzzkid
Copy link

js-ipfs is being deprecated in favor of Helia. You can #4336 and read the migration guide.

Please feel to reopen with any comments before 2023-06-05. We will do a final pass on reopened issues afterward (see #4336).

This might already be resolved in Helia, if not please feel free to create an issue there.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
exp/expert Having worked on the specific codebase is important kind/bug A bug in existing code (including security flaws) kind/maybe-in-helia P1 High: Likely tackled by core team if no one steps up status/ready Ready to be worked
Projects
No open projects
Status: Done
Development

No branches or pull requests

4 participants