JS ERROR: ImportError: No JS module 'desktop' found in search path#012

Bug #1790996 reported by shemgp
26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
gnome-shell (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Upgraded latest Ubuntu Cosmic Cuttlefish (development branch) and this error shows up when clicking a preference in any gnome-shell extension:
Sep 6 10:16:23 shemgp-x230t gnome-shell-ext[30874]: Execution of main.js threw exception: Script <main> threw an exception
Sep 6 10:16:23 shemgp-x230t gnome-shell-ext[30886]: JS ERROR: ImportError: No JS module 'desktop' found in search path#012@resource:///org/gnome/shell/misc/extensionUtils.js:12:7#012@resource:///org/gnome/shell/extensionPrefs/main.js:15:7#012@<main>:1:7

ProblemType: Bug
DistroRelease: Ubuntu 18.10
Package: gnome-shell 3.30.0-1ubuntu1
ProcVersionSignature: Ubuntu 4.17.0-9.10-generic 4.17.17
Uname: Linux 4.17.0-9-generic x86_64
ApportVersion: 2.20.10-0ubuntu9
Architecture: amd64
CurrentDesktop: GNOME
Date: Thu Sep 6 10:18:42 2018
DisplayManager: gdm3
EcryptfsInUse: Yes
InstallationDate: Installed on 2015-09-28 (1073 days ago)
InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Release amd64 (20150422)
SourcePackage: gnome-shell
UpgradeStatus: Upgraded to cosmic on 2018-09-05 (0 days ago)

Revision history for this message
shemgp (shemgp) wrote :
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Please report the issue to the GNOME developers here:

  https://gitlab.gnome.org/GNOME/gnome-shell/issues/new

and then tell us the ID of the new issue created.

summary: - No JS module 'desktop' found in search path
+ JS ERROR: ImportError: No JS module 'desktop' found in search path#012
Changed in gnome-shell (Ubuntu):
status: New → Incomplete
Revision history for this message
shemgp (shemgp) wrote :
description: updated
Changed in gnome-shell (Ubuntu):
status: Incomplete → New
Revision history for this message
shemgp (shemgp) wrote :

According to upstream, it's a bug in an Ubuntu specific patch of gnome-shell.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks. It's unclear who exactly added that or why...

From: Ubuntu Developers <email address hidden>
Date: Wed, 20 Jun 2018 19:22:06 +0200
Subject: Add an helper to detect current desktop

We will differentiate some behavior depending on current desktop. Add an
helper to centralize the current desktop detection.
Forwarded: not-needed
Origin: ubuntu
===================================================================
---
 js/js-resources.gresource.xml | 1 +
 js/misc/desktop.js | 39 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+)
 create mode 100644 js/misc/desktop.js

Changed in gnome-shell (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
description: updated
Revision history for this message
shemgp (shemgp) wrote :

misc/desktop.js has to be added in prefs gresource.xml too.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Great fix (if that's what it is). Thanks! Please just add some more information:

1. Mention (LP: #1790996) in the changelog:

   * Add misc/desktop.js to pref's gresource.xml (LP: #1790996)

2. Merge your change into 50_add_ubuntu_desktop_detect.patch. You can do that by learning about 'quilt' command.

- or -

2. Add more details to the top of the patch:

Description: Add deskpop.js to prefs gresource xml
Author: Shem Pasamba <email address hidden>
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1790996
Forwarded: not-needed
Last-Update: 2018-09-06

tags: added: patch
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "add_missing_desktop_js_gresource_xml.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

Revision history for this message
shemgp (shemgp) wrote :

I can confirm that in the build of gnome-shell using the contents of this patch allows launching of preferences of gnome-shell extensions again.

Changed the debdiff to update the previous debian/patches/ubuntu/desktop_detect.patch to add the required <file>mist/desktop.js</file> to js/prefs-resources.gresource.xml.

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Thanks a lot! I was just looking at the same issue and got directed to the bug. The diff is good, I've just sponsored it to cosmic.

Thanks again ;)

Changed in gnome-shell (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-shell - 3.30.0-1ubuntu2

---------------
gnome-shell (3.30.0-1ubuntu2) cosmic; urgency=medium

  * ubuntu/desktop_detect.patch:
    + Added missing misc/desktop.js to pref's gresource.xml (LP: #1790996)

 -- Shem Pasamba <email address hidden> Thu, 06 Sep 2018 16:41:39 +0800

Changed in gnome-shell (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.