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

Hangs on OSX #631

Closed
steverecio opened this issue Mar 27, 2018 · 12 comments
Closed

Hangs on OSX #631

steverecio opened this issue Mar 27, 2018 · 12 comments

Comments

@steverecio
Copy link

After launching, ipfs-desktop just hangs after loading in the menubar. If I drop down the GUI I see the pulsing circle loader but nothing happens and nothing shows up in the log. I can kill it by clicking the "Pin" tab which loads the "Something wrong happened" error message.

Node: v9.3.0
NPM: v5.6.0
OSX: 10.13.3

$ npm start

> ipfs-desktop@0.4.0 start /Users/stevenrecio/Projects/ipfs/ipfs-desktop
> electron-forge start

✔ Checking your system
✔ Locating Application
✔ Preparing native dependencies: 3 / 3
✔ Launching Application
2018-03-27 18:23:57.272 Electron[833:19193] *** WARNING: Textured window <AtomNSWindow: 0x7fed2acf16b0> is getting an implicitly transparent titlebar. This will break when linking against newer SDKs. Use NSWindow's -titlebarAppearsTransparent=YES instead.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ipfs-desktop@0.4.0 start: `electron-forge start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ipfs-desktop@0.4.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/stevenrecio/.npm/_logs/2018-03-27T22_26_07_215Z-debug.log
$ cat /Users/stevenrecio/Library/Application\ Support/ipfs-desktop/logs/error.log
cat: /Users/stevenrecio/Library/Application Support/ipfs-desktop/logs/error.log: No such file or directory
$ cat /Users/stevenrecio/.npm/_logs/2018-03-27T22_26_07_215Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/9.3.0_1/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'start' ]
2 info using npm@5.6.0
3 info using node@v9.3.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle ipfs-desktop@0.4.0~prestart: ipfs-desktop@0.4.0
6 info lifecycle ipfs-desktop@0.4.0~start: ipfs-desktop@0.4.0
7 verbose lifecycle ipfs-desktop@0.4.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle ipfs-desktop@0.4.0~start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/stevenrecio/Projects/ipfs/ipfs-desktop/node_modules/.bin:/Users/stevenrecio/.npm-packages/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
9 verbose lifecycle ipfs-desktop@0.4.0~start: CWD: /Users/stevenrecio/Projects/ipfs/ipfs-desktop
10 silly lifecycle ipfs-desktop@0.4.0~start: Args: [ '-c', 'electron-forge start' ]
11 silly lifecycle ipfs-desktop@0.4.0~start: Returned: code: 1  signal: null
12 info lifecycle ipfs-desktop@0.4.0~start: Failed to exec start script
13 verbose stack Error: ipfs-desktop@0.4.0 start: `electron-forge start`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
13 verbose stack     at EventEmitter.emit (events.js:159:13)
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:159:13)
13 verbose stack     at maybeClose (internal/child_process.js:943:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
14 verbose pkgid ipfs-desktop@0.4.0
15 verbose cwd /Users/stevenrecio/Projects/ipfs/ipfs-desktop
16 verbose Darwin 17.4.0
17 verbose argv "/usr/local/Cellar/node/9.3.0_1/bin/node" "/usr/local/bin/npm" "start"
18 verbose node v9.3.0
19 verbose npm  v5.6.0
20 error code ELIFECYCLE
21 error errno 1
22 error ipfs-desktop@0.4.0 start: `electron-forge start`
22 error Exit status 1
23 error Failed at the ipfs-desktop@0.4.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
@nothingismagick
Copy link

Not sure if its related, but i had a problem today too:

screen shot 2018-03-29 at 12 39 11

cat Library/Application\ Support/ipfs-desktop/logs/error.log

{"message":"Error: 36:68: execution error: System Events got an error: 
Can’t get login item \"IPFS Desktop\". (-1728)\n\n    at ChildProcess.
<anonymous> 
(/Applications/IPFS Desktop.app/Contents/Resources/app/node_modules/applescript/lib/applescript.js:49:13)\n    
at emitTwo (events.js:125:13)\n    
at ChildProcess.emit (events.js:213:7)\n   
at Process.ChildProcess._handle.onexit 
(internal/child_process.js:200:12)",
"level":"error"}
{"message":"Uncaught Exception: TypeError: Cannot read property 'pin' of null
\n at EventEmitter.

<anonymous> (/Applications/IPFS Desktop.app/Contents/Resources/app/src/controls/main/pinned-files.js:71:11)\n   
 at emitTwo (events.js:125:13)\n    
at EventEmitter.emit (events.js:213:7)\n    
at WebContents.<anonymous>
 (/Applications/IPFS Desktop.app/Contents/Resources/electron.asar/browser/api/web-contents.js:249:13)\n    at emitTwo (events.js:125:13)\n    at WebContents.emit (events.js:213:7)","level":"error"}

P.S. "Something wrong happened" is pretty shoddy English. Just saying...

@imrehg
Copy link

imrehg commented Apr 13, 2018

Have a very similar outcome trying to run the current master (v0.4.2) on ArchLinux with node v9.11.1 and npm 5.8.0

$ cat /home/greg/.npm/_logs/2018-04-13T15_34_35_042Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ]
2 info using npm@5.8.0
3 info using node@v9.11.1
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle ipfs-desktop@0.4.2~prestart: ipfs-desktop@0.4.2
6 info lifecycle ipfs-desktop@0.4.2~start: ipfs-desktop@0.4.2
7 verbose lifecycle ipfs-desktop@0.4.2~start: unsafe-perm in lifecycle true
8 verbose lifecycle ipfs-desktop@0.4.2~start: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/greg/prog/ipfs-desktop/node_modules/.bin:/home/greg/bin:/home/greg/go/bin/:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
9 verbose lifecycle ipfs-desktop@0.4.2~start: CWD: /home/greg/prog/ipfs-desktop
10 silly lifecycle ipfs-desktop@0.4.2~start: Args: [ '-c', 'electron-forge start' ]
11 silly lifecycle ipfs-desktop@0.4.2~start: Returned: code: 1  signal: null
12 info lifecycle ipfs-desktop@0.4.2~start: Failed to exec start script
13 verbose stack Error: ipfs-desktop@0.4.2 start: `electron-forge start`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:283:16)
13 verbose stack     at EventEmitter.emit (events.js:180:13)
13 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:180:13)
13 verbose stack     at maybeClose (internal/child_process.js:936:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
14 verbose pkgid ipfs-desktop@0.4.2
15 verbose cwd /home/greg/prog/ipfs-desktop
16 verbose Linux 4.15.15-1-ARCH
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "start"
18 verbose node v9.11.1
19 verbose npm  v5.8.0
20 error code ELIFECYCLE
21 error errno 1
22 error ipfs-desktop@0.4.2 start: `electron-forge start`
22 error Exit status 1
23 error Failed at the ipfs-desktop@0.4.2 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

When running it with the debug output enabled:

$ DEBUG=electron-forge:* npm start

> ipfs-desktop@0.4.2 start /home/greg/prog/ipfs-desktop
> electron-forge start

WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:lifecycle Process Started: Checking your system +0ms
  electron-forge:lifecycle Process Succeeded: Checking your system +584ms
  electron-forge:runtime-config setting key: verbose to value: false +0ms
WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:lifecycle Process Started: Locating Application +0ms
  electron-forge:project-resolver searching for project in: /home/greg/prog/ipfs-desktop +0ms
  electron-forge:project-resolver electron-forge compatible package.json found in /home/greg/prog/ipfs-desktop/package.json +4ms
  electron-forge:lifecycle Process Succeeded: Locating Application +5ms
  electron-forge:lifecycle Process Started: Preparing native dependencies +5ms
  electron-forge:lifecycle Process Succeeded: Preparing native dependencies +512ms
  electron-forge:hook could not find hook: generateAssets +0ms
  electron-forge:lifecycle Process Started: Launching Application +2ms
  electron-forge:lifecycle Process Succeeded: Launching Application +3ms
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ipfs-desktop@0.4.2 start: `electron-forge start`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ipfs-desktop@0.4.2 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/greg/.npm/_logs/2018-04-13T15_39_41_923Z-debug.log

@hacdias
Copy link
Member

hacdias commented Apr 13, 2018

Could you add desktop to the DEBUG variable and send me the output? I can't reproduce that here.

@imrehg
Copy link

imrehg commented Apr 13, 2018

@hacdias with some experimentation, I think the issue is, that there's a local ipfs service running in the background (a regular go-ipfs node that I have running on my machine) when ipfs-desktop is started, and the two of them clash...

$ DEBUG=electron-forge:*,desktop npm start

> ipfs-desktop@0.4.2 start /home/greg/prog/ipfs-desktop
> electron-forge start

WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:lifecycle Process Started: Checking your system +0ms
  electron-forge:lifecycle Process Succeeded: Checking your system +674ms
  electron-forge:runtime-config setting key: verbose to value: false +0ms
WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:lifecycle Process Started: Locating Application +0ms
  electron-forge:project-resolver searching for project in: /home/greg/prog/ipfs-desktop +0ms
  electron-forge:project-resolver electron-forge compatible package.json found in /home/greg/prog/ipfs-desktop/package.json +4ms
  electron-forge:lifecycle Process Succeeded: Locating Application +4ms
  electron-forge:lifecycle Process Started: Preparing native dependencies +5ms
  electron-forge:lifecycle Process Succeeded: Preparing native dependencies +522ms
  electron-forge:hook could not find hook: generateAssets +0ms
  electron-forge:lifecycle Process Started: Launching Application +1ms
  electron-forge:lifecycle Process Succeeded: Launching Application +4ms
  desktop Application is ready +0ms
  desktop Starting daemon +6ms
  desktop Uncaught Exception: Error: non-zero exit code 1
  desktop 
  desktop             while running: /home/greg/prog/ipfs-desktop/node_modules/go-ipfs-dep/go-ipfs/ipfs daemon --routing=dhtclient
  desktop 
  desktop 
  desktop             Error: resource temporarily unavailable
  desktop 
  desktop     at Stream.listeners.done.once (/home/greg/prog/ipfs-desktop/node_modules/ipfsd-ctl/src/utils/exec.js:42:11)
  desktop     at Stream.f (/home/greg/prog/ipfs-desktop/node_modules/once/once.js:25:25)
  desktop     at emitTwo (events.js:125:13)
  desktop     at Stream.emit (events.js:213:7)
  desktop     at emitTwo (events.js:125:13)
  desktop     at ChildProcess.emit (events.js:213:7)
  desktop     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) +203ms
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ipfs-desktop@0.4.2 start: `electron-forge start`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ipfs-desktop@0.4.2 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/greg/.npm/_logs/2018-04-13T16_13_32_516Z-debug.log

