After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 759004 - Missing entries in applications menu
Missing entries in applications menu
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: extensions
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 759879 759994 760333 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2015-12-03 23:37 UTC by ajg01
Modified: 2016-03-03 16:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
log info (146.58 KB, image/png)
2015-12-16 17:33 UTC, Joseph Bodhorn
  Details
apps-menu: Debug failed app lookup (1022 bytes, patch)
2015-12-16 17:53 UTC, Florian Müllner
none Details | Review
I used journalctl -rx > /location/of/filename to get this info (67.94 KB, text/plain)
2015-12-16 18:17 UTC, Joseph Bodhorn
  Details
Log from patch applied (10.47 KB, text/plain)
2015-12-16 19:39 UTC, ajg01
  Details
.desktop file that is mentioned first in previous log (6.30 KB, application/x-desktop)
2015-12-16 19:41 UTC, ajg01
  Details
edited extension.js (87.21 KB, text/x-vhdl)
2015-12-16 20:26 UTC, Joseph Bodhorn
  Details
apps-menu: Remove unused variable (1.12 KB, patch)
2015-12-16 21:51 UTC, Florian Müllner
committed Details | Review
apps-menu: Fix .desktop entries in subdirectories (1.87 KB, patch)
2015-12-16 21:51 UTC, Florian Müllner
committed Details | Review
apps-menu: Catch menu tree entries we can't resolve to an app (1.37 KB, patch)
2016-03-03 16:48 UTC, Florian Müllner
committed Details | Review

Description ajg01 2015-12-03 23:37:08 UTC
Certain groups in the Applications menu do not get any entries such as Programming, Graphics and Office. This is despite enabling entries using alacarte. On hovering over one of the empty groups in the menu with the mouse cursor the following items, and more, appear in syslog

