Skip to content
This repository has been archived by the owner on Apr 16, 2021. It is now read-only.

Improve error handling related to big uploads #33

Open
lidel opened this issue May 31, 2018 · 0 comments
Open

Improve error handling related to big uploads #33

lidel opened this issue May 31, 2018 · 0 comments

Comments

@lidel
Copy link
Contributor

lidel commented May 31, 2018

Extracted from ipfs/ipfs-webui#669 (comment):

Uploading large files kills chrome. [..] should we port that logic to window.ipfs? or at lease wrap window.ipfs with it, as any app that tries to do it is going to hit this problem. It's not ideal but I think it's better that we throw an error that the developer can catch rather than letting the tab fail.

Background

There are two known issues related to upload of big files.
I described both in: ipfs/ipfs-companion#464 (comment), but the gist is:

  • Chrome extension process crashing on files >128MiB (crash when dropping a big file ipfs/ipfs-companion#464)
  • Firefox works fine with 1GB file, but things bigger than 2GB hit language/lib limitations and fail silently with:
    RangeError: Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes

Workaround

In both cases we could add <vendor>+<size> guards that preemptively throw Error, removing the need for developer using window.ipfs to do repetitive error-handling in userland.
It should be enough until the issue is solved upstream.

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

1 participant