ipfs / ipfs-desktop

An unobtrusive and user-friendly desktop application for IPFS on Windows, Mac and Linux.
https://docs.ipfs.tech/install/ipfs-desktop/
MIT License
6k stars 865 forks source link

An automatic error report on IPFS Desktop #1479

Closed bertrandfalguiere closed 4 years ago

bertrandfalguiere commented 4 years ago

I installed from source following the procedure on the readme in GitHub.

In parallel, I was pinning the XKCD collection via the terminal on go-ipfs 0.5.0.

I left the PC unattended for a while. When I return, I was prompted that IPFS Desktop stopped with an error.

I see below that this is an old version of IPFS Desktop. Does building from source following the readme build an old version? Or the automatic text below report the wrong version?

Specifications

Error

TypeError: Cannot read property 'pid' of null
    at Timeout._onTimeout (/home/bertrand/Downloads/ipfs-desktop/node_modules/ipfsd-ctl/src/ipfsd-daemon.js:243:101)
    at listOnTimeout (internal/timers.js:531:17)
    at processTimers (internal/timers.js:475:7)
    at messageBox (electron/js2c/browser_init.js:962:20)
    at Object.showMessageBoxSync (electron/js2c/browser_init.js:990:12)
    at module.exports (/home/bertrand/Downloads/ipfs-desktop/src/dialogs/dialog.js:42:27)
    at downloadCid (/home/bertrand/Downloads/ipfs-desktop/src/download-cid.js:119:17)
bertrandfalguiere commented 4 years ago

Also: Console said: npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! ipfs-desktop@0.11.1 start:cross-env NODE_ENV=development electron src/index.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the ipfs-desktop@0.11.1 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

The experiment npm on IPFS was on, and the console told me to post the logs. Here they are:

`

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   '/home/bertrand/.nvm/versions/node/v12.7.0/bin/node',
1 verbose cli   '/home/bertrand/.nvm/versions/node/v12.7.0/bin/npm',
1 verbose cli   'start'
1 verbose cli ]
2 info using npm@6.13.7
3 info using node@v12.7.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle ipfs-desktop@0.11.1~prestart: ipfs-desktop@0.11.1
6 info lifecycle ipfs-desktop@0.11.1~start: ipfs-desktop@0.11.1
7 verbose lifecycle ipfs-desktop@0.11.1~start: unsafe-perm in lifecycle true
8 verbose lifecycle ipfs-desktop@0.11.1~start: PATH: /home/bertrand/.nvm/versions/node/v12.7.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/bertrand/Downloads/ipfs-desktop/node_modules/.bin:/home/bertrand/.nvm/versions/node/v12.7.0/bin:/home/bertrand/bin:/home/bertrand/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle ipfs-desktop@0.11.1~start: CWD: /home/bertrand/Downloads/ipfs-desktop
10 silly lifecycle ipfs-desktop@0.11.1~start: Args: [ '-c', 'cross-env NODE_ENV=development electron src/index.js' ]
11 silly lifecycle ipfs-desktop@0.11.1~start: Returned: code: 1  signal: null
12 info lifecycle ipfs-desktop@0.11.1~start: Failed to exec start script
13 verbose stack Error: ipfs-desktop@0.11.1 start: `cross-env NODE_ENV=development electron src/index.js`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/home/bertrand/.nvm/versions/node/v12.7.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:203:13)
13 verbose stack     at ChildProcess.<anonymous> (/home/bertrand/.nvm/versions/node/v12.7.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:203:13)
13 verbose stack     at maybeClose (internal/child_process.js:1021:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid ipfs-desktop@0.11.1
15 verbose cwd /home/bertrand/Downloads/ipfs-desktop
16 verbose Linux 5.4.0-28-generic
17 verbose argv "/home/bertrand/.nvm/versions/node/v12.7.0/bin/node" "/home/bertrand/.nvm/versions/node/v12.7.0/bin/npm" "start"
18 verbose node v12.7.0
19 verbose npm  v6.13.7
20 error code ELIFECYCLE
21 error errno 1
22 error ipfs-desktop@0.11.1 start: `cross-env NODE_ENV=development electron src/index.js`
22 error Exit status 1
23 error Failed at the ipfs-desktop@0.11.1 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

`

