-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable pinning when the ipfs daemon is in offline mode #790
Comments
Thank you for filling this. It compliments #782 nicely, enabling users to add/browse content in truly offline mode. The fix is to enable Web UI item in browser action menu when peer count is 0. @rehno-lindeque is this something you would be interested in contributing via a PR? |
I'd love to be able to contribute to ipfs related projects but unfortunately I can't justify it for the foreseeable future. Thank you for the suggestion though. |
👋🏻 I'll take this one |
@BrianBelhumeur sweet! |
@BrianBelhumeur hi, are you still interested in this, or can someone else pick this up? |
HI @lidel thanks for checking in... I got hung up on some issues I had running the project and couldn't get to the point of actually completing this issue. There were a number of packages that were not listed in package.json that are required to run the plugin, and even after installing those packages by hand, the plugin could still never find my local IPFS instance, running or not. I'm happy to open an issue addressing this if you think it could indeed be an issue with the project, but it felt a bit more to me like something local to my machine. The list of packages that were missing is: dlv |
@BrianBelhumeur I suspect you are building with |
@lidel That seems to have worked, thank you! Not sure what I was doing before, I thought I had followed the instructions in the readme. 🤷🏻♂️ I did have to install the utility jq independently, but that's it. I'll continue to work on this ticket. If anyone wishes to take it from me, feel free because I don't want to be a blocker. It might take me a bit because I'm new to the codebase. Cheers! |
@BrianBelhumeur no worries, we can keep pushing this feature to a later release 👍 Codebase changed a bit since 2019 so my old comments may not be accurate anymore, but most likely removing "isIpfsOnline" requirement from places like the line below is enough (all we need is extension to be active and API to be available): You may search for places where Its ok to open a PR if it is not 100% complete, we can land it together :) ps. if you want to run "offline" node for testing and have access to Docker, below command will create one in an ephemeral container:
|
Thank @lidel that's very kind and helpful of you! Here's my progress so far:
I'll open a [WIP] PR next, and your help in landing it would be greatly appreciated. Thanks again! |
I can't seem to push my branch... do I need permissions to do so? |
@BrianBelhumeur I believe you need to (1) fork this repo (2) open PR from your fork As for |
@lidel PR created above, however it is not in a working state. Whether the IPFS daemon is actually not running, or running in offline mode, Given the above, I'm not sure what criteria we can use to determine the difference between offline mode and true unavailability of the daemon. The state object looks identical under both conditions. The only difference I see is the error message generated by Daemon turned off: Daemon running in offline mode: |
Thank you @BrianBelhumeur, I've refactored things a bit in your PR (#936) and added a way to differentiate between "api is down" and "there are no peers but api is up" states. The remaining work needs to be addressed upstream (ipfs/ipfs-webui#853 (comment)), but should not block your PR from being merged. |
Currently ipfs companion is completely disabled when ipfs is run in offline mode. I.e.
However, it should still be possible to pin content when not connected to the network. That is
This Page > Add to IPFS (Keep Filename)
This Page > Add to IPFS
Tools > Open Web UI
Should all be available. Also possibly
Tools > Share files via IPFS
For this last menu option, the wording "Share" may introduce some confusion. On the other hand, presumably, someone that is savvy enough to run with
--offline
probably already understands that sharing will only take effect once they put the daemon into online mode.The text was updated successfully, but these errors were encountered: