Ipfs-desktop: IPFS Desktop menu in corrupt state ?

Created on 18 May 2020  Â·  9Comments  Â·  Source: ipfs-shipyard/ipfs-desktop

  • OS: macOs
  • Version of IPFS Desktop

image

Describe the bug
Menu appears in some corrupt state and every item is disabled

image

Web UI seems to work fine

Additional context
I did see update notification this morning. Which I suspect might be related

image

Logs

combined log for last couple of days

2020-05-13T15:22:47.931Z info: [updater] update not available
2020-05-13T15:22:49.398Z info: [npm on ipfs] ipfs-npm: checking if outdated
2020-05-13T15:23:13.338Z error: [npm on ipfs] ipfs-npm: could not check if up to date Error: Command failed: npm outdated -g

2020-05-13T15:23:13.338Z info: [npm on ipfs] ipfs-npm: is out to date, will update
2020-05-13T15:24:00.472Z info: [npm on ipfs] ipfs-npm: installed globally
2020-05-14T03:23:35.016Z info: [updater] update not available
2020-05-14T03:23:36.773Z info: [npm on ipfs] ipfs-npm: checking if outdated
2020-05-14T03:23:49.531Z error: [npm on ipfs] ipfs-npm: could not check if up to date Error: Command failed: npm outdated -g

2020-05-14T03:23:49.534Z info: [npm on ipfs] ipfs-npm: is out to date, will update
2020-05-14T03:24:33.976Z info: [npm on ipfs] ipfs-npm: installed globally
2020-05-14T19:29:11.435Z info: [updater] update not available
2020-05-14T19:29:13.178Z info: [npm on ipfs] ipfs-npm: checking if outdated
2020-05-14T19:29:45.747Z error: [npm on ipfs] ipfs-npm: could not check if up to date Error: Command failed: npm outdated -g

2020-05-14T19:29:45.747Z info: [npm on ipfs] ipfs-npm: is out to date, will update
2020-05-14T19:30:39.292Z info: [npm on ipfs] ipfs-npm: installed globally
2020-05-16T12:23:20.038Z info: [ipfsd] stop daemon STARTED
2020-05-16T12:23:20.458Z info: [ipfsd] stop daemon FINISHED 0.41648366701602935s
2020-05-16T12:23:20.461Z info: [ipfsd] start daemon STARTED
2020-05-16T12:23:23.129Z info: [daemon] PeerID is QmYhQG9JXYeBF6pL7yafFJfEYcKPp9N8n4aRmYZzU6z47u
2020-05-16T12:23:23.129Z info: [daemon] Repo is at /Users/gozala/.ipfs
2020-05-16T12:23:23.130Z info: [ipfsd] start daemon FINISHED 2.666522302001715s
2020-05-18T16:09:32.321Z info: [updater] update available, download will start
2020-05-18T16:09:33.947Z info: [npm on ipfs] ipfs-npm: checking if outdated
2020-05-18T16:09:49.893Z info: [updater] update downloaded
````

error log for this month

2020-05-01T07:31:11.859Z error: [npm on ipfs] ipfs-npm: could not check if up to date Error: Command failed: npm outdated -g

2020-05-02T00:01:23.656Z error: [npm on ipfs] ipfs-npm: could not check if up to date Error: Command failed: npm outdated -g

2020-05-03T04:24:17.414Z error: [npm on ipfs] ipfs-npm: could not check if up to date Error: Command failed: npm outdated -g

2020-05-04T21:12:41.960Z error: [npm on ipfs] ipfs-npm: could not check if up to date Error: Command failed: npm outdated -g

2020-05-05T21:11:26.331Z error: [npm on ipfs] ipfs-npm: could not check if up to date Error: Command failed: npm outdated -g

2020-05-06T20:05:01.330Z error: [npm on ipfs] ipfs-npm: could not check if up to date Error: Command failed: npm outdated -g

2020-05-07T15:33:30.086Z error: [npm on ipfs] ipfs-npm: could not check if up to date Error: Command failed: npm outdated -g

2020-05-08T20:17:03.227Z error: [npm on ipfs] ipfs-npm: could not check if up to date Error: Command failed: npm outdated -g

2020-05-12T19:42:08.392Z error: [npm on ipfs] ipfs-npm: could not check if up to date Error: Command failed: npm outdated -g

2020-05-13T15:23:13.338Z error: [npm on ipfs] ipfs-npm: could not check if up to date Error: Command failed: npm outdated -g

2020-05-14T03:23:49.531Z error: [npm on ipfs] ipfs-npm: could not check if up to date Error: Command failed: npm outdated -g

2020-05-14T19:29:45.747Z error: [npm on ipfs] ipfs-npm: could not check if up to date Error: Command failed: npm outdated -g
```

P1 aremacos dimedium efforhours help wanted kinbug neeanalysis

Most helpful comment

Just got another update and it seems that this time around dialog did not renderred menu in corrupt state

image

All 9 comments

@rafaelramalho19 and/or @lidel -- can you please look into this?

Just noticed that there was a dialog buried behind some windows

image

I suspect menu is rendered in that awkward state when that dialog open. I'm also unable to reproduce this issue any more.

@rafaelramalho19 either this is a generic bug in our code or a quirk of Electron on macOS.

Some tips for when you have time to take a look:

  • perhaps we just need to update/rebuild menu at the end of autoupdate hook?
  • (otherwise) I remember Electron menu/tray rendering was full of quirky behaviors on different platforms (eg. we already have custom code paths for updating it on linux, iirc). This may be harder to track, but also may be fixed by making additional refresh on macOS.

@lidel Isn't this the modal we use to skip the "Do not disturb" mode? Maybe it's blocking all the options from being selectable since it's probably waiting for user input to continue...

Need to look into this 🤔

I can confirm the dialog freezes everything happening in the ipfs-desktop system tray menu. But I'm not able to reproduce that awkward state @Gozala was reporting.

What do you prefer about this?

  • Try to force the menu to update with some hack 🔨
  • Make the update feature not blocking? (This could lead to people using outdated versions, but it's their choice nonetheless)

Just got another update and it seems that this time around dialog did not renderred menu in corrupt state

image

Just dumping some old knowledge here: macOS allows us to show dialogs without showing the dock icon so it can be an hassle to find the dialogs! We're, by default, showing the dock when showing dialogs.

@Gozala did you notice if the dock icon of IPFS Desktop was shown at that moment? I think the same happened to me and Molly. However, I did not notice the dock icon. If I did, I wouldn't have force killed IPFS Desktop 😞

--

Idea: maybe the logic behind hiding the dock is wrong because I'm not sure if a dialog is counted for the active windows. But anyways, that shouldn't be a problem because we only call that after receiving the response from the dialog: https://github.com/ipfs-shipyard/ipfs-desktop/blob/master/src/dialogs/dialog.js#L42

We're using showMessageBoxSync. I wonder if by using showMessageBox (async version), we would not run into the weird status bar state.

@hacdias Tried out your suggestion but it's still locking the process until the dialog is dealt with 😢

Well, I don't think that the "inactive" state is bad: if a dialog is opened, then it's because user action is required that depends on the current context. If the menu could be changed, things could break.

The only worry I have is the corrupt state in the beginning of the post I've never seen before. But so far no one reproduced it.

Was this page helpful?
0 / 5 - 0 ratings