Problem with window.ipfs and Files/Settings
See original GitHub issueSomething 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
- Files screen should not log entire stacktrace in code below (quick fix:
String(error)
): https://github.com/ipfs-shipyard/ipfs-webui/blob/a67135c0a5041ed5c7a6d5216e9b664cb5336726/src/bundles/config.js#L64 - There should be a note at the top of Files screen informing user that listed files come from “window.ipfs sandbox at /path/to/sandbox/root”. It may be a good UX to display faded-out breadcrumbs prefixing root with the path of sandbox root.
Thoughts?
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (8 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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.
To remove user confusion we should change API provider in web extension context from:
to: