Skip to content
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

import to IPFS is always disabled #861

Closed
bluelovers opened this issue Apr 4, 2020 · 5 comments
Closed

import to IPFS is always disabled #861

bluelovers opened this issue Apr 4, 2020 · 5 comments
Labels
exp/beginner Can be confidently tackled by newcomers good first issue Good issue for new contributors help wanted Seeking public contribution on this issue kind/bug A bug in existing code (including security flaws) P2 Medium: Good to have, but can wait until someone steps up status/in-progress In progress

Comments

@bluelovers
Copy link
Contributor

bluelovers commented Apr 4, 2020

Describe the bug

import to IPFS is always disabled

image

To Reproduce

Expected behavior

allow import

Screenshots

image

Desktop (please complete the following information):

  • OS: [e.g. iOS] win 10
  • Browser [e.g. chrome, safari] chrome
  • Version [e.g. 22]

image

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@bluelovers bluelovers added the need/triage Needs initial labeling and prioritization label Apr 4, 2020
@lidel
Copy link
Member

lidel commented Apr 5, 2020

@bluelovers do you have IPFS running? what the version of go-ipfs?

For import to work, you need to have extension enabled and a local IPFS node running:

2020-04-05--19-18-43

@lidel lidel added need/author-input Needs input from the original author and removed need/triage Needs initial labeling and prioritization labels Apr 5, 2020
@bluelovers
Copy link
Contributor Author

go-ipfs v0.4.23

image

image

use js-ipfs and update server conf in ipfs-companion

import to IPFS is also disabled

@lidel
Copy link
Member

lidel commented Apr 5, 2020

I see you have 0 peers – that is why it is disabled:

https://github.com/ipfs-shipyard/ipfs-companion/blob/df96a055157a8e715d141ea5bb1d03beb3b58acc/add-on/src/lib/context-menus.js#L166-L168

I believe this is a bug similar to #790.
We should allow imports when there are no peers, as long API is online.

@lidel lidel added exp/beginner Can be confidently tackled by newcomers good first issue Good issue for new contributors help wanted Seeking public contribution on this issue kind/bug A bug in existing code (including security flaws) P2 Medium: Good to have, but can wait until someone steps up status/ready Ready to be worked and removed need/author-input Needs input from the original author labels Apr 5, 2020
@lidel
Copy link
Member

lidel commented Apr 5, 2020

I believe the fix is to update mentioned line to:

- const ifApi = getState().peerCount > 0 
+ const ifApi = getState().peerCount >= 0 

@bluelovers is this something you would be interested in contributing as a PR?

bluelovers added a commit to bluelovers/ipfs-companion that referenced this issue Apr 5, 2020
@bluelovers
Copy link
Contributor Author

hmm..., how can u have that many peers ?

@jessicaschilling jessicaschilling added status/in-progress In progress and removed status/ready Ready to be worked labels Apr 6, 2020
@lidel lidel closed this as completed in 260cfaa Apr 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exp/beginner Can be confidently tackled by newcomers good first issue Good issue for new contributors help wanted Seeking public contribution on this issue kind/bug A bug in existing code (including security flaws) P2 Medium: Good to have, but can wait until someone steps up status/in-progress In progress
Projects
None yet
Development

No branches or pull requests

3 participants