question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem with window.ipfs and Files/Settings

See original GitHub issue

Something that we should address before shipping the first iteration:

Background

When WebUI is bundled with IPFS Companion it detects and uses original API object available in WebExtension context, but if WebUI is loaded over HTTP it tries to use window.ipfs injected by IPFS Companion.

Problem

The problem with window.ipfs in current form is a limited subset of IPFS API and sensitive things like access to ipfs.config.* is blocked and access to ipfs.files.* is sandboxed.

Current UX is problematic. window.ipfs not only disables the Settings screen, but the sandboxing make it look like Files screen is broken.

User will be really confused if ipfs files ls shows files in the terminal, but WebUI claims it is empty.

Solution

Thoughts?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
hacdiascommented, Sep 12, 2018

@lidel gotcha and it makes sense. We need to have it embedded to make sure it works on private networks and in places where ipfs.io might be blocked, as well as when there is some DNS error.

0reactions
lidelcommented, Sep 29, 2018

To remove user confusion we should change API provider in web extension context from:

2018-09-29--16-20-02

to:

2018-09-29--16-20-30

Read more comments on GitHub >

github_iconTop Results From Across the Web

Meta: window.ipfs v2 · Issue #589 · ipfs/ipfs-companion - GitHub
The goal: window.ipfs v2 ships and is production ready ... Problem with window.ipfs and Files/Settings ipfs/ipfs-webui#787.
Read more >
Using window.ipfs in IPFS Companion
IPFS Companion exposes a subset of IPFS APIs as window.ipfs on every webpage. This means websites can detect that window.ipfs already exists and...
Read more >
IPFS Config on windows 10 - Ethereum Stack Exchange
Using git bash on windows 10 solved the problem.
Read more >
I am not able to use ipfs - Stack Overflow
I want to publish files on ipfs but it's showing me an error. Here is my code... const ipfsClient = require('ipfs-http-client'); const ipfs...
Read more >
Introducing support for IPFS, backed by decentralized storage
However this brings a new problem to light: where are these files actually being stored? Somewhere out there, an IPFS server is running...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found