Dec  3 23:25:42 quad gnome-session[4856]: (gnome-shell:5021): Gjs-WARNING **: JS ERROR: TypeError: b is null
Dec  3 23:25:42 quad gnome-session[4856]: ApplicationsButton<._listApplications/<@/usr/share/gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/extension.js:573
Dec  3 23:25:42 quad gnome-session[4856]: ApplicationsButton<._listApplications@/usr/share/gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/extension.js:572
Dec  3 23:25:42 quad gnome-session[4856]: wrapper@resource:///org/gnome/gjs/modules/lang.js:169
Dec  3 23:25:42 quad gnome-session[4856]: ApplicationsButton<.selectCategory@/usr/share/gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/extension.js:548
Dec  3 23:25:42 quad gnome-session[4856]: wrapper@resource:///org/gnome/gjs/modules/lang.js:169
Dec  3 23:25:42 quad gnome-session[4856]: CategoryMenuItem<.setActive@/usr/share/gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/extension.js:203
Dec  3 23:25:42 quad gnome-session[4856]: wrapper@resource:///org/gnome/gjs/modules/lang.js:169
Dec  3 23:25:42 quad gnome-session[4856]: PopupBaseMenuItem<._onHoverChanged@resource:///org/gnome/shell/ui/popupMenu.js:160
Dec  3 23:25:42 quad gnome-session[4856]: wrapper@resource:///org/gnome/gjs/modules/lang.js:169
Dec  3 23:25:42 quad gnome-session[4856]: (gnome-shell:5021): Gjs-WARNING **: JS ERROR: TypeError: b is null
Dec  3 23:25:42 quad gnome-session[4856]: ApplicationsButton<._listApplications/<@/usr/share/gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/extension.js:573
Dec  3 23:25:42 quad gnome-session[4856]: ApplicationsButton<._listApplications@/usr/share/gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/extension.js:572
Dec  3 23:25:42 quad gnome-session[4856]: wrapper@resource:///org/gnome/gjs/modules/lang.js:169
Dec  3 23:25:42 quad gnome-session[4856]: ApplicationsButton<.selectCategory@/usr/share/gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/extension.js:548
Dec  3 23:25:42 quad gnome-session[4856]: wrapper@resource:///org/gnome/gjs/modules/lang.js:169
Dec  3 23:25:42 quad gnome-session[4856]: CategoryMenuItem<.setActive@/usr/share/gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/extension.js:203
Dec  3 23:25:42 quad gnome-session[4856]: wrapper@resource:///org/gnome/gjs/modules/lang.js:169
Dec  3 23:25:42 quad gnome-session[4856]: PopupBaseMenuItem<._onHoverChanged@resource:///org/gnome/shell/ui/popupMenu.js:160
Dec  3 23:25:42 quad gnome-session[4856]: wrapper@resource:///org/gnome/gjs/modules/lang.js:169
Dec  3 23:25:42 quad gnome-session[4856]: CategoryMenuItem<._onMotionEvent@/usr/share/gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/extension.js:184
Dec  3 23:25:42 quad gnome-session[4856]: wrapper@resource:///org/gnome/gjs/modules/lang.js:169
Dec  3 23:25:42 quad gnome-session[4856]: (gnome-shell:5021): Gjs-WARNING **: JS ERROR: TypeError: b is null
Dec  3 23:25:42 quad gnome-session[4856]: ApplicationsButton<._listApplications/<@/usr/share/gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/extension.js:573
Dec  3 23:25:42 quad gnome-session[4856]: ApplicationsButton<._listApplications@/usr/share/gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/extension.js:572
Dec  3 23:25:42 quad gnome-session[4856]: wrapper@resource:///org/gnome/gjs/modules/lang.js:169
Dec  3 23:25:42 quad gnome-session[4856]: ApplicationsButton<.selectCategory@/usr/share/gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/extension.js:548
Dec  3 23:25:42 quad gnome-session[4856]: wrapper@resource:///org/gnome/gjs/modules/lang.js:169
Dec  3 23:25:42 quad gnome-session[4856]: CategoryMenuItem<.setActive@/usr/share/gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/extension.js:203
Dec  3 23:25:42 quad gnome-session[4856]: wrapper@resource:///org/gnome/gjs/modules/lang.js:169
Dec  3 23:25:42 quad gnome-session[4856]: PopupBaseMenuItem<._onHoverChanged@resource:///org/gnome/shell/ui/popupMenu.js:160
Dec  3 23:25:42 quad gnome-session[4856]: wrapper@resource:///org/gnome/gjs/modules/lang.js:169
Dec  3 23:25:42 quad gnome-session[4856]: CategoryMenuItem<._onMotionEvent@/usr/share/gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/extension.js:184
Dec  3 23:25:42 quad gnome-session[4856]: wrapper@resource:///org/gnome/gjs/modules/lang.js:169
Dec  3 23:25:42 quad gnome-session[4856]: (gnome-shell:5021): Gjs-WARNING **: JS ERROR: TypeError: b is null
Dec  3 23:25:42 quad gnome-session[4856]: ApplicationsButton<._listApplications/<@/usr/share/gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/extension.js:573
Dec  3 23:25:42 quad gnome-session[4856]: ApplicationsButton<._listApplications@/usr/share/gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/extension.js:572
Dec  3 23:25:42 quad gnome-session[4856]: wrapper@resource:///org/gnome/gjs/modules/lang.js:169
Dec  3 23:25:42 quad gnome-session[4856]: ApplicationsButton<.selectCategory@/usr/share/gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/extension.js:548
Dec  3 23:25:42 quad gnome-session[4856]: wrapper@resource:///org/gnome/gjs/modules/lang.js:169
Dec  3 23:25:42 quad gnome-session[4856]: CategoryMenuItem<.setActive@/usr/share/gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/extension.js:203
Dec  3 23:25:42 quad gnome-session[4856]: wrapper@resource:///org/gnome/gjs/modules/lang.js:169
Dec  3 23:25:42 quad gnome-session[4856]: PopupBaseMenuItem<._onHoverChanged@resource:///org/gnome/shell/ui/popupMenu.js:160
Comment 1 Joseph Bodhorn 2015-12-16 17:32:13 UTC
I and others are having this issue, it's not isolated. For me it has happened in both Arch and Fedora, I've had to switch to frippery applications menu till this issue gets resolved
Comment 2 Joseph Bodhorn 2015-12-16 17:33:23 UTC
Created attachment 317521 [details]
log info
Comment 3 Florian Müllner 2015-12-16 17:53:31 UTC
Created attachment 317522 [details] [review]
apps-menu: Debug failed app lookup

Can you provide a log with this patch applied? For some reason there are .desktop entries in the menu that we cannot resolve to an application ...
Comment 4 Joseph Bodhorn 2015-12-16 18:15:56 UTC
If you could tell me how to get the info you need I'd be more than happy to provide it. I'm still pretty new to Linux, I'm currently using Arch if that matters. I hope the chunk of log I'm about to attach helps, but I'm not sure if it's what you need or not. It actually goes on for quite a lot of lines more than I'm attaching.
Comment 5 Joseph Bodhorn 2015-12-16 18:17:57 UTC
Created attachment 317526 [details]
I used journalctl -rx > /location/of/filename to get this info