If I stop the background ipfs service, ipfs-desktop starts up fine.

I'm guessing then it's more of an issue of highlighting that clash when found?

@hacdias
Copy link
Member

hacdias commented Apr 13, 2018

Hmm... that's weird. IPFS Desktop should automatically connect to an already running daemon. I'll check that out better to see if I can find the issue.

@dryajov
Copy link
Member

dryajov commented Apr 13, 2018

@hacdias

IPFS Desktop should automatically connect to an already running daemon. I'll check that out better to see if I can find the issue.

I'm not sure whether it is the case in this situation, but we've noticed that ipfsd-ctl would not shutdown properly on some environment because it would simply run out of time and the ipfs daemon would be killed, leaving the lock and api file behind. This is an issue with the timeout to shutdown the daemon, so I've increased it for non disposable repos in ipfs/js-ipfsd-ctl#228, in hopes that it would prevent issues with user facing applications.

Just leaving it here, in case it happens to be the case with this issue.

@hacdias
Copy link
Member

hacdias commented Apr 21, 2018

@dryajov I actually take that in account:

https://github.com/ipfs-shipyard/ipfs-desktop/blob/8d8c4d128d35f331d7068a63e38330a4c0b9f468/src/index.js#L83-L104

So I'm not sure what might be happening here.

