Potential hang on "IPFS is Starting"
Per @UnKnoWn-Consortium, two conditions exist that can result in Desktop hanging on "IPFS is Starting" - original issue is https://github.com/ipfs-shipyard/ipfs-desktop/issues/1723 for background:
- Promise returned by
checkIfAddrIsDaemonfunction atconfig.jsdoes not resolve when the target address is occupied by another service that may or may not be responding to the test POST request; and - Selecting an alternative port via the prompt presented by the app does not alter the
apifile inside the.ipfsfolder
(1)
It should be mitigated by fix from https://github.com/ipfs-shipyard/ipfs-desktop/pull/1750 where I added 3s timeout for POST request used for port testing.
- Thank you @UnKnoWn-Consortium, info from https://github.com/ipfs-shipyard/ipfs-desktop/issues/1723#issuecomment-766165256 saved us a lot of time :raised_hands:
- It sounds like some Windows firewall thingy swallowing request without any reply – indeed we should have had a lower timeout in the first place.
(2)
Still unclear to me:
.ipfs/apiis created whenipfs daemonprocess starts and is removed when it stops.ipfs/apican 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/apimanually?- If not, perhaps your
ipfs daemonprocess was killed before it had a chance of doing cleanup (OS crash, power outrage, etc?) - Try stopping the daemon, removing
.ipfs/apiand starting it again.
- If not, perhaps your
@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?
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 https://github.com/ipfs-shipyard/go-ipfs-desktop/issues/3#issuecomment-771789008.
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.