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

Problems with adding files over 15MB with progress handler #2866

Closed
salamantos opened this issue Apr 22, 2018 · 4 comments
Closed

Problems with adding files over 15MB with progress handler #2866

salamantos opened this issue Apr 22, 2018 · 4 comments
Assignees
Labels
exp/wizard Extensive knowledge (implications, ramifications) required kind/bug A bug in existing code (including security flaws) pkg:http-client Issues related only to ipfs-http-client

Comments

@salamantos
Copy link

I tried to create progress bar to my file uploading. I used this code:

let progress_func_video = function (len) { 
    console.log("video progress:", len); 
}; 
ipfs.files.add(files_video, {progress: progress_func_video}, (err, result) => {...}

When I upload 1MB files, it's ok, but on 30MB files I got this error in Chrome:

POST https://site.com:81/api/v0/add?progress=true&stream-channels=true net::ERR_INCOMPLETE_CHUNKED_ENCODING
Uncaught (in promise) TypeError: network error at new exports.IncomingMessage (response.js?99b5:67) at module.exports.ClientRequest._connect (request.js?af32:259) at eval (request.js?af32:157)

How to fix it?

@daviddias
Copy link
Member

@salamantos mind creating a test that reproduces this issue?

@kliu128
Copy link

kliu128 commented Jul 21, 2018

I get the same error, but on files > ~1 MB, through a nginx reverse proxy. Turning off progress fixes the issue. I get a timeout on the backend after 1 minute from nginx.

@lidel
Copy link
Member

lidel commented Jul 24, 2018

Hey, someone says "problem with ipfs.files.add + progressbar over HTTP API", I hear ipfs/kubo#5168 (and https://github.com/ipfs/js-ipfs-api/issues/797) 🙃

Are you able to check raw JSON response and confirm the error is go-ipfs returning http: invalid Read on closed Body OR that error goes away when you send with hardcoded Connection: close OR run custom go-ipfs build with fix from ipfs/kubo#5168 (comment)?

These days I strongly suspect all those random errors are related to ipfs/kubo#5168

@achingbrain achingbrain transferred this issue from ipfs-inactive/js-ipfs-http-client Mar 9, 2020
@achingbrain achingbrain added kind/bug A bug in existing code (including security flaws) exp/wizard Extensive knowledge (implications, ramifications) required pkg:http-client Issues related only to ipfs-http-client labels Mar 9, 2020
@SgtPooki SgtPooki moved this to 🥞 Todo in js-ipfs deprecation May 17, 2023
@achingbrain
Copy link
Member

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

If the remote node you are talking to is Kubo, please switch out ipfs-http-client for kubo-rpc-client - it is a drop-in replacement and is where bug fixes and features will land going forwards.

If the remote node is js, please convert your app to Helia!

@github-project-automation github-project-automation bot moved this from 🥞 Todo to ✅ Done in js-ipfs deprecation Jun 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
exp/wizard Extensive knowledge (implications, ramifications) required kind/bug A bug in existing code (including security flaws) pkg:http-client Issues related only to ipfs-http-client
Projects
No open projects
Status: Done
Development

No branches or pull requests

5 participants