@steverecio @nothingismagick @imrehg @jeffd could you try running the latest version from master with the newest dependency versions?

@steverecio
Copy link
Author

steverecio commented Apr 21, 2018

Nice! It works for me now. Was able to upload this photo via the GUI! 🤓

@nrpalao
Copy link

nrpalao commented Aug 29, 2018

Tried getting a clean checkout running on 10.12.6 Sierra (node v.8.11.4 and npm v.5.6.0), with a correct packages install and first run (npm start), Electron shows up but on the install (node) properties menu, the directory fields fails to display and either lets edit it.

screen shot 2018-08-29 at 13 06 05

Obvsly when trying to install without it, retrieves:
[message]: 'Path must be a string. Received null' }

I haven't been able to find any good leads as to why it's not executing properly. The debug.log file does not have much more additional information. Any tips on how to go about figuring out what might be causing this?

@hacdias
Copy link
Member

hacdias commented Aug 29, 2018

@nrpalao sorry for that. Could you check the combined.log file? I just pushed a commit and now you'll be able to see the path where the logs are when you get the error message.

I can't reproduce that error on Windows though. With the last version of IPFS Desktop it was already filled?

On the logs path, please also check config.json and show us your config, please.

@nrpalao
Copy link

nrpalao commented Aug 29, 2018

@hacdias tried again and apparently keeps happening exactly the same.

Retrieved this error screen with the route:

screen shot 2018-08-29 at 16 12 50

screen shot 2018-08-29 at 16 12 50

screen shot 2018-08-29 at 16 21 14

(In the other hand, don't know if it could be causing conflict, but I yesterday succesfully accesed through the go-daemon and GUI interface)

@hacdias
Copy link
Member

hacdias commented Aug 31, 2018

@nrpalao could you show me the config.json? Let's continue the conversation on #656

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants