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

offline error loses stack #1055

Closed
pgte opened this issue Nov 3, 2017 · 0 comments
Closed

offline error loses stack #1055

pgte opened this issue Nov 3, 2017 · 0 comments

Comments

@pgte
Copy link
Contributor

pgte commented Nov 3, 2017

  • Version: 0.26.0
  • Platform: Browser
  • Subsystem:

Type:

Bug

Severity:

Low

Description:

Offline error is created globally and, when thrown, does not contain stack.

Steps to reproduce the error:

Create an IPFS node in the browser while offline.
See the error, it's something like this:

utils.js:3 Uncaught (in promise) Error: This command must be run in online mode. Try running 'ipfs daemon' first.
    at Object.../peerpad-core/node_modules/ipfs/src/core/utils.js (utils.js:3)
    at __webpack_require__ (bootstrap 17bb53dc92d5561e6d85:698)
    at fn (bootstrap 17bb53dc92d5561e6d85:111)
    at Object.../peerpad-core/node_modules/ipfs/src/core/components/swarm.js (swarm.js:7)
    at __webpack_require__ (bootstrap 17bb53dc92d5561e6d85:698)
    at fn (bootstrap 17bb53dc92d5561e6d85:111)
    at Object.../peerpad-core/node_modules/ipfs/src/core/components/index.js (index.js:17)
    at __webpack_require__ (bootstrap 17bb53dc92d5561e6d85:698)
    at fn (bootstrap 17bb53dc92d5561e6d85:111)
    at Object.<anonymous> (index.js:16)
    at Object.../peerpad-core/node_modules/ipfs/src/core/index.js (index.js:120)
    at __webpack_require__ (bootstrap 17bb53dc92d5561e6d85:698)
    at fn (bootstrap 17bb53dc92d5561e6d85:111)
    at Object.../peerpad-core/src/backend/ipfs.js (ipfs.js:3)
    at __webpack_require__ (bootstrap 17bb53dc92d5561e6d85:698)
    at fn (bootstrap 17bb53dc92d5561e6d85:111)
    at Object.../peerpad-core/src/index.js (index.js:4)
    at __webpack_require__ (bootstrap 17bb53dc92d5561e6d85:698)
    at fn (bootstrap 17bb53dc92d5561e6d85:111)
    at <anonymous>

Notice that the stack stays at utils.js:3, where the error was created.

MicrowaveDev pushed a commit to galtproject/js-ipfs that referenced this issue May 22, 2020
The ipfs object stat command couldn't handle the {timeout: '1s'} option (or any other options). We're already checking for the opts parameter so it makes sense that we should be sending it as well. 

Things work as desired now with this one line addition.
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

2 participants