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

Potential hang on "IPFS is Starting" #1749

Open
jessicaschilling opened this issue Jan 25, 2021 · 3 comments
Open

Potential hang on "IPFS is Starting" #1749

jessicaschilling opened this issue Jan 25, 2021 · 3 comments
Labels
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

Comments

@jessicaschilling
Copy link
Contributor

Per @UnKnoWn-Consortium, two conditions exist that can result in Desktop hanging on "IPFS is Starting" - original issue is #1723 for background:

  1. Promise returned by checkIfAddrIsDaemon function at config.js does not resolve when the target address is occupied by another service that may or may not be responding to the test POST request; and
  2. Selecting an alternative port via the prompt presented by the app does not alter the api file inside the .ipfs folder
@jessicaschilling jessicaschilling added kind/bug A bug in existing code (including security flaws) need/analysis Needs further analysis before proceeding P1 High: Likely tackled by core team if no one steps up labels Jan 25, 2021
lidel added a commit that referenced this issue Jan 25, 2021
This should mitigate problem described in
#1723 (comment)
and help with first point of #1749

License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
@lidel
Copy link
Member

lidel commented Jan 25, 2021

(1)

It should be mitigated by fix from #1750 where I added 3s timeout for POST request used for port testing.

(2)

Still unclear to me:

  • .ipfs/api is created when ipfs daemon process starts and is removed when it stops
  • .ipfs/api can also be created manually by the user to point IPFS Desktop at go-ipfs running manually under different user, in Docker, etc.
  • @UnKnoWn-Consortium did you create .ipfs/api manually?
    • If not, perhaps your ipfs daemon process was killed before it had a chance of doing cleanup (OS crash, power outrage, etc?)
    • Try stopping the daemon, removing .ipfs/api and starting it again.

@UnKnoWn-Consortium
Copy link

UnKnoWn-Consortium commented Jan 26, 2021

@lidel

Regarding (1),
You are welcome. Glad it helps.

Regarding (2),
Oh yeah. I think I may have killed the daemon process manually a few times to test and investigate the issue. Aha mystery solved. On the other hand, I am wondering, will it disrupt the lifecycle of the .ipfs folder or the daemon if a cleanup script that runs when the app starts up is added?

lidel added a commit that referenced this issue Feb 11, 2021
This should mitigate problem described in
#1723 (comment)
and help with the first point of #1749
@lidel
Copy link
Member

lidel commented Feb 23, 2021

I am wondering, will it disrupt the lifecycle of the .ipfs folder or the daemon if a cleanup script that runs when the app starts up is added?

I believe that would work, as long the script implements heuristic described in ipfs-shipyard/go-ipfs-desktop#3 (comment).
We want to do cleanup only when multiaddr in $IPFS_PATH/api is truly down.
If someone submits PR I'll be happy to review.

@lidel lidel added help wanted Seeking public contribution on this issue and removed need/analysis Needs further analysis before proceeding labels Feb 23, 2021
@lidel lidel added P2 Medium: Good to have, but can wait until someone steps up and removed P1 High: Likely tackled by core team if no one steps up labels Jan 17, 2022
@SgtPooki SgtPooki moved this to To do in IPFS-GUI (PL EngRes) Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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
Projects
No open projects
Status: Needs Grooming
Development

No branches or pull requests

3 participants