If other info is needed please advise and I will provide
Comment 6 Florian Müllner 2015-12-16 18:26:05 UTC
(In reply to Joseph Bodhorn from comment #5)
> Created attachment 317526 [details]

Are you sure you applied the patch? I don't see the added log message, and it's the only place where we should be able to add a null entry ...

(If you don't have the sources to apply the patch, it may be easier to edit the installed extension.js file directly)
Comment 7 ajg01 2015-12-16 19:39:20 UTC
Created attachment 317529 [details]
Log from patch applied

I added the patch to my installed file and could not get any change in the log messages until I restarted gnome shell.
I then found these messages in the syslog.
Comment 8 ajg01 2015-12-16 19:41:16 UTC
Created attachment 317530 [details]
.desktop file that is mentioned first in previous log

Here is the first .desktop file mentioned in the above log.
Comment 9 ajg01 2015-12-16 19:45:02 UTC
Just for the record

$ which scangui
/usr/bin/scangui
Comment 10 Joseph Bodhorn 2015-12-16 20:26:15 UTC
Created attachment 317532 [details]
edited extension.js

Terribly sorry, I had just skimmed your reply on my phone and missed that I was supposed to patch the extension before posting the log. I hope I did the patch right, I've only had to patch one in the past. Once again I output journalctl -rx to a file, if I need to obtain the log info a different way please advise. The log is huge, I cut what I thought is needed and attached that, but here's a pastebin from this session till the file output http://pastebin.com/fuZDEXfe
Comment 11 Florian Müllner 2015-12-16 21:37:17 UTC
(In reply to Joseph Bodhorn from comment #10)
> Terribly sorry, I had just skimmed your reply on my phone and missed that I
> was supposed to patch the extension before posting the log.

No worries, we already got a log in comment #8 that shows the problem.
Comment 12 Florian Müllner 2015-12-16 21:51:37 UTC
Created attachment 317534 [details] [review]
apps-menu: Remove unused variable
Comment 13 Florian Müllner 2015-12-16 21:51:47 UTC
Created attachment 317535 [details] [review]
apps-menu: Fix .desktop entries in subdirectories

GMenu's TreeEntries return an AppInfo that is created from the
.desktop filename, not from a desktop ID as expected by the
AppSystem. As a result, g_app_info_get_id() will simply return
the file's basename, which only matches the desktop ID if no
prefix-to-subdirectory mapping as described in the menu spec
is involved.
Fix this by basing the app lookup on the entry's desktop ID instead
of the AppInfo.
Comment 14 ajg01 2015-12-16 22:32:55 UTC
Works for me.

Thank you Florian.
Comment 15 Florian Müllner 2015-12-17 00:44:41 UTC
Attachment 317534 [details] pushed as 1958ce7 - apps-menu: Remove unused variable
Attachment 317535 [details] pushed as 79c76a8 - apps-menu: Fix .desktop entries in subdirectories
Comment 16 Joseph Bodhorn 2015-12-17 05:58:25 UTC
(In reply to Florian Müllner from comment #15)
> Attachment 317534 [details] pushed as 1958ce7 - apps-menu: Remove unused
> variable
> Attachment 317535 [details] pushed as 79c76a8 - apps-menu: Fix .desktop
> entries in subdirectories

Thank you much
Comment 17 Florian Müllner 2015-12-26 15:12:55 UTC
*** Bug 759879 has been marked as a duplicate of this bug. ***
Comment 18 Florian Müllner 2016-01-07 13:10:54 UTC
*** Bug 759994 has been marked as a duplicate of this bug. ***
Comment 19 Florian Müllner 2016-01-08 20:31:50 UTC
*** Bug 760333 has been marked as a duplicate of this bug. ***
Comment 20 Ting-Wei Lan 2016-01-17 18:56:12 UTC
Attachment 317535 [details] causes apps-menu stop working when app is null. Error message found in journal:
gnome-shell-wayland.desktop[6887]: Gjs-Message: JS LOG: Extension "apps-menu@gnome-shell-extensions.gcampax.github.com" had error: TypeError: app is null

This problem is caused by the file /usr/share/applnk/google-chrome.desktop on my system. entry.get_desktop_file_id() returns 'kde-google-chrome.desktop', and appSys.lookup_app() cannot find it.

Should we have a null check here to prevent the problem?
Comment 21 Florian Müllner 2016-01-20 19:18:29 UTC
(In reply to Ting-Wei Lan from comment #20)
> Should we have a null check here to prevent the problem?

Either that, or remove those legacy dirs from gnome-menus - those directories have been deprecated for over a decade now. I filed a patch in bug 760900, let's see how it goes.
Comment 22 Ting-Wei Lan 2016-01-23 12:33:52 UTC
I think the patch in bug 760900 will work with GNOME 3.20, but we still need a solution for GNOME 3.18.
Comment 23 Matthias Clasen 2016-02-20 18:26:26 UTC
not a 3.20 blocker anymore, then
Comment 24 Florian Müllner 2016-03-03 16:48:28 UTC
The following fix has been pushed:
2383462 apps-menu: Catch menu tree entries we can't resolve to an app
Comment 25 Florian Müllner 2016-03-03 16:48:33 UTC
Created attachment 323008 [details] [review]
apps-menu: Catch menu tree entries we can't resolve to an app

The default .menu file still contains a number of legacy directories that
have been deprecated for over 15 years, which GIO (and in extension the
shell's AppSystem) ignore. Encountering such an entry currently triggers
an exception and an entire category ends up empty, fix this by silently
skipping over the offending entry.