bertrandfalguiere commented 4 years ago

Happened again with IPFS Desktop from Snap.

This time: 1) The version in the generated GH issue was correct. (see below) 2) IPFS was installed from tar.gz 3) Pinning XKCD was succesfull (ipfs pin add QmdmQXB2mzChmMeKY47C43LxUdg1NDJ5MWcKMKxDu7RgQm)

I don't know how to fetch the logs as echo IPFS_PATH returns nothing and ~/.ipfs does not contain any log.

Specifications

lidel commented 4 years ago

@bertrandfalguiere is this still TypeError: Cannot read property 'pid' of null or something else?

Would be useful to see logs. Try the main menu:

  1. Go to AdvancedOpen Logs Directory
  2. Find *.log files
  3. Attach error.log and combined.log to this issue, if possible
bertrandfalguiere commented 4 years ago

Unfortunately, I can't due to the tray icon issue on Ubuntu. :/

lidel commented 4 years ago

@bertrandfalguiere check if you have ~/.config/IPFS Desktop or something like that, mentioned *.log files should be there

ps. are you using ubuntu/gnome-shell-extension-appindicator? Is the "issue on Ubuntu" this one https://github.com/electron/electron/issues/21576?

bertrandfalguiere commented 4 years ago

ps. are you using ubuntu/gnome-shell-extension-appindicator?

No, I wasn't.

Is the "issue on Ubuntu" this one electron/electron#21576?

Looks like it except no click are taken into account on the top tray icon instead of some of them in the linked bug, and all of them in a normal behaviour.

@bertrandfalguiere check if you have ~/.config/IPFS Desktop or something like that, mentioned *.log files should be there

There's no directory IPFS Desktop in ~/.config/. Maybe because I installed via Snap.

I found the logs in ~/snap/ipfs-desktop/18/.config/IPFS Desktop though, in the end. It took me to launch IPFS Desktop from CLI to know where to find them. (image)

Here they are:

error.log combined.log

Config is default.

ps. are you using ubuntu/gnome-shell-extension-appindicator?

I will install it and retry.

bertrandfalguiere commented 4 years ago

OK, now I have an error (see below). IPFS Desktop is open but doesn't detect the IPFS daemon and doesn't spawn one. I think the updater has a bad interaction with a previous installation?

