ipfs-desktop: IPFS Desktop stuck on "IPFS is Starting"

It never gets past IPFS is Starting for me, unless I run ipfs daemon in a terminal window first…

This error also happens when pressing Check for Updates, while in this “IPFS is Starting” stuck state…

Specifications

  • OS: win32
  • IPFS Desktop Version: 0.13.2
  • Electron Version: 9.3.2
  • Chrome Version: 83.0.4103.122

Error

TypeError: ctx.manualCheckForUpdates is not a function
    at click (C:\Users\jjv36\AppData\Local\Programs\IPFS Desktop\resources\app.asar\src\tray.js:198:30)
    at MenuItem.click (electron/js2c/browser_init.js:65:1624)
    at Function.executeCommand (electron/js2c/browser_init.js:73:1102)

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 2
  • Comments: 24 (10 by maintainers)

Commits related to this issue

Most upvoted comments

Okay further investigation suggests it is a rather complicated matters as there are a couple of things interleaving with each other…

Before the start method of the ipfsd-ctl controller instance is called, a checkPorts function is called to determine if the ports required by ipfs are available.

https://github.com/ipfs-shipyard/ipfs-desktop/blob/6dbfa13bfa0f80c490696818bbb5c4c42aeb22fe/src/daemon/daemon.js#L72-L75

Things was first stuck at this checkPorts function defined at config.js.

https://github.com/ipfs-shipyard/ipfs-desktop/blob/6dbfa13bfa0f80c490696818bbb5c4c42aeb22fe/src/daemon/config.js#L216-L231

The culprit is the checkIfAddrIsDaemon function. What it does is to make a POST request to the previously identified API address (which is usually 127.0.0.1:5001) with a specific path /api/v0/refs?arg=/ipfs/QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn and see if there is a daemon already running that would reply with 200. Simple but not so elegant.

https://github.com/ipfs-shipyard/ipfs-desktop/blob/6dbfa13bfa0f80c490696818bbb5c4c42aeb22fe/src/daemon/config.js#L156-L175

The request has no timeout explicitly set. There is supposed to be a default timeout value of 120,000ms (i.e. 2 minutes) in Node 12.14.1 that comes with Electron 9 where the request can resort to (P.S. This default value was dropped in Node 13. So it is no longer the case in Electron 10 which comes with Node 14. See: https://github.com/nodejs/node/pull/27558).

If there happens to be any service other than ipfs that listens to the API port (5001) but not replying to the request (properly a la HTTP). It should take the whole 2 minutes before the request timing out. But in my case the promise never gets resolved. The startup process is stuck there.

So I tried to get this fixed by adding back the timeout property at the request option and the listener for timeout event. But this is not the end. Continue next.

Apologies - you got there before I did. Thanks for the tidy summarization. Issue is https://github.com/ipfs-shipyard/ipfs-desktop/issues/1749.

@jjv360 I think you can try checking if the port 5001 is occupied by other application. If yes, maybe you can try changing the config and api file in .ipfs folder at your home folder and see if it works. Good luck.

Yes, thank you so much! I have AirServer running which also uses port 5001, if I close that then IPFS Desktop starts without any issues. I changed those files to port 5005 and now I can run both apps at the same time as well.

I did have to change IPFS Companion’s settings to that port as well (the Chrome extension) but it seems to be working fine…