Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding file returns non ndjson #2109

Closed
travisperson opened this issue Dec 21, 2015 · 5 comments
Closed

Adding file returns non ndjson #2109

travisperson opened this issue Dec 21, 2015 · 5 comments
Labels
kind/bug A bug in existing code (including security flaws)

Comments

@travisperson
Copy link
Member

This was produced with js-ipfs-api v2.10.1 connected to ipfs version 0.4.0-dev

ipfs.add(new Buffer("hello"), function (err, dat) {
    console.log(err, dat)
})
events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: Could not parse row {...
 => POST /api/v0/add?stream-channels=true HTTP/1.1
 => User-Agent: /node-ipfs-api/2.10.1/
 => Content-Type: multipart/form-data; boundary=7fx0z9h714utbj4ici98rn94zo3fecdiwarvbz5ufx7jh5min0j640azqguv7vi
 => Host: localhost:5001
 => Connection: close
 => Transfer-Encoding: chunked
 => 
 => 43
 => --7fx0z9h714utbj4ici98rn94zo3fecdiwarvbz5ufx7jh5min0j640azqguv7vi
 => 
 => 57
 => Content-Disposition: file; filename=""
 => Content-Type: application/octet-stream
 => 
 => hello
 => 45
 => 
 => --7fx0z9h714utbj4ici98rn94zo3fecdiwarvbz5ufx7jh5min0j640azqguv7vi--
 => 0
 => 
<=  HTTP/1.1 200 OK
<=  Content-Type: application/json
<=  Trailer: X-Stream-Error
<=  Transfer-Encoding: chunked
<=  X-Chunked-Output: 1
<=  Date: Mon, 21 Dec 2015 07:20:18 GMT
<=  Connection: close
<=  Transfer-Encoding: chunked
<=  
<=  7b
<=  {
<=    "Name": "QmWfVY9y3xjsixTgbd9AorQxH7VtMpzfx2HaWtsoUYecaX",
<=    "Hash": "QmWfVY9y3xjsixTgbd9AorQxH7VtMpzfx2HaWtsoUYecaX"
<=  }
<=  

@travisperson
Copy link
Member Author

This commit probably need to be pulled into 0.4.0 891a8d7

@whyrusleeping
Copy link
Member

ah yeah, thats been fixed on 0.4.0 since the last rebase. Good catch. I'll try and get to the rebase this week.

@daviddias
Copy link
Member

@travisperson this was fixed on 0.4.0 and we have a branch on js-ipfs-api specific for 0.4.0, could you try with that one? ipfs-inactive/js-ipfs-http-client#74 thank you :)

@daviddias daviddias added the kind/bug A bug in existing code (including security flaws) label Jan 2, 2016
@RichardLitt
Copy link
Member

@travisperson Curious why this was closed?

@tinybike
Copy link

I'm still experiencing this issue; js-ipfs-api is unusable for me at the moment in Nodejs. (Whatever is causing this bug doesn't affect the distributable.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

No branches or pull requests

5 participants