`bertrand@computer:~$ ipfs-desktop 2020-05-19T11:17:06.642Z info: [meta] logs can be found on /home/bertrand/snap/ipfs-desktop/18/.config/IPFS Desktop Checking for update Error: Error: ENOENT: no such file or directory, open '/snap/ipfs-desktop/18/resources/app-update.yml' 2020-05-19T11:17:08.918Z error: [updater] Error: ENOENT: no such file or directory, open '/snap/ipfs-desktop/18/resources/app-update.yml' (electron) The default value of app.allowRendererProcessReuse is deprecated, it is currently "false". It will change to be "true" in Electron 9. For more information please check https://github.com/electron/electron/issues/18397 2020-05-19T11:17:10.615Z info: [web ui] window ready 2020-05-19T11:17:10.616Z info: [web ui] navigate to / 2020-05-19T11:17:10.650Z info: [tray] starting 2020-05-19T11:17:10.813Z info: [tray] started 2020-05-19T11:17:10.815Z info: [ipfsd] start daemon STARTED 2020-05-19T11:17:11.763Z info: [daemon] removing api file 2020-05-19T11:17:11.775Z error: [ipfsd] start daemon Error: EACCES: permission denied, unlink '/home/bertrand/snap/ipfs-desktop/17/.ipfs/api' at Object.unlinkSync (fs.js:1035:3) at Object.rimrafSync [as removeSync] (/snap/ipfs-desktop/18/resources/app.asar/node_modules/fs-extra/lib/remove/rimraf.js:254:15) at rmApiFile (/snap/ipfs-desktop/18/resources/app.asar/src/daemon/config.js:21:13) at module.exports (/snap/ipfs-desktop/18/resources/app.asar/src/daemon/daemon.js:93:5) 2020-05-19T11:17:11.820Z info: [ipfs on path] no action taken 2020-05-19T11:17:11.843Z info: [launch on startup] disabled Error: ENOENT, node_modules/countly-sdk-nodejs/data/cly_queue.json not found in /snap/ipfs-desktop/18/resources/app.asar at createError (electron/js2c/asar.js:111:17) at Object.func [as openSync] (electron/js2c/asar.js:146:27) at Object.writeFileSync (fs.js:1265:35) at storeSet (/snap/ipfs-desktop/18/resources/app.asar/node_modules/countly-sdk-nodejs/lib/countly.js:1337:16) at toRequestQueue (/snap/ipfs-desktop/18/resources/app.asar/node_modules/countly-sdk-nodejs/lib/countly.js:985:13) at Timeout._onTimeout (/snap/ipfs-desktop/18/resources/app.asar/node_modules/countly-sdk-nodejs/lib/countly.js:354:17) at listOnTimeout (internal/timers.js:531:17) at processTimers (internal/timers.js:475:7) Error: ENOENT, node_modules/countly-sdk-nodejs/data/cly_queue.json not found in /snap/ipfs-desktop/18/resources/app.asar at createError (electron/js2c/asar.js:111:17) at Object.func [as openSync] (electron/js2c/asar.js:146:27) at Object.writeFileSync (fs.js:1265:35) at storeSet (/snap/ipfs-desktop/18/resources/app.asar/node_modules/countly-sdk-nodejs/lib/countly.js:1337:16) at /snap/ipfs-desktop/18/resources/app.asar/node_modules/countly-sdk-nodejs/lib/countly.js:1037:17 at ClientRequest. (/snap/ipfs-desktop/18/resources/app.asar/node_modules/countly-sdk-nodejs/lib/countly.js:1212:21) at ClientRequest.emit (events.js:210:5) at TLSSocket.socketErrorListener (_http_client.js:406:9) at TLSSocket.emit (events.js:210:5) at emitErrorNT (internal/streams/destroy.js:92:8) Error: ENOENT, node_modules/countly-sdk-nodejs/data/cly_queue.json not found in /snap/ipfs-desktop/18/resources/app.asar at createError (electron/js2c/asar.js:111:17) at Object.func [as openSync] (electron/js2c/asar.js:146:27) at Object.writeFileSync (fs.js:1265:35) at storeSet (/snap/ipfs-desktop/18/resources/app.asar/node_modules/countly-sdk-nodejs/lib/countly.js:1337:16) at /snap/ipfs-desktop/18/resources/app.asar/node_modules/countly-sdk-nodejs/lib/countly.js:1037:17 at ClientRequest. (/snap/ipfs-desktop/18/resources/app.asar/node_modules/countly-sdk-nodejs/lib/countly.js:1212:21) at ClientRequest.emit (events.js:210:5) at TLSSocket.socketErrorListener (_http_client.js:406:9) at TLSSocket.emit (events.js:210:5) at emitErrorNT (internal/streams/destroy.js:92:8) Error: ENOENT, node_modules/countly-sdk-nodejs/data/__cly_queue.json not found in /snap/ipfs-desktop/18/resources/app.asar at createError (electron/js2c/asar.js:111:17) at Object.func [as openSync] (electron/js2c/asar.js:146:27) at Object.writeFileSync (fs.js:1265:35) at storeSet (/snap/ipfs-desktop/18/resources/app.asar/node_modules/countly-sdk-nodejs/lib/countly.js:1337:16) at /snap/ipfs-desktop/18/resources/app.asar/node_modules/countly-sdk-nodejs/lib/countly.js:1037:17 at ClientRequest. (/snap/ipfs-desktop/18/resources/app.asar/node_modules/countly-sdk-nodejs/lib/countly.js:1212:21) at ClientRequest.emit (events.js:210:5) at TLSSocket.socketErrorListener (_http_client.js:406:9) at TLSSocket.emit (events.js:210:5) at emitErrorNT (internal/streams/destroy.js:92:8) Error: ENOENT, node_modules/countly-sdk-nodejs/data/cly_queue.json not found in /snap/ipfs-desktop/18/resources/app.asar at createError (electron/js2c/asar.js:111:17) at Object.func [as openSync] (electron/js2c/asar.js:146:27) at Object.writeFileSync (fs.js:1265:35) at storeSet (/snap/ipfs-desktop/18/resources/app.asar/node_modules/countly-sdk-nodejs/lib/countly.js:1337:16) at /snap/ipfs-desktop/18/resources/app.asar/node_modules/countly-sdk-nodejs/lib/countly.js:1037:17 at IncomingMessage. (/snap/ipfs-desktop/18/resources/app.asar/node_modules/countly-sdk-nodejs/lib/countly.js:1197:25) at IncomingMessage.emit (events.js:215:7) at endReadableNT (_stream_readable.js:1183:12) at processTicksAndRejections (internal/process/task_queues.js:80:21)

`

I will try to manually remove ~/snap/ipfs-desktop/17/ and see what I break.

bertrandfalguiere commented 4 years ago

... This just leads to a different error.

bertrand@computer:~$ ipfs-desktop 2020-05-19T11:29:00.416Z info: [meta] logs can be found on /home/bertrand/snap/ipfs-desktop/18/.config/IPFS Desktop Checking for update Error: Error: ENOENT: no such file or directory, open '/snap/ipfs-desktop/18/resources/app-update.yml' 2020-05-19T11:29:04.047Z error: [updater] Error: ENOENT: no such file or directory, open '/snap/ipfs-desktop/18/resources/app-update.yml' (electron) The default value of app.allowRendererProcessReuse is deprecated, it is currently "false". It will change to be "true" in Electron 9. For more information please check https://github.com/electron/electron/issues/18397 2020-05-19T11:29:06.811Z info: [web ui] window ready 2020-05-19T11:29:06.814Z info: [web ui] navigate to / 2020-05-19T11:29:06.845Z info: [tray] starting 2020-05-19T11:29:07.081Z info: [tray] started 2020-05-19T11:29:07.084Z info: [ipfsd] start daemon STARTED Error: ENOENT, node_modules/countly-sdk-nodejs/data/__cly_queue.json not found in /snap/ipfs-desktop/18/resources/app.asar at createError (electron/js2c/asar.js:111:17) at Object.func [as openSync] (electron/js2c/asar.js:146:27) at Object.writeFileSync (fs.js:1265:35) at storeSet (/snap/ipfs-desktop/18/resources/app.asar/node_modules/countly-sdk-nodejs/lib/countly.js:1337:16) at toRequestQueue (/snap/ipfs-desktop/18/resources/app.asar/node_modules/countly-sdk-nodejs/lib/countly.js:985:13) at Timeout._onTimeout (/snap/ipfs-desktop/18/resources/app.asar/node_modules/countly-sdk-nodejs/lib/countly.js:354:17) at listOnTimeout (internal/timers.js:531:17) at processTimers (internal/timers.js:475:7) Error: ENOENT, node_modules/countly-sdk-nodejs/data/__cly_queue.json not found in /snap/ipfs-desktop/18/resources/app.asar at createError (electron/js2c/asar.js:111:17) at Object.func [as openSync] (electron/js2c/asar.js:146:27) at Object.writeFileSync (fs.js:1265:35) at storeSet (/snap/ipfs-desktop/18/resources/app.asar/node_modules/countly-sdk-nodejs/lib/countly.js:1337:16) at /snap/ipfs-desktop/18/resources/app.asar/node_modules/countly-sdk-nodejs/lib/countly.js:1037:17 at IncomingMessage.<anonymous> (/snap/ipfs-desktop/18/resources/app.asar/node_modules/countly-sdk-nodejs/lib/countly.js:1197:25) at IncomingMessage.emit (events.js:215:7) at endReadableNT (_stream_readable.js:1183:12) at processTicksAndRejections (internal/process/task_queues.js:80:21) Error: ENOENT, node_modules/countly-sdk-nodejs/data/__cly_queue.json not found in /snap/ipfs-desktop/18/resources/app.asar at createError (electron/js2c/asar.js:111:17) at Object.func [as openSync] (electron/js2c/asar.js:146:27) at Object.writeFileSync (fs.js:1265:35) at storeSet (/snap/ipfs-desktop/18/resources/app.asar/node_modules/countly-sdk-nodejs/lib/countly.js:1337:16) at toRequestQueue (/snap/ipfs-desktop/18/resources/app.asar/node_modules/countly-sdk-nodejs/lib/countly.js:985:13) at recordError (/snap/ipfs-desktop/18/resources/app.asar/node_modules/countly-sdk-nodejs/lib/countly.js:1148:13) at Object.Countly.log_error (/snap/ipfs-desktop/18/resources/app.asar/node_modules/countly-sdk-nodejs/lib/countly.js:753:9) at Object.fail (/snap/ipfs-desktop/18/resources/app.asar/src/common/logger.js:63:17) at startIpfs (/snap/ipfs-desktop/18/resources/app.asar/src/daemon/index.js:68:11) 2020-05-19T11:29:10.244Z error: [ipfsd] start daemon SyntaxError: Unexpected end of JSON input at JSON.parse (<anonymous>) at Daemon._getConfig (/snap/ipfs-desktop/18/resources/app.asar/node_modules/ipfsd-ctl/src/ipfsd-daemon.js:303:19) at async Daemon.init (/snap/ipfs-desktop/18/resources/app.asar/node_modules/ipfsd-ctl/src/ipfsd-daemon.js:129:9) at async spawn (/snap/ipfs-desktop/18/resources/app.asar/src/daemon/daemon.js:65:3) at async module.exports (/snap/ipfs-desktop/18/resources/app.asar/src/daemon/daemon.js:74:31) at async startIpfs (/snap/ipfs-desktop/18/resources/app.asar/src/daemon/index.js:54:15) at async module.exports (/snap/ipfs-desktop/18/resources/app.asar/src/daemon/index.js:120:3) at async run (/snap/ipfs-desktop/18/resources/app.asar/src/index.js:72:5) 2020-05-19T11:29:10.308Z info: [ipfs on path] no action taken 2020-05-19T11:29:10.310Z info: [launch on startup] disabled Error: ENOENT, node_modules/countly-sdk-nodejs/data/__cly_queue.json not found in /snap/ipfs-desktop/18/resources/app.asar at createError (electron/js2c/asar.js:111:17) at Object.func [as openSync] (electron/js2c/asar.js:146:27) at Object.writeFileSync (fs.js:1265:35) at storeSet (/snap/ipfs-desktop/18/resources/app.asar/node_modules/countly-sdk-nodejs/lib/countly.js:1337:16) at /snap/ipfs-desktop/18/resources/app.asar/node_modules/countly-sdk-nodejs/lib/countly.js:1037:17 at IncomingMessage.<anonymous> (/snap/ipfs-desktop/18/resources/app.asar/node_modules/countly-sdk-nodejs/lib/countly.js:1197:25) at IncomingMessage.emit (events.js:215:7) at endReadableNT (_stream_readable.js:1183:12) at processTicksAndRejections (internal/process/task_queues.js:80:21)

i will try to uninstall from snap